<?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>Forem: Navidreza Abbaszadeh</title>
    <description>The latest articles on Forem by Navidreza Abbaszadeh (@navidrez).</description>
    <link>https://forem.com/navidrez</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%2F3451871%2F97b5a857-5573-4b61-9f6c-ab113318b59b.png</url>
      <title>Forem: Navidreza Abbaszadeh</title>
      <link>https://forem.com/navidrez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/navidrez"/>
    <language>en</language>
    <item>
      <title>This Week’s Achievements at FA (FrontAdvanced)</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Fri, 24 Oct 2025 08:18:11 +0000</pubDate>
      <link>https://forem.com/navidrez/this-weeks-achievements-at-fa-frontadvanced-1gaa</link>
      <guid>https://forem.com/navidrez/this-weeks-achievements-at-fa-frontadvanced-1gaa</guid>
      <description>&lt;p&gt;Another exciting week for FA (FrontAdvanced), our open-source learning platform built by frontend developers, for frontend developers.&lt;/p&gt;

&lt;p&gt;Our small but mighty team of international contributors has been hard at work pushing the boundaries of what a modern, community-driven platform can look like. Here's what we accomplished this week:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Authentication Pages, Designed &amp;amp; Implemented in Next.js&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We kicked off the week by crafting clean, user-friendly authentication pages. From smooth sign-in flows to an elegant sign-up experience, our goal was to make onboarding effortless while keeping performance and accessibility in check.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Topics Page, A New Way to Explore&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, we designed and structured the Topics Page, where learners can browse through the full range of FA courses. It’s intuitive, visually clear, and lays the groundwork for how users will navigate through learning paths in the future.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Topic Detail Page, Going Deeper&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally, we brought the Topic Detail Page to life. Each topic now has its own dedicated space, a focused, distraction-free environment where learners can dive deep into advanced frontend concepts and techniques.&lt;/p&gt;

&lt;p&gt;Each step brings us closer to our vision: a community-powered space where developers can grow, share, and master modern frontend development together.&lt;/p&gt;

&lt;p&gt;Huge thanks to our amazing contributors from around the world who make this possible every week.&lt;/p&gt;

&lt;p&gt;If you’re a web designer who loves creating beautiful and intuitive UIs, we’d love to have you join us.&lt;br&gt;
Comment FA or reach out, let’s build something awesome together.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>frontend</category>
      <category>systemdesign</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Automate Your API Docs Like a Pro with @nestjs/swagger</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Tue, 14 Oct 2025 17:23:52 +0000</pubDate>
      <link>https://forem.com/navidrez/automate-your-api-docs-like-a-pro-with-nestjsswagger-4j1j</link>
      <guid>https://forem.com/navidrez/automate-your-api-docs-like-a-pro-with-nestjsswagger-4j1j</guid>
      <description>&lt;h1&gt;
  
  
  Automate Your API Docs Like a Pro with &lt;code&gt;@nestjs/swagger&lt;/code&gt;
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Ever shipped an API and &lt;em&gt;forgot to write the docs&lt;/em&gt;?&lt;br&gt;
You’re not alone. Documentation is often the most &lt;em&gt;painful&lt;/em&gt; part of backend development, yet the most essential one.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you’re using &lt;strong&gt;NestJS&lt;/strong&gt;, you already know how beautifully it structures your backend. But did you know you can &lt;strong&gt;generate Swagger documentation automatically&lt;/strong&gt; with almost zero extra work?&lt;/p&gt;

&lt;p&gt;Today, let’s dive into how you can use &lt;code&gt;@nestjs/swagger&lt;/code&gt; to turn your NestJS code into interactive API docs, instantly.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Swagger?
&lt;/h2&gt;

&lt;p&gt;Swagger (a.k.a. OpenAPI) isn’t just a “fancy UI”, it’s a &lt;strong&gt;machine-readable&lt;/strong&gt; format for describing APIs.&lt;br&gt;
That means tools, teams, and clients can understand your endpoints without reading your source code.&lt;/p&gt;

&lt;p&gt;With Swagger you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto-generate docs with examples&lt;/li&gt;
&lt;li&gt;Test your endpoints live in the browser&lt;/li&gt;
&lt;li&gt;Share a single URL for both frontend devs and clients&lt;/li&gt;
&lt;li&gt;Generate SDKs or clients in other languages (via OpenAPI generators)&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Setting Up &lt;code&gt;@nestjs/swagger&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Let’s jump straight into it.&lt;/p&gt;

&lt;p&gt;Install the package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save&lt;/span&gt; @nestjs/swagger swagger-ui-express
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then open your &lt;code&gt;main.ts&lt;/code&gt; (the bootstrap file of your app) and add this snippet:&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NestFactory&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nestjs/core&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;AppModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./app.module&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DocumentBuilder&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;SwaggerModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nestjs/swagger&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;bootstrap&lt;/span&gt;&lt;span class="p"&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="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;NestFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;AppModule&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;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DocumentBuilder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Awesome API&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="nf"&gt;setDescription&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The API documentation for my awesome NestJS app&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="nf"&gt;setVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;1.0&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="nf"&gt;addBearerAuth&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;SwaggerModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createDocument&lt;/span&gt;&lt;span class="p"&gt;(&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;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;SwaggerModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;api&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;listen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;bootstrap&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.&lt;br&gt;
Now, run your app and head to: &lt;strong&gt;&lt;a href="http://localhost:3000/api" rel="noopener noreferrer"&gt;http://localhost:3000/api&lt;/a&gt;&lt;/strong&gt;, boom, you’ve got a fully interactive Swagger UI.&lt;/p&gt;


&lt;h2&gt;
  
  
  Automating Swagger Decorators
&lt;/h2&gt;

&lt;p&gt;Manually writing DTO decorators can get repetitive.&lt;br&gt;
Here’s where &lt;code&gt;@nestjs/swagger&lt;/code&gt; really shines, it reads &lt;strong&gt;metadata from your TypeScript types and decorators&lt;/strong&gt;, automatically generating docs.&lt;/p&gt;

