<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Louis</title>
    <description>The latest articles on DEV Community by Louis (@louis3797).</description>
    <link>https://dev.to/louis3797</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F763153%2F4c95dfd3-441a-4b61-8194-b9abebb0cf56.png</url>
      <title>DEV Community: Louis</title>
      <link>https://dev.to/louis3797</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/louis3797"/>
    <language>en</language>
    <item>
      <title>Protect Your Express.js App from XSS Attacks</title>
      <dc:creator>Louis</dc:creator>
      <pubDate>Fri, 24 Mar 2023 11:00:33 +0000</pubDate>
      <link>https://dev.to/louis3797/protect-your-expressjs-app-from-xss-attacks-3i9d</link>
      <guid>https://dev.to/louis3797/protect-your-expressjs-app-from-xss-attacks-3i9d</guid>
      <description>&lt;p&gt;Cross-site scripting (XSS) attacks are one of the most common and dangerous security vulnerabilities in web applications. They can compromise user data, steal sensitive information, and even lead to complete system compromise. That's why it's crucial to take action and have strong defenses in place to prevent these attacks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/xss-shield"&gt;xss-shield&lt;/a&gt; is an npm package that provides a simple and effective way to prevent XSS attacks in your application. It's a middleware function that sanitizes user input in the request body, query parameters, and route parameters using a customizable set of rules. By doing so, it ensures that any potentially malicious code is removed before it can cause any harm.&lt;/p&gt;

&lt;p&gt;To use &lt;a href="https://www.npmjs.com/package/xss-shield"&gt;xss-shield&lt;/a&gt;, simply install it with npm or yarn and add it as middleware to your Express application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;xssShield&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;xss-shield&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Add the middleware to the middleware stack&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xssShield&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it! Now, any user input in the request will be automatically sanitized to prevent XSS attacks. You can also customize the sanitization rules by passing options to the middleware function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;express&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;xssShield&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;xss-shield&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="c1"&gt;// Add the middleware to the middleware stack with options&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;xssShield&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;whiteList&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;href&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;target&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;img&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;src&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;alt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can rest assured that your application is protected from XSS attacks. It's a simple and effective way to secure your code and prevent security vulnerabilities. Give it a try and see how easy it is to use!&lt;/p&gt;

&lt;p&gt;Github Repo: &lt;a href="https://github.com/Louis3797/xss-shield"&gt;https://github.com/Louis3797/xss-shield&lt;/a&gt;&lt;br&gt;
Npm package: &lt;a href="https://www.npmjs.com/package/xss-shield"&gt;https://www.npmjs.com/package/xss-shield&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>typescript</category>
      <category>security</category>
      <category>node</category>
    </item>
    <item>
      <title>Say Goodbye to Authentication Headaches with my ready-to-use Authentication Server</title>
      <dc:creator>Louis</dc:creator>
      <pubDate>Wed, 22 Mar 2023 20:54:09 +0000</pubDate>
      <link>https://dev.to/louis3797/say-goodbye-to-authentication-headaches-with-my-ready-to-use-authentication-server-1b56</link>
      <guid>https://dev.to/louis3797/say-goodbye-to-authentication-headaches-with-my-ready-to-use-authentication-server-1b56</guid>
      <description>&lt;p&gt;I'm excited to showcase my latest project - a powerful and secure &lt;a href="https://github.com/Louis3797/express-ts-auth-service"&gt;authentication server boilerplate&lt;/a&gt; built with TypeScript and Express.js!&lt;/p&gt;

&lt;p&gt;Here's a list of features that my authentication server offers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;✒️ Written in TypeScript for type-safe code&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;💾 Utilizes a MySQL database to efficiently store user data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🗣️ Interacts with the database using the powerful Prisma ORM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🔒 Implements secure authentication measures with JWTs, ensuring secure access to sensitive data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🔑 Implements robust password hashing using Argon2 for maximum security&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;♻️ Incorporates refresh token rotation functionality to enhance the security&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✅ Includes email verification functionality for new user sign-ups&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🆕 Provides a reset password function for users who have forgotten their password&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🐇 Enables faster data transfer by implementing GZIP compression&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;👮‍♂️ Implements essential security features using Helmet middleware&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🍪 Parses cookies seamlessly with cookie-parser middleware&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;⚙️ Allows cross-origin resource sharing using CORS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🧼 Sanitizes request data against cross-site-scripting with xss middleware&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🔠 Manages environment variables with ease using dotenv&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🕵️‍♂️ Enforces high code quality standards with ESLint and Prettier&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🏇 Implements rate limiting to prevent abuse and improve server performance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ℹ️ Accurately manages HTTP response status codes using http-status library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;⚠️ Validates user input with the powerful and flexible Joi library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📧 Facilitates sending of emails using nodemailer library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;📝 Enables detailed logging of server activities using winston library&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🐶 Implements Git hooks with Husky to optimize development processes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🧪 Ensure reliability and robustness of the application with thorough testing using Jest and Supertest&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🐳 Utilizes Docker Compose to seamlessly run the server and database&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm excited to share it with the community. You can find the project on my &lt;a href="https://github.com/Louis3797/express-ts-auth-service"&gt;GitHub repository&lt;/a&gt;, where you're welcome to contribute and help make it even better. Let's work together to create a powerful and secure authentication solution for everyone!&lt;/p&gt;