&lt;p&gt;Example:&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ApiProperty&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nestjs/swagger&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;CreateUserDto&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;ApiProperty&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;example&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;john@example.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User email&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;ApiProperty&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;example&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;John Doe&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Full name of the user&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&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;Then, in your controller:&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Controller&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Post&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Body&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nestjs/common&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ApiTags&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ApiResponse&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@nestjs/swagger&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;CreateUserDto&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./create-user.dto&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="nd"&gt;ApiTags&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;users&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="nd"&gt;Controller&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;users&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UsersController&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;Post&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;ApiResponse&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;201&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User created successfully.&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="nf"&gt;createUser&lt;/span&gt;&lt;span class="p"&gt;(@&lt;/span&gt;&lt;span class="nd"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="nx"&gt;dto&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;CreateUserDto&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;User created!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;dto&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;&lt;strong&gt;Swagger now automatically understands&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Request body&lt;/li&gt;
&lt;li&gt;Tags&lt;/li&gt;
&lt;li&gt;Response types&lt;/li&gt;
&lt;li&gt;HTTP codes&lt;/li&gt;
&lt;li&gt;Auth methods&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All from your code.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pro Tip: Auto-generate Swagger JSON
&lt;/h2&gt;

&lt;p&gt;Want to &lt;strong&gt;automate everything&lt;/strong&gt;, even your CI/CD pipeline?&lt;/p&gt;

&lt;p&gt;You can export your OpenAPI JSON file directly:&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="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;writeFileSync&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fs&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="nb"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;SwaggerModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createDocument&lt;/span&gt;&lt;span class="p"&gt;(&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;config&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;writeFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./swagger-spec.json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your CI can upload &lt;code&gt;swagger-spec.json&lt;/code&gt; to tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Postman&lt;/li&gt;
&lt;li&gt;Stoplight&lt;/li&gt;
&lt;li&gt;SwaggerHub&lt;/li&gt;
&lt;li&gt;Redocly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Boom, &lt;strong&gt;fully automated documentation&lt;/strong&gt; that updates whenever your code does.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bonus: Customizing Swagger UI
&lt;/h2&gt;

&lt;p&gt;You can enhance your Swagger UI experience with extra options:&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="nx"&gt;SwaggerModule&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;docs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;swaggerOptions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;persistAuthorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;docExpansion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;none&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="na"&gt;customSiteTitle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;My Awesome API Docs&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This small touch makes your docs feel more professional and branded.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Install &lt;code&gt;@nestjs/swagger&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Configure Swagger in &lt;code&gt;main.ts&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Use decorators in DTOs &amp;amp; Controllers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Optionally export &lt;code&gt;swagger-spec.json&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Automate updates via CI/CD&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Documentation doesn’t have to be painful, with &lt;code&gt;@nestjs/swagger&lt;/code&gt;, it’s &lt;strong&gt;automated&lt;/strong&gt;, &lt;strong&gt;beautiful&lt;/strong&gt;, and &lt;strong&gt;always up to date&lt;/strong&gt; with your code.&lt;/p&gt;

&lt;p&gt;Start using it today and make your API feel &lt;em&gt;enterprise-ready&lt;/em&gt; with minimal effort.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Your turn:&lt;/strong&gt;&lt;br&gt;
Have you tried automating API docs in your NestJS project?&lt;br&gt;
Drop your favorite Swagger tips in the comments below!&lt;/p&gt;

&lt;p&gt;And if you found this post helpful,&lt;br&gt;
&lt;strong&gt;follow me on &lt;a href="https://dev.to/navidrez"&gt;Dev.to&lt;/a&gt;&lt;/strong&gt; for fullstack development guides!&lt;/p&gt;

</description>
      <category>automation</category>
      <category>typescript</category>
      <category>api</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>JWT vs OAuth 1.0 vs OAuth 2.0, What’s the Difference and When to Use Each?</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Tue, 07 Oct 2025 18:12:39 +0000</pubDate>
      <link>https://forem.com/navidrez/jwt-vs-oauth-10-vs-oauth-20-whats-the-difference-and-when-to-use-each-3pl3</link>
      <guid>https://forem.com/navidrez/jwt-vs-oauth-10-vs-oauth-20-whats-the-difference-and-when-to-use-each-3pl3</guid>
      <description>&lt;p&gt;JWT vs OAuth 1.0 vs OAuth 2.0, What’s the Difference and When to Use Each?&lt;/p&gt;

&lt;p&gt;In modern web development, authentication and authorization are critical. Whether you’re building a full-stack app, an API, or a SaaS product, chances are, you’ll deal with tokens, headers, and access flows at some point.&lt;/p&gt;

&lt;p&gt;Yet, terms like &lt;strong&gt;JWT&lt;/strong&gt;, &lt;strong&gt;OAuth 1.0&lt;/strong&gt;, and &lt;strong&gt;OAuth 2.0&lt;/strong&gt; are often thrown around interchangeably, even though they solve &lt;em&gt;different problems&lt;/em&gt; in &lt;em&gt;different ways&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Let’s break them down clearly, compare them, and decide &lt;strong&gt;when to use which&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. JWT (JSON Web Token)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;JWT&lt;/strong&gt; stands for &lt;strong&gt;JSON Web Token&lt;/strong&gt;, a compact, URL-safe token format used to securely transmit data between parties.&lt;/p&gt;

&lt;p&gt;A JWT looks something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;xxxxx.yyyyy.zzzzz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has &lt;strong&gt;three parts&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Header&lt;/strong&gt; – specifies the algorithm and token type.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payload&lt;/strong&gt; – contains the data (claims) like user ID, roles, and expiration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signature&lt;/strong&gt; – ensures the token wasn’t tampered with.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example payload:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"sub"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1234567890"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"John Doe"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"admin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"exp"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1735765200&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When a user logs in, the server issues a JWT signed with a secret key. The client stores it (usually in localStorage or cookies) and sends it with every request. The server then verifies it without needing a session store , &lt;strong&gt;stateless authentication&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stateless, no server-side session storage.&lt;/li&gt;
&lt;li&gt;Portable, easy to use across services or APIs.&lt;/li&gt;
&lt;li&gt;Widely supported in modern frameworks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hard to revoke before expiry (unless using a token blacklist).&lt;/li&gt;
&lt;li&gt;If compromised, the attacker can access resources until it expires.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use JWT when:&lt;/strong&gt;&lt;br&gt;
You need &lt;strong&gt;stateless API authentication&lt;/strong&gt;, especially for &lt;strong&gt;SPAs&lt;/strong&gt;, &lt;strong&gt;mobile apps&lt;/strong&gt;, or &lt;strong&gt;microservices&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. OAuth 1.0
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;OAuth 1.0&lt;/strong&gt; is an &lt;em&gt;authorization protocol&lt;/em&gt; designed to let users grant third-party applications access to their data, &lt;strong&gt;without sharing passwords&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of how you “Sign in with Twitter” or let an app access your Google Calendar. OAuth makes this possible securely.&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;OAuth 1.0&lt;/strong&gt;, the process is &lt;em&gt;signature-based&lt;/em&gt;.&lt;br&gt;
Each request is signed using a &lt;strong&gt;consumer secret&lt;/strong&gt;, &lt;strong&gt;token secret&lt;/strong&gt;, and &lt;strong&gt;cryptographic algorithms&lt;/strong&gt; (like HMAC-SHA1).&lt;/p&gt;

&lt;p&gt;This ensures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requests can’t be tampered with.&lt;/li&gt;
&lt;li&gt;The client never sees your password.&lt;/li&gt;
&lt;li&gt;Data exchange is safe, even without HTTPS (though HTTPS is still preferred).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Very secure (since every request is signed).&lt;/li&gt;
&lt;li&gt;Doesn’t require HTTPS for integrity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Complex to implement.&lt;/li&gt;
&lt;li&gt;Harder to debug (due to signature generation).&lt;/li&gt;
&lt;li&gt;Superseded by OAuth 2.0 in most modern systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use OAuth 1.0 when:&lt;/strong&gt;&lt;br&gt;
You’re working with legacy systems or APIs that still support it (like older Twitter APIs).&lt;br&gt;
Otherwise, it’s better to use &lt;strong&gt;OAuth 2.0&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. OAuth 2.0
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;OAuth 2.0&lt;/strong&gt; is the modern, simplified successor to OAuth 1.0, designed to make authorization easier and more flexible.&lt;/p&gt;

&lt;p&gt;It allows a user to give third-party apps &lt;em&gt;limited&lt;/em&gt; access to their resources on another service (like Google, GitHub, Spotify, etc.), without revealing their credentials.&lt;/p&gt;

&lt;p&gt;Instead of signing every request, &lt;strong&gt;OAuth 2.0 uses tokens&lt;/strong&gt;, typically &lt;strong&gt;Bearer Tokens&lt;/strong&gt; (often JWTs).&lt;/p&gt;

&lt;h3&gt;
  
  
  How It Works
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The user logs in with a provider (like Google).&lt;/li&gt;
&lt;li&gt;The provider gives the app an &lt;strong&gt;access token&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The app uses that token to access resources on behalf of the user.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  OAuth 2.0 Flows
&lt;/h3&gt;

&lt;p&gt;Depending on your app type, you can choose from several flows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authorization Code Flow&lt;/strong&gt; (for web apps)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implicit Flow&lt;/strong&gt; (for SPAs)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Client Credentials Flow&lt;/strong&gt; (for machine-to-machine)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password Flow&lt;/strong&gt; (legacy, not recommended)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easier to use than OAuth 1.0.&lt;/li&gt;
&lt;li&gt;More flexible (works for web, mobile, server apps).&lt;/li&gt;
&lt;li&gt;Widely adopted, supported by Google, GitHub, Facebook, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Relies on HTTPS for security.&lt;/li&gt;
&lt;li&gt;Implementation details differ per provider.&lt;/li&gt;
&lt;li&gt;Can get complex when combining with OpenID Connect (for authentication).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use OAuth 2.0 when:&lt;/strong&gt;&lt;br&gt;
You need &lt;strong&gt;third-party authorization&lt;/strong&gt;, &lt;strong&gt;SSO (Single Sign-On)&lt;/strong&gt;, or &lt;strong&gt;secure access delegation&lt;/strong&gt;, e.g., “Login with Google” or API access for external clients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparison Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;JWT&lt;/th&gt;
&lt;th&gt;OAuth 1.0&lt;/th&gt;
&lt;th&gt;OAuth 2.0&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;Authorization&lt;/td&gt;
&lt;td&gt;Authorization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Token Type&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Self-contained JWT&lt;/td&gt;
&lt;td&gt;Signature-based tokens&lt;/td&gt;
&lt;td&gt;Bearer or JWT tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Security Method&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Signed with secret/public key&lt;/td&gt;
&lt;td&gt;Signed per request&lt;/td&gt;
&lt;td&gt;HTTPS + tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Use Case&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stateless user sessions&lt;/td&gt;
&lt;td&gt;Legacy APIs&lt;/td&gt;
&lt;td&gt;Modern APIs, SSO&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Ease of Implementation&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Simple&lt;/td&gt;
&lt;td&gt;Complex&lt;/td&gt;
&lt;td&gt;Moderate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Statefulness&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Stateless&lt;/td&gt;
&lt;td&gt;Stateful&lt;/td&gt;
&lt;td&gt;Can be both&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Modern Usage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Very common&lt;/td&gt;
&lt;td&gt;Rare&lt;/td&gt;
&lt;td&gt;Standard&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  When to Use Which?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;JWT:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;authenticating users in your own API&lt;/strong&gt; (no third-party app involved).
Example: Your frontend logs in users and stores a JWT to call your backend.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;OAuth 1.0:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;legacy systems&lt;/strong&gt; that still rely on it.
Example: Older APIs like pre-2020 Twitter integrations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;OAuth 2.0:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For &lt;strong&gt;third-party access&lt;/strong&gt; or &lt;strong&gt;SSO&lt;/strong&gt; scenarios.
Example: “Sign in with Google” or letting a third-party app access your API.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In short:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JWT&lt;/strong&gt; = token format for &lt;em&gt;authentication&lt;/em&gt; (who you are).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OAuth&lt;/strong&gt; = &lt;em&gt;authorization&lt;/em&gt; framework (what you can do).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OAuth 2.0&lt;/strong&gt; often &lt;em&gt;uses JWTs&lt;/em&gt; internally, so they’re not competitors, but &lt;em&gt;complementary technologies.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding these helps you design secure systems that protect users and scale with confidence &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What about you?&lt;/strong&gt;&lt;br&gt;
Have you implemented any of these in your projects? Which one do you find easiest or most confusing? Let’s discuss in the comments &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>architecture</category>
      <category>security</category>
    </item>
    <item>
      <title>Event Sourcing &amp; CQRS Explained</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Sun, 21 Sep 2025 17:22:12 +0000</pubDate>
      <link>https://forem.com/navidrez/event-sourcing-cqrs-explained-3jgm</link>
      <guid>https://forem.com/navidrez/event-sourcing-cqrs-explained-3jgm</guid>
      <description>&lt;p&gt;As applications grow, the traditional request/response (req/res) model starts showing cracks.&lt;/p&gt;

&lt;p&gt;With two services (A -&amp;gt; B), things are simple: one service calls the other and gets a response.&lt;/p&gt;

&lt;p&gt;But as soon as more services (C, D, …) join in, the complexity explodes. Instead of just a couple of connections, you now face a web of dependencies where every service potentially talks to every other service.&lt;/p&gt;

&lt;p&gt;This is where event-driven architecture (EDA) patterns like Event Sourcing and CQRS come to the rescue.&lt;/p&gt;

&lt;p&gt;What’s an Event?&lt;/p&gt;

&lt;p&gt;An event is just a signal that something significant has happened.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;OrderPlaced -&amp;gt; when a customer creates a new order&lt;/p&gt;

&lt;p&gt;StockDecreased -&amp;gt; when inventory updates after the order&lt;/p&gt;

&lt;p&gt;Main Components of EDA:&lt;/p&gt;

&lt;p&gt;Producers: Services that generate events (e.g., OrderService)&lt;/p&gt;

&lt;p&gt;Consumers: Services that react to events (e.g., InventoryService)&lt;/p&gt;

&lt;p&gt;What is Event Sourcing?&lt;/p&gt;

&lt;p&gt;Normally, systems just store the latest state of data.&lt;/p&gt;

&lt;p&gt;But with Event Sourcing, instead of saving only the current state, we store all the events that happened to reach that state.&lt;/p&gt;

&lt;p&gt;Think of it as a ledger of every change.&lt;/p&gt;

&lt;p&gt;Example: Bank Account&lt;/p&gt;

&lt;p&gt;AccountOpened (Initial Balance: $0)&lt;/p&gt;

&lt;p&gt;DepositMade (Amount: $350)&lt;/p&gt;

&lt;p&gt;WithdrawalMade (Amount: $300)&lt;/p&gt;

&lt;p&gt;Current State -&amp;gt; Balance: $50&lt;/p&gt;

&lt;p&gt;Instead of just storing “Balance = $50,” we store the entire history of events.&lt;/p&gt;

&lt;p&gt;Benefits&lt;/p&gt;

&lt;p&gt;Audit Trail: Full history of changes is always available.&lt;br&gt;
Rebuild State Anytime: You can replay events to rebuild the current state.&lt;/p&gt;

&lt;p&gt;Problem&lt;/p&gt;

&lt;p&gt;Replaying every single event from the beginning can be slow and inefficient.&lt;/p&gt;

&lt;p&gt;How Do We Solve This?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Hydration &amp;amp; Replay&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hydration: Rebuilding the current state by applying all events in order.&lt;/p&gt;

&lt;p&gt;Replay: Reprocessing the entire event stream (or large parts of it) to recompute the current state.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Snapshots (Sourcing Optimization)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Instead of replaying every event since the beginning of time:&lt;/p&gt;

&lt;p&gt;Periodically capture the current state as a snapshot (e.g., every 100 events).&lt;/p&gt;

&lt;p&gt;To rebuild, load the latest snapshot and apply only the events that happened afterward.&lt;/p&gt;

&lt;p&gt;This dramatically improves performance.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Materialized Views&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For read-heavy systems, we often maintain pre-computed, query-optimized views of the current state in a separate database.&lt;/p&gt;

&lt;p&gt;Think of it like a cached read model.&lt;/p&gt;

&lt;p&gt;Producers keep emitting events, and consumers build these views in real-time.&lt;/p&gt;

&lt;p&gt;CQRS (Command Query Responsibility Segregation)&lt;/p&gt;

&lt;p&gt;Traditional systems use the same model for:&lt;/p&gt;

&lt;p&gt;Commands (writes) -&amp;gt; change the system state&lt;/p&gt;

&lt;p&gt;Queries (reads) -&amp;gt; retrieve system state&lt;/p&gt;

&lt;p&gt;CQRS separates these responsibilities:&lt;/p&gt;

&lt;p&gt;Command Side: Handles writes, stores events.&lt;/p&gt;

&lt;p&gt;Query Side: Builds materialized views optimized for reads.&lt;/p&gt;

&lt;p&gt;This separation makes systems more scalable, maintainable, and flexible.&lt;/p&gt;

&lt;p&gt;Putting It All Together&lt;/p&gt;

&lt;p&gt;Events capture what happened.&lt;/p&gt;

&lt;p&gt;Event Sourcing stores the full history, not just the current state.&lt;/p&gt;

&lt;p&gt;Snapshots &amp;amp; Hydration make it efficient to rebuild state.&lt;/p&gt;

&lt;p&gt;Materialized Views provide fast access to the current state.&lt;/p&gt;

&lt;p&gt;CQRS separates the write model (commands &amp;amp; events) from the read model (queries &amp;amp; views).&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>cqrs</category>
      <category>eventsourcing</category>
      <category>architecture</category>
    </item>
    <item>
      <title>I Cloned Jira Task Manager Here's How:</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Fri, 19 Sep 2025 18:09:52 +0000</pubDate>
      <link>https://forem.com/navidrez/i-cloned-jira-task-manager-heres-how-32dm</link>
      <guid>https://forem.com/navidrez/i-cloned-jira-task-manager-heres-how-32dm</guid>
      <description>&lt;p&gt;Last month the idea of starting a light side-project came up.&lt;br&gt;
While exploring options, a late-night review of tasks in Jira sparked a thought: “Why not clone this?”&lt;/p&gt;

&lt;p&gt;That’s when the decision was made, &lt;br&gt;
to build a “Jira Task Manager” clone.&lt;/p&gt;

&lt;p&gt;I set up project using Next.js 15 (app router) + Tailwindcss, Typescript.&lt;/p&gt;

&lt;p&gt;First I started creating authentication flow:&lt;br&gt;
&lt;a href="https://media2.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%2Ffpi1tld8xjl51hzyzo31.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffpi1tld8xjl51hzyzo31.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
Technology used: Supabase Auth - ShadCn Auth Block&lt;/p&gt;

&lt;p&gt;Then home page, overview of tasks &amp;amp; projects:&lt;br&gt;
&lt;a href="https://media2.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%2F0kj2e7wog39cjqdvkjkd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F0kj2e7wog39cjqdvkjkd.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
Tailwindcss + Prisma (Server side data fetching)&lt;/p&gt;

&lt;p&gt;Third, I created members page, so other users can join the workspace:&lt;br&gt;
&lt;a href="https://media2.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%2Fug9n0y4qa4bnk4gt5495.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fug9n0y4qa4bnk4gt5495.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that, project list:&lt;br&gt;
&lt;a href="https://media2.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%2Fx9lvbgkm10gm4ie3az8h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fx9lvbgkm10gm4ie3az8h.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then tasks view in 3 mode, table, board, calendar:&lt;br&gt;
&lt;a href="https://media2.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%2F1wl9v0bzs0755fq1phif.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F1wl9v0bzs0755fq1phif.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
Table view&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F0w9e7ixedpm0ba5v4cyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F0w9e7ixedpm0ba5v4cyg.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
Board view: @hello-pangea/dnd&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fq5desg5gdj3r2o5rf5ve.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fq5desg5gdj3r2o5rf5ve.png" alt=" " width="800" height="454"&gt;&lt;/a&gt;&lt;br&gt;
&amp;amp; calendar view: react-big-calendar&lt;/p&gt;

&lt;p&gt;Hope you guys enjoyed this article!&lt;br&gt;
See you next time!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>fullstack</category>
      <category>frontend</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Learn how I turned my content creation struggles into a powerful AI tool for SaaS founders.</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Thu, 18 Sep 2025 11:53:49 +0000</pubDate>
      <link>https://forem.com/navidrez/learn-how-i-turned-my-content-creation-struggles-into-a-powerful-ai-tool-for-saas-founders-7d5</link>
      <guid>https://forem.com/navidrez/learn-how-i-turned-my-content-creation-struggles-into-a-powerful-ai-tool-for-saas-founders-7d5</guid>
      <description>&lt;p&gt;HookAI, The Complete AI Hook Builder&lt;br&gt;
Create scroll-stopping hooks for any type of content, on any platform, in any tone.&lt;/p&gt;

&lt;p&gt;Whether you’re writing a tweet, LinkedIn post, YouTube title, or Instagram caption, HookAI generates multiple high-converting variations tailored to your niche and audience.&lt;/p&gt;

&lt;p&gt;Why HookAI?&lt;/p&gt;

&lt;p&gt;Platform-aware: Optimized hooks for Twitter, LinkedIn, TikTok, IG, or blogs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tone-flexible: From casual &amp;amp; fun to professional &amp;amp; persuasive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save hours: No more staring at a blank screen.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Boost engagement: Hooks that trigger curiosity and clicks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stop wasting time on weak intros. Let HookAI build the perfect hook, every time.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We’ve all been there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Staring at a blank screen, trying to come up with a catchy opening.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Writing a tweet, YouTube title, or blog post intro… only to realize it’s flat.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Losing engagement because the first line didn’t grab attention.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In 2025, content is crowded. If your hook doesn’t grab, your content gets ignored.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Solution: HookAI&lt;/p&gt;

&lt;p&gt;That’s why we built HookAI, a complete AI hook builder for creators, marketers, and businesses.&lt;/p&gt;

&lt;p&gt;With HookAI, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Generate multiple hook variations for the same content.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Customize tone: casual, persuasive, storytelling, professional, witty.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimize for any platform: Twitter, LinkedIn, TikTok, Instagram, YouTube, blogs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Save hours of creative struggle and focus on delivering real value.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How It Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ft2b5tcxmo1tat9i0r7s8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ft2b5tcxmo1tat9i0r7s8.png" alt=" " width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Paste your idea, content, or headline.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Choose platform + tone + count + topic + audience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get a set of AI-generated hooks ready to use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pick the one you like, or regenerate until it clicks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ffk5b7oltbib57komgc2y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ffk5b7oltbib57komgc2y.png" alt=" " width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why It Matters&lt;/p&gt;

&lt;p&gt;For creators: Stand out on crowded platforms.&lt;/p&gt;

&lt;p&gt;For startups: Craft persuasive landing page intros.&lt;/p&gt;

&lt;p&gt;For marketers: A/B test multiple hooks instantly.&lt;/p&gt;

&lt;p&gt;Let me know your feedback on this!&lt;/p&gt;

</description>
      <category>contentwriting</category>
      <category>saas</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>When a node crashes, how does it catch up with the cluster? That’s where Raft shines.</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Wed, 17 Sep 2025 18:10:46 +0000</pubDate>
      <link>https://forem.com/navidrez/when-a-node-crashes-how-does-it-catch-up-with-the-cluster-thats-where-raft-shines-9ii</link>
      <guid>https://forem.com/navidrez/when-a-node-crashes-how-does-it-catch-up-with-the-cluster-thats-where-raft-shines-9ii</guid>
      <description>&lt;p&gt;Understanding Raft: How Nodes Stay in Sync After Crashes&lt;/p&gt;

&lt;p&gt;In leader election systems, when one node goes down but the majority remain up, the leader can continue accepting and contributing new data.&lt;/p&gt;

&lt;p&gt;Example setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node0 (leader) --- node1 (follower) --- node2 (follower) --- node3 (follower)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now imagine node3 crashes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node0 (leader) --- node1 (follower) --- node2 (follower) --- node3 (crashed)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We see an error:&lt;/p&gt;

&lt;p&gt;err: node3 is down&lt;/p&gt;

&lt;p&gt;But that’s fine. As long as a majority of nodes (2 out of 3 followers) are still alive, the cluster continues contributing new data.&lt;/p&gt;

&lt;p&gt;Recovery scenario&lt;/p&gt;

&lt;p&gt;Let’s assume node3 comes back after five minutes.&lt;br&gt;
During its downtime, three new contributions happened.&lt;/p&gt;

&lt;p&gt;So what happens to node3 when it rejoins?&lt;/p&gt;

&lt;p&gt;Is it up to date?&lt;/p&gt;

&lt;p&gt;Obviously not, it’s missing those 3 contributions.&lt;/p&gt;

&lt;p&gt;The question is: how does node3 catch up with the rest of the cluster?&lt;/p&gt;

&lt;p&gt;The answer: Raft’s log replication&lt;/p&gt;

&lt;p&gt;Each contribution in Raft is stored in a log entry.&lt;/p&gt;

&lt;p&gt;i = log index&lt;/p&gt;

&lt;p&gt;t = term&lt;/p&gt;

&lt;p&gt;Before the crash&lt;br&gt;
i = 1, t = 1  |  i = 1, t = 1  |  i = 1, t = 1  |  i = 1, t = 1&lt;br&gt;
i = 2, t = 1  |  i = 2, t = 1  |  i = 2, t = 1  |  i = 2, t = 1&lt;/p&gt;

&lt;p&gt;After 3 new contributions&lt;br&gt;
i = 1, t = 1  |  i = 1, t = 1  |  i = 1, t = 1  |  i = 1, t = 1&lt;br&gt;
i = 2, t = 1  |  i = 2, t = 1  |  i = 2, t = 1  |  i = 2, t = 1&lt;br&gt;
i = 3, t = 1  |  i = 3, t = 1  |  i = 3, t = 1&lt;br&gt;
i = 4, t = 1  |  i = 4, t = 1  |  i = 4, t = 1&lt;br&gt;
i = 5, t = 1  |  i = 5, t = 1  |  i = 5, t = 1&lt;/p&gt;

&lt;p&gt;Now the logs are inconsistent. That’s not what we want.&lt;/p&gt;

&lt;p&gt;How Raft fixes it&lt;/p&gt;

&lt;p&gt;When the leader sends the next log entry (say, i = 6), node3 pushes back:&lt;/p&gt;

&lt;p&gt;“Hey! My last index is 2, but you’re sending me index 6. Not acceptable!”&lt;/p&gt;

&lt;p&gt;The leader responds:&lt;/p&gt;

&lt;p&gt;“Ok, here’s the previous entry (i = 5).”&lt;/p&gt;

&lt;p&gt;But node3 complains again:&lt;/p&gt;

&lt;p&gt;“Wait… I only have index 2!”&lt;/p&gt;

&lt;p&gt;This back-and-forth continues until node3 receives a log entry with a matching previous index (i = 2).&lt;/p&gt;

&lt;p&gt;At that point, node3 accepts the next entries (i = 3, 4, 5, 6…) and catches up with the cluster.&lt;/p&gt;

&lt;p&gt;That’s Raft in action&lt;/p&gt;

&lt;p&gt;This process of syncing logs is how Raft ensures consistency across nodes, even when one crashes and comes back later.&lt;/p&gt;

&lt;p&gt;So in short:&lt;/p&gt;

&lt;p&gt;Raft uses logs to track contributions.&lt;/p&gt;

&lt;p&gt;When a node rejoins, the leader resends missing entries.&lt;/p&gt;

&lt;p&gt;The follower rejects mismatched logs until it finds the last known consistent entry.&lt;/p&gt;

&lt;p&gt;From there, it accepts new data and gets fully up to date.&lt;/p&gt;

&lt;p&gt;Hope you found this insightful!&lt;br&gt;
If so, leave a like and comment your thoughts below.&lt;/p&gt;

</description>
      <category>database</category>
      <category>backend</category>
      <category>cloud</category>
      <category>distributedsystems</category>
    </item>
    <item>
      <title>Here’s how far I’ve come after 7 days of grinding on system design.</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Tue, 16 Sep 2025 13:46:04 +0000</pubDate>
      <link>https://forem.com/navidrez/heres-how-far-ive-come-after-7-days-of-grinding-on-system-design-55j3</link>
      <guid>https://forem.com/navidrez/heres-how-far-ive-come-after-7-days-of-grinding-on-system-design-55j3</guid>
      <description>&lt;p&gt;When you’re young, learning feels like an investment. That’s why I started expanding my knowledge in the world of software engineering and diving into system design!&lt;/p&gt;

&lt;p&gt;As a 15 y/o fullstack engineer, I’m trying to get ahead of most web developers by learning patterns and architectures that aren’t even taught in universities. And honestly, it feels really cool.&lt;/p&gt;

&lt;p&gt;YouTube is basically a complete online university. You can choose your own teachers and professors!&lt;/p&gt;

&lt;p&gt;So, I created a GitHub repo documenting my system design learning journey as a JS fullstack developer, covering everything from learning resources to cool projects.&lt;br&gt;
All in one repo: &lt;a href="https://github.com/Navidreza80/System_Design" rel="noopener noreferrer"&gt;https://github.com/Navidreza80/System_Design&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s what I’ve learned (and built) in just the last week:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scalability&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Latency vs Throughput&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;High Availability &amp;amp; Fault Tolerance&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SQL vs NoSQL&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Indexing, Sharding, Replication&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redis&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CDNs &amp;amp; Cache Eviction Policies&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DNS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;L4/L7 Load Balancing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Nginx &amp;amp; Reverse Proxies&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sounds cool, right? But I didn’t just sit around watching videos, I’ve actually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Designed systems&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implemented caching strategies&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modeled DB schemas&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&amp;amp; so much more!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s start learning together.&lt;/p&gt;

&lt;p&gt;I’d love to talk technical with you, so let’s connect:&lt;/p&gt;

&lt;p&gt;X: @Navidreza008&lt;br&gt;
Discord: @navidreza008&lt;/p&gt;

</description>
      <category>fullstack</category>
      <category>systemdesign</category>
      <category>softwareengineering</category>
      <category>webdev</category>
    </item>
    <item>
      <title>5 Coding Habits That Transformed Me Into a Better Software Engineer</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Mon, 15 Sep 2025 18:42:55 +0000</pubDate>
      <link>https://forem.com/navidrez/5-coding-habits-that-transformed-me-into-a-better-software-engineer-27ep</link>
      <guid>https://forem.com/navidrez/5-coding-habits-that-transformed-me-into-a-better-software-engineer-27ep</guid>
      <description>&lt;p&gt;&lt;strong&gt;Discover&lt;/strong&gt; the 5 essential coding habits that elevated my engineering skills from junior to senior level. Learn practical techniques for code reviews, testing, documentation, and continuous learning that will accelerate your career growth.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Checkout my latest blog here:
&lt;a href="https://navidrezaabbaszadeh.netlify.app/blogs/cmflgawj60001jr09zp2bg9qi" rel="noopener noreferrer"&gt;https://navidrezaabbaszadeh.netlify.app/blogs/cmflgawj60001jr09zp2bg9qi&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>fullstack</category>
      <category>javascript</category>
    </item>
    <item>
      <title>My Full-Stack Developer Toolkit After 4+ Years</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Sun, 14 Sep 2025 05:38:35 +0000</pubDate>
      <link>https://forem.com/navidrez/my-full-stack-developer-toolkit-after-4-years-3fb4</link>
      <guid>https://forem.com/navidrez/my-full-stack-developer-toolkit-after-4-years-3fb4</guid>
      <description>&lt;p&gt;I wrote my first line of code in Notepad++, that simple "Hello World" made me feel like a superhero!&lt;br&gt;
Today, we describe what we want and AI delivers it in minutes. The landscape has changed dramatically, but the core tools that make us productive remain crucial.&lt;br&gt;
After 4+ years of building everything from MVPs to production apps, here's my battle-tested toolkit as of September 2025:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Code Editor&lt;/strong&gt;
VS Code (Yes, not Cursor!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lightweight and incredibly productive&lt;br&gt;
Perfect balance of features without bloat&lt;br&gt;
Muscle memory built over years of use&lt;br&gt;
Extensions ecosystem is unmatched&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Debug &amp;amp; Dev Tools&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Lighthouse: Performance measurement and optimization&lt;br&gt;
Postman: API testing and documentation&lt;br&gt;
Figma: Design collaboration and prototyping&lt;br&gt;
Expo Tools: Mobile app development and testing&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Essential Extensions&lt;/strong&gt;
The VS Code extensions that supercharge my workflow:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Auto Close Tag: Saves countless keystrokes&lt;br&gt;
Auto Complete Tag: HTML/JSX completion&lt;br&gt;
Auto Import: TypeScript/JavaScript imports&lt;br&gt;
Code Spell Checker: Catches typos in comments/strings&lt;br&gt;
ES7+ React/Redux/React-Native snippets: Rapid component creation&lt;br&gt;
ESLint: Code quality and consistency&lt;br&gt;
JavaScript (ES6) code snippets: Vanilla JS productivity&lt;br&gt;
Material Icon Theme: Beautiful file icons&lt;br&gt;
Prettier: Consistent code formatting&lt;br&gt;
Prisma: Database schema management syntax check&lt;br&gt;
Tailwind CSS IntelliSense: CSS class autocomplete&lt;br&gt;
vscode-icons: Enhanced file explorer&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Frontend Frameworks&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next.js: The best of the best! Full-stack React with everything built-in&lt;br&gt;
Vite: Lightning-fast development experience&lt;br&gt;
Expo: React Native development made simple&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Backend Frameworks&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Express.js (or Fastify): Node.js APIs with speed and simplicity&lt;br&gt;
Nest.js: Enterprise-grade Node.js applications&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DBs&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Supabase: Postgres with real-time features and auth&lt;br&gt;
Neon: Serverless Postgres (my most used!)&lt;br&gt;
MongoDB: Document database for flexible schemas&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cloud &amp;amp; DevOps&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Docker: Containerization and consistent environments&lt;br&gt;
Cloudflare: CDN, DNS, and edge computing&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI &amp;amp; "Vibe Coding"&lt;/strong&gt;
The AI tools that have transformed my development process:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claude Sonnet 4: Scaling applications like a pro, complex architecture decisions&lt;br&gt;
ChatGPT-4: Creating MVPs and rapid prototyping&lt;br&gt;
DeepSeek: Enhancing app UX/UI with design insights&lt;br&gt;
Grok: Exploring new technologies and handling heavy computational tasks&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why This Stack Works&lt;/strong&gt;
Productivity First: Every tool is chosen for maximum efficiency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Modern but Stable: Cutting-edge features with production reliability&lt;/p&gt;

&lt;p&gt;AI-Enhanced: Leveraging AI without becoming dependent on it&lt;/p&gt;

&lt;p&gt;Full-Stack Ready: Seamless frontend-to-backend development flow&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Evolution&lt;/strong&gt;
From Notepad++ to AI-assisted development, the journey has been incredible! What hasn't changed is the importance of:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Solid fundamentals over trendy tools&lt;br&gt;
Performance over flashy features&lt;br&gt;
Developer experience that actually improves productivity&lt;br&gt;
Reliable tools that work when you need them&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What's Your Toolkit?&lt;/strong&gt;
I'm always curious about what other developers are using! Drop a comment with:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your favorite code editor and why&lt;br&gt;
Must-have VS Code extensions&lt;br&gt;
AI tools that have changed your workflow&lt;br&gt;
Any hidden gems I should try&lt;/p&gt;

&lt;p&gt;Let's learn from each other!&lt;/p&gt;

&lt;p&gt;What tools have transformed your development workflow in 2025? Share your setup below!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>fullstack</category>
      <category>javascript</category>
      <category>tooling</category>
    </item>
    <item>
      <title>Why I'm Starting to Share My Developer Journey</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Sat, 13 Sep 2025 17:59:21 +0000</pubDate>
      <link>https://forem.com/navidrez/why-im-starting-to-share-my-developer-journey-3lah</link>
      <guid>https://forem.com/navidrez/why-im-starting-to-share-my-developer-journey-3lah</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why I'm Starting to Share My Developer Journey&lt;/strong&gt;&lt;br&gt;
Four and a half years ago, I wrote my first line of HTML code. Today, I'm managing full-stack applications with complex API integrations, building real-time dashboards, and creating platforms that thousands of users interact with daily. Yet until now, I've kept most of my journey to myself.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;That changes &lt;strong&gt;today&lt;/strong&gt;.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;The Silent Developer&lt;/em&gt;&lt;br&gt;
Like many developers, I've been what I call a "silent contributor." I've built, I've solved problems, I've shipped features, &lt;strong&gt;but&lt;/strong&gt; I've rarely shared the how, the why, or the lessons learned along the way. I convinced myself that my code was my voice, and that should be enough.&lt;br&gt;
But here's what I've realized: knowledge shared is knowledge multiplied.&lt;br&gt;
What +4.5 Years Taught Me&lt;br&gt;
My journey has taken me through:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Building high-performance SPAs with Next.js that improved user engagements&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implementing trilingual React applications with seamless i18n integration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Creating real estate platforms with 3D visualizations and live mapping&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Setting up CI/CD pipelines that boosted team velocity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Integrating AI-powered features and real-time data processing&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each project taught me something new. Each challenge revealed a better way to approach problems. Each success came with lessons that could help other developers avoid the pitfalls I encountered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Share Now?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;To &lt;em&gt;Give Back to the Community&lt;/em&gt;&lt;br&gt;
The React, Next.js, and broader JavaScript communities have given me everything. From Stack Overflow answers that saved my projects, to open-source libraries that powered my applications. It's time to contribute back.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To &lt;em&gt;Connect with Fellow Developers&lt;/em&gt;&lt;br&gt;
Development can be isolating. By sharing my experiences, I hope to connect with other developers facing similar challenges, celebrating similar wins, and building amazing things.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To &lt;em&gt;Document My Growth&lt;/em&gt;&lt;br&gt;
There's something powerful about publicly committing to learning and sharing. This journey will push me to stay current with new technologies and to articulate my thoughts clearly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To &lt;em&gt;Help Others Skip My Mistakes&lt;/em&gt;&lt;br&gt;
I've made plenty of mistakes along the way. Poor architectural decisions, premature optimizations, choosing the wrong state management approach. If my stories can help one developer avoid these pitfalls, this effort is worthwhile.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What You Can &lt;strong&gt;Expect&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Going forward, I'll be sharing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical Deep Dives:&lt;/strong&gt; Real-world solutions to problems I've encountered with React, Next.js, TypeScript, and full-stack development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Breakdowns:&lt;/strong&gt; Behind-the-scenes looks at how I built applications, the decisions I made, and what I learned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance Insights:&lt;/strong&gt; Practical tips for optimizing React applications, API integrations, and user experience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Career Lessons:&lt;/strong&gt; Insights from working remotely, collaborating in Agile teams, and growing from junior to senior developer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool Reviews:&lt;/strong&gt; Honest assessments of libraries, frameworks, and development tools that have shaped my workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Platforms I'll Be On&lt;/strong&gt;&lt;br&gt;
You'll find me sharing across multiple platforms, each with its own flavor:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Dev.to &amp;amp; Personal Blog: Detailed technical articles and tutorials&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Twitter/X: Quick insights, tips, and community engagement&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Stack Overflow: Helping solve real problems developers face&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;YouTube: Video tutorials and coding sessions (coming soon!)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Indie Hackers: Discussing the business side of development&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Personal Note&lt;br&gt;
Starting this journey feels vulnerable. Putting yourself out there as a developer means opening yourself up to scrutiny, to questions you might not have answers to, to the possibility of being wrong publicly.&lt;br&gt;
But that vulnerability is also where growth happens. The best developers I know aren't those who never make mistakes, they're those who learn from them openly and help others do the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Join Me&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whether you're just starting your development journey, you're a seasoned pro, or you're somewhere in between, I'd love to have you along for this ride. Share your own experiences, ask questions, challenge my approaches, and let's learn from each other.&lt;/p&gt;

&lt;p&gt;The developer community is at its best when we're lifting each other up, sharing knowledge, and building amazing things together.&lt;br&gt;
Here's to the journey ahead.&lt;/p&gt;

&lt;p&gt;What's one lesson you wish you'd learned earlier in your developer journey? I'd love to hear from you in the comments below.&lt;br&gt;
Connect with me:&lt;/p&gt;

&lt;p&gt;Twitter: &lt;a href="https://x.com/Navidreza008" rel="noopener noreferrer"&gt;@Navidreza008&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/Navidreza80" rel="noopener noreferrer"&gt;https://github.com/Navidreza80&lt;/a&gt;&lt;br&gt;
Portfolio: &lt;a href="https://navidrezaabbaszadeh.netlify.app" rel="noopener noreferrer"&gt;https://navidrezaabbaszadeh.netlify.app&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  ReactJS #NextJS #FullStackDev #DeveloperJourney #WebDevelopment #JavaScript #Programming
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>My System Design Learning Journey!</title>
      <dc:creator>Navidreza Abbaszadeh</dc:creator>
      <pubDate>Wed, 10 Sep 2025 09:12:06 +0000</pubDate>
      <link>https://forem.com/navidrez/my-system-design-learning-journey-4cm9</link>
      <guid>https://forem.com/navidrez/my-system-design-learning-journey-4cm9</guid>
      <description>&lt;p&gt;What’s up everyone!&lt;/p&gt;

&lt;p&gt;I’ve just started my System Design learning journey and I’d love to share it with you so we can learn and grow together.&lt;/p&gt;

&lt;p&gt;I’ve created a repo to document everything:&lt;br&gt;
&lt;a href="https://github.com/Navidreza80/System-Design/blob/main/README.md" rel="noopener noreferrer"&gt;System Design Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here’s what you’ll find inside:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Roadmap, a clear path from beginner to advanced.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What to Learn + Resources, curated articles, docs, and YouTube videos.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Projects, practical system design implementations with links and images.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Weekly &amp;amp; Daily Plans, how I’m structuring my learning.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re also diving into system design or want to sharpen your skills, feel free to check it out, drop feedback, or even learn alongside me!&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>softwareengineering</category>
      <category>architecture</category>
      <category>fullstack</category>
    </item>
  </channel>
</rss>