</description>
      <category>express</category>
      <category>typescript</category>
      <category>node</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Nextjs Pokedex</title>
      <dc:creator>Louis</dc:creator>
      <pubDate>Wed, 06 Apr 2022 12:56:21 +0000</pubDate>
      <link>https://dev.to/louis3797/nextjs-pokedex-4oj</link>
      <guid>https://dev.to/louis3797/nextjs-pokedex-4oj</guid>
      <description>&lt;p&gt;Hi everyone, I created this pokedex with Next.js + PokeAPI some time ago and would like to share it with you now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Louis3797/nextjs-pokedex"&gt;To the Github Repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x1rusWDk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nf4r6rhbf3t4j0u543y0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x1rusWDk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nf4r6rhbf3t4j0u543y0.png" alt="Screenshot 1" width="880" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a-Hlv2f2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nzsqwll8kgjcvm37ikr3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a-Hlv2f2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nzsqwll8kgjcvm37ikr3.png" alt="Screenshot 2" width="880" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Louis3797/nextjs-pokedex"&gt;To the Github Repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>javascript</category>
      <category>tailwindcss</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Next Level Github Readme</title>
      <dc:creator>Louis</dc:creator>
      <pubDate>Wed, 06 Apr 2022 12:38:35 +0000</pubDate>
      <link>https://dev.to/louis3797/next-level-github-readme-5dd2</link>
      <guid>https://dev.to/louis3797/next-level-github-readme-5dd2</guid>
      <description>&lt;p&gt;The readme file is often the first thing people see when they look at a repository. So it is important for the first impression. If the readme file is not present at all, people usually assume that the project is not really good. Also, people usually don't know how to use the project or what it even does.&lt;/p&gt;

&lt;p&gt;Especially with resume projects, a good and detailed readme should always be there! 🚀 &lt;/p&gt;

&lt;p&gt;To fight this problem, I created this readme template for myself and would like to share it with you.&lt;br&gt;
It is available as a template and so easy to use for your next project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Toz-qoRg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4x0h7sccwnsditd9f3ym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Toz-qoRg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4x0h7sccwnsditd9f3ym.png" alt="Use Template button" width="229" height="72"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please note that this template is very detailed and might be too extensive for some projects, so you might want to delete some sections.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Louis3797/awesome-readme-template"&gt;https://github.com/Louis3797/awesome-readme-template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pIfdb3ub--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqik18jshl3bpbhob0ii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pIfdb3ub--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqik18jshl3bpbhob0ii.png" alt="Table of Content" width="880" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Logo&lt;/li&gt;
&lt;li&gt;Badges from shields.io&lt;/li&gt;
&lt;li&gt;Emojis&lt;/li&gt;
&lt;li&gt;Contributor Images&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/Louis3797/awesome-readme-template"&gt;https://github.com/Louis3797/awesome-readme-template&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to use this in your projects and I hope this readme is helpful for some of you 😄.&lt;/p&gt;

</description>
      <category>readme</category>
      <category>github</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
    <item>
      <title>A Three.js 3D world with Character + Movements + Third Person Camera</title>
      <dc:creator>Louis</dc:creator>
      <pubDate>Mon, 04 Apr 2022 17:10:31 +0000</pubDate>
      <link>https://dev.to/louis3797/a-threejs-3d-world-with-character-movements-third-person-camera-325g</link>
      <guid>https://dev.to/louis3797/a-threejs-3d-world-with-character-movements-third-person-camera-325g</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgn8g9a97org7chjsq8b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjgn8g9a97org7chjsq8b.png" alt="Screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hey this is my first project with Three.js so im relatively new to this library. However, I want to show you what I built and maybe it will help one or the other.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Louis3797/r3f-world-with-character" rel="noopener noreferrer"&gt;GitHub Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that there are still some bugs or not included functions like object collision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Built with:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;react&lt;/li&gt;
&lt;li&gt;react-three-fiber&lt;/li&gt;
&lt;li&gt;react-three-drei&lt;/li&gt;
&lt;li&gt;three.js&lt;/li&gt;
&lt;li&gt;typescript&lt;/li&gt;
&lt;li&gt;simplex-noise&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;3D&lt;/li&gt;
&lt;li&gt;Nature Objects&lt;/li&gt;
&lt;li&gt;Simplex Noise Floor&lt;/li&gt;
&lt;li&gt;3D Character&lt;/li&gt;
&lt;li&gt;Animations: Idle, Walk, Run, Dance&lt;/li&gt;
&lt;li&gt;Movement with w, a, s, d&lt;/li&gt;
&lt;li&gt;Dance with e&lt;/li&gt;
&lt;li&gt;Third Person Camera&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/Louis3797" rel="noopener noreferrer"&gt;My GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>threejs</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
