<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Mudassir Asghar — Blog</title>
  <subtitle>Articles about web development, Next.js, TypeScript, frontend engineering, and tech by Mudassir Asghar.</subtitle>
  <link href="https://mudassirasghar.dev/atom.xml" rel="self" type="application/atom+xml" />
  <link href="https://mudassirasghar.dev/blog" rel="alternate" type="text/html" />
  <updated>2026-07-27T00:00:00.000Z</updated>
  <id>https://mudassirasghar.dev/blog</id>
  <author>
    <name>Mudassir Asghar</name>
    <email>contact@mudassirasghar.dev</email>
  </author>
  <entry>
    <title><![CDATA[What I'd Tell Myself Before Learning to Code]]></title>
    <link href="https://mudassirasghar.dev/blog/what-id-tell-myself-before-learning-to-code" rel="alternate" type="text/html" />
    <id>https://mudassirasghar.dev/blog/what-id-tell-myself-before-learning-to-code</id>
    <updated>2026-07-27T00:00:00.000Z</updated>
    <published>2026-07-27T00:00:00.000Z</published>
    <summary><![CDATA[The myths, mistakes, and mindset shifts that separate people who learn to code from people who quit. Hard-won lessons from my first two years.]]></summary>
    <content type="html"><![CDATA[<div class="prose prose-lg prose-invert dark:prose max-w-none prose-headings:scroll-mt-28 prose-headings:font-bold prose-h1:text-3xl sm:prose-h1:text-4xl prose-h2:text-2xl sm:prose-h2:text-3xl prose-h3:text-xl sm:prose-h3:text-2xl prose-p:text-white/80 dark:prose-p:text-neutral-800/80 prose-p:leading-relaxed prose-p:my-5 prose-a:text-indigo-400 dark:prose-a:text-indigo-600 prose-a:no-underline hover:prose-a:underline prose-ul:my-4 prose-ul:marker:text-indigo-400 dark:prose-ul:marker:text-indigo-600 prose-ol:my-4 prose-li:leading-relaxed prose-blockquote:border-l-indigo-500/40 prose-blockquote:bg-white/5 dark:prose-blockquote:bg-black/5 prose-blockquote:px-4 prose-blockquote:py-3 prose-blockquote:rounded-md prose-blockquote:my-6 prose-pre:bg-[#111] prose-pre:border prose-pre:border-white/10 prose-pre:rounded-lg prose-pre:p-4 prose-code:bg-white/10 dark:prose-code:bg-black/10 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:text-indigo-300 dark:prose-code:text-indigo-600 prose-hr:border-white/10 dark:prose-hr:border-black/10 prose-hr:my-10 prose-table:border-collapse prose-th:bg-white/5 dark:prose-th:bg-black/5 prose-td:border-white/10 dark:prose-td:border-black/10 prose-tr:border-white/10 dark:prose-tr:border-black/10 prose-td:p-3 prose-th:p-3">

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I spent a Saturday afternoon in 2022 staring at a function I'd written — forty lines of nested <code>if</code> statements checking whether a user's input was a valid email. It worked. It passed the three test cases I'd invented. I was proud of it, until a friend looked over my shoulder and typed a single regex that did the same thing in one line.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">That moment captured everything wrong with how I was learning: I was writing code, but I wasn't learning to <em>think</em> in code. The gap between those two activities is where most beginners stall out, and nobody talks about it honestly. Nobody warns you about the middle part — the six to twelve months where you can make things run but can't explain why they work.</p>

<!-- Callout 1: Warning Trap -->
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10">
  <div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div>
  <div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5">
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg>
  </div>
  <div class="flex flex-1 flex-col gap-1.5 min-w-0">
    <p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">The Hard Truth About Learning to Code</p>
    <div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80">
      <p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6]">The gap between recognizing syntax and building mental models is where 90% of self-taught developers hit a wall. Here is what would have saved me months of thrashing.</p>
    </div>
  </div>
</div>

<hr/>

<h2 id="the-first-month-will-lie-to-you" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-first-month-will-lie-to-you"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The first month will lie to you</h2>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">There's a specific high you get when your first program prints "Hello, World," or your first webpage renders a styled heading. That feeling is real — and it's misleading. Early wins come fast because the problems are constrained: follow these steps, get this output. You're pattern-matching, not problem-solving.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I remember the crash vividly. Three weeks into learning JavaScript, I could follow any tutorial and reproduce the result. Then I closed the tutorial, opened a blank file, and tried to build a simple calculator from scratch. Nothing. I couldn't figure out how to structure the logic without someone walking me through each step. The syntax was in my head; the thinking wasn't.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">That gap — between <em>recognizing</em> code and <em>producing</em> code — is the first real wall. Experienced developers hit walls too, but they've built mental models for diagnosing problems. That intuition comes from hundreds of hours of writing bad code and fixing it. There's no shortcut through it.</p>

<!-- Callout 2: Blue Info Box -->
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10">
  <div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div>
  <div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5">
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg>
  </div>
  <div class="flex flex-1 flex-col gap-1.5 min-w-0">
    <p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">Mental Model vs Velocity</p>
    <div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80">
      <p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6]">Syntax takes 5 minutes to read; intuition takes 100 hours of broken builds. Expect the slowdown—it isn't failure, it's the natural shape of the learning curve.</p>
    </div>
  </div>
</div>

<hr/>

<h2 id="depth-beats-fomo" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#depth-beats-fomo"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Depth beats FOMO</h2>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Tech Twitter (or whatever we're calling it now) is engineered to make you feel behind. A new framework drops every week. Some influencer declares the tool you spent three months learning is already dead. Resist the pull of novelty while you're still building fundamentals.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I fell into this hard. In my first year, I touched React, Vue, and Svelte, and started a brief, confused fling with Angular. The result: I was mediocre at four frameworks instead of competent at one. Every switch reset my mental clock — two weeks learning the paradigm, a flicker of productivity, then a shinier thing pulled me away.</p>

<!-- Callout 3: Red Error Box -->
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-red-500/8 dark:bg-red-500/5 border-red-500/20 dark:border-red-400/30 ring-red-500/10">
  <div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-red-400 dark:bg-red-500 shadow-[0_0_12px_rgba(248,113,113,0.6)]"></div>
  <div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5">
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-x size-[18px] text-red-400 dark:text-red-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m15 9-6 6"></path><path d="m9 9 6 6"></path></svg>
  </div>
  <div class="flex flex-1 flex-col gap-1.5 min-w-0">
    <p class="m-0 text-[14px] font-semibold leading-snug text-red-100 dark:text-red-900">Common Mistakes</p>
    <div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-red-200/80 dark:text-red-800/80">
      <p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6]">❌ Framework Hopping: Learning setup commands for 5 frameworks instead of core architectural principles in 1.<br/>❌ Tutorial Hopping: Typing along with instructors without making independent architectural decisions.</p>
    </div>
  </div>
</div>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Nothing compounded, because I never stayed anywhere long enough. When I finally committed to React for six straight months — building real projects, reading source code, understanding the component lifecycle beyond "it re-renders when state changes" — everything accelerated. Depth in one ecosystem teaches transferable concepts. Breadth across five teaches you setup commands.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The fix is uncomfortable: build something before you feel ready. Pick a project you actually care about and fumble through it. The fumbling <em>is</em> the learning. I learned more from building this blog from scratch with MDX than from the previous dozen tutorials combined.</p>

<figure class="relative w-full flex flex-col items-center my-8"><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/what-id-tell-myself-before-learning-to-code-community.jpg" alt="Learning and Building Together" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure>

<hr/>

<h2 id="motivation-is-a-spark-systems-are-the-engine" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#motivation-is-a-spark-systems-are-the-engine"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Motivation is a spark; systems are the engine</h2>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I've never met a self-taught developer who stayed motivated for two years straight. Motivation fluctuates — some weeks you'll code for four hours after work, others opening VS Code will feel like pulling teeth. The people who make it through aren't more motivated. They have better systems.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here's what worked for me once the initial excitement burned off:</p>

<ul class="list-disc ml-6 mt-3 mb-6 space-y-3 text-[16px] font-alata text-neutral-200 leading-8">
<li class="leading-relaxed marker:text-indigo-400 dark:marker:text-indigo-600 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[15px]"><strong class="text-white dark:text-black font-semibold">Set targets with a finish line:</strong> "Learn React" is vapor. "Build a weather app in React that fetches data from an API, deployed to Vercel by Friday" is a target. Small completions build momentum.</li>
<li class="leading-relaxed marker:text-indigo-400 dark:marker:text-indigo-600 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[15px]"><strong class="text-white dark:text-black font-semibold">Protect a daily minimum:</strong> Thirty focused minutes daily beats an eight-hour weekend marathon. Consistency compounds. Intensity evaporates.</li>
<li class="leading-relaxed marker:text-indigo-400 dark:marker:text-indigo-600 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[15px]"><strong class="text-white dark:text-black font-semibold">Find your cohort:</strong> Accountability matters when motivation drops. Any Discord server, meetup, or study group helps make the grind less isolating.</li>
</ul>

<!-- Callout 4: Green Best Practice Box -->
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10">
  <div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div>
  <div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5">
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg>
  </div>
  <div class="flex flex-1 flex-col gap-1.5 min-w-0">
    <p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Proven Systems Rule</p>
    <div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80">
      <p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6]">30 minutes of focused code every single day beats an 8-hour marathon on Sunday. Context stays loaded in your brain, eliminating the ramp-up cost.</p>
    </div>
  </div>
</div>

<figure class="relative w-full flex flex-col items-center my-8"><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/what-id-tell-myself-before-learning-to-code-motivation.jpg" alt="Motivation is a Spark; Systems are the Engine" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Bootcamps accelerate learning by providing structure and deadlines, but they don't compress the hours required. You can't shortcut pattern recognition. Be suspicious of anyone promising a six-figure salary after eight weeks — the realistic timeline from zero to employable is 12 to 24 months of consistent work.</p>

<hr/>

<h2 id="ai-is-a-power-tool-not-a-replacement-for-understanding" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#ai-is-a-power-tool-not-a-replacement-for-understanding"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>AI is a power tool, not a replacement for understanding</h2>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">This section didn't exist two years ago. Now it's mandatory.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">GitHub Copilot and ChatGPT have changed what it feels like to learn to code. Describe a problem in plain English, get working code back in seconds. That's extraordinary — and a trap if you're not careful with it.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I've caught myself pasting AI-generated code without understanding what it does. It runs, the tests pass, you move on — then something breaks and you're staring at code you can't debug, because you never understood it in the first place. It's tutorial hell with better autocomplete: infinite, and personalized to you.</p>

<!-- Code Comparison Box -->
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6]">❌ <strong>Blind AI Delegation:</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-comment">// Prompt: "Give me code to fetch user data"</span>
<span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'/api/user'</span>).then(<span class="hljs-params">res</span> => res.json());
<span class="hljs-variable font-mono">setUser</span>(data); <span class="hljs-comment">// Crashes silently if endpoint fails or returns 500!</span>
</code></pre>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6]">✅ <strong>Understanding & Validation:</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">try</span> {
  <span class="hljs-keyword">const</span> res = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'/api/user'</span>);
  <span class="hljs-keyword">if</span> (!res.ok) <span class="hljs-keyword">throw new</span> <span class="hljs-title class_">Error</span>(<span class="hljs-string">`HTTP error! Status: ${res.status}`</span>);
  <span class="hljs-keyword">const</span> data: <span class="hljs-title class_ font-semibold">UserSchema</span> = <span class="hljs-keyword">await</span> res.json();
  <span class="hljs-variable font-mono">setUser</span>(data);
} <span class="hljs-keyword">catch</span> (err) {
  <span class="hljs-variable font-mono">handleError</span>(err);
}
</code></pre>

<!-- Callout 5: Pink Pro Tip Box -->
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10">
  <div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div>
  <div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5">
    <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg>
  </div>
  <div class="flex flex-1 flex-col gap-1.5 min-w-0">
    <p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">AI Validation Checkpoint</p>
    <div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80">
      <p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6]">Before committing AI-generated code, ask: <em>Can I explain every line? Can I modify it without re-prompting?</em> If not, you haven't learned anything — you've delegated it.</p>
    </div>
  </div>
</div>

<hr/>

<h2 id="the-dunning-kruger-valley-is-where-growth-lives" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-dunning-kruger-valley-is-where-growth-lives"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The Dunning-Kruger valley is where growth lives</h2>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The classic Dunning-Kruger curve captures the learning arc better than any advice thread I've read.</p>

<figure class="relative w-full flex flex-col items-center my-8"><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/what-id-tell-myself-before-learning-to-code-dunning-kruger.jpg" alt="The Dunning-Kruger Curve in Learning to Code" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">You start overconfident: <em>I built a website in a weekend, how hard can this be?</em> Then you hit real problems — asynchronous code behaving in ways you can't predict, state management spiraling, deployment pipelines breaking silently — and confidence craters. You enter the valley, where you finally know enough to see how much you don't know.</p>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The valley is where most people quit. It's also where the real learning happens, because you're finally facing problems complex enough to force deep understanding. The inflection point arrives when debugging stops feeling like magic and starts feeling like detective work — when you read an error message and already know which file to open.</p>

<!-- Key Takeaways Summary Grid -->
<div class="my-10 grid grid-cols-1 sm:grid-cols-2 gap-4">
  <div class="rounded-xl border border-white/10 dark:border-black/10 bg-white/5 dark:bg-black/5 p-5 shadow-sm">
    <div class="flex items-center gap-2 font-semibold text-indigo-400 dark:text-indigo-600 mb-2 text-[15px]">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>
      1. Depth Over Breadth
    </div>
    <p class="text-xs text-neutral-400 dark:text-neutral-600 m-0 leading-relaxed">Master 1 core ecosystem for 6+ months before chasing shiny new frameworks.</p>
  </div>

  <div class="rounded-xl border border-white/10 dark:border-black/10 bg-white/5 dark:bg-black/5 p-5 shadow-sm">
    <div class="flex items-center gap-2 font-semibold text-green-400 dark:text-green-600 mb-2 text-[15px]">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="20 6 9 17 4 12"/></svg>
      2. Systems > Motivation
    </div>
    <p class="text-xs text-neutral-400 dark:text-neutral-600 m-0 leading-relaxed">30 minutes of daily practice compounds far faster than sporadic weekend marathons.</p>
  </div>

  <div class="rounded-xl border border-white/10 dark:border-black/10 bg-white/5 dark:bg-black/5 p-5 shadow-sm">
    <div class="flex items-center gap-2 font-semibold text-pink-400 dark:text-pink-600 mb-2 text-[15px]">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
      3. AI as Assistant
    </div>
    <p class="text-xs text-neutral-400 dark:text-neutral-600 m-0 leading-relaxed">Use AI to speed up boilerplate and get unstuck, never to outsource comprehension.</p>
  </div>

  <div class="rounded-xl border border-white/10 dark:border-black/10 bg-white/5 dark:bg-black/5 p-5 shadow-sm">
    <div class="flex items-center gap-2 font-semibold text-amber-400 dark:text-amber-600 mb-2 text-[15px]">
      <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
      4. Embrace the Valley
    </div>
    <p class="text-xs text-neutral-400 dark:text-neutral-600 m-0 leading-relaxed">Tracing bugs at 11 PM isn't a distraction from learning—that frustration IS the learning.</p>
  </div>
</div>

<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you're in the valley right now, that's the only real difference between you and the people who made it through: they kept going. They built systems that kept them writing code on the days they didn't want to. The inflection point is coming. You won't recognize it when it arrives — only months later, when the problems that used to paralyze you start feeling routine.</p>

<p class="mt-6 font-alata text-neutral-600 dark:text-neutral-400 text-[13px] sm:text-[14px]">Published on <span class="font-medium text-neutral-900 dark:text-neutral-200">July 27, 2026</span></p>
</div>]]></content>
    <category term="LearningToCode" label="LearningToCode" />
    <category term="CareerAdvice" label="CareerAdvice" />
    <category term="Mindset" label="Mindset" />
    <category term="WebDev" label="WebDev" />
  </entry>
  <entry>
    <title><![CDATA[How I Built My Portfolio with Next.js and Sanity CMS (And What I Learned)]]></title>
    <link href="https://mudassirasghar.dev/blog/how-i-built-my-portfolio-with-next-js-and-sanity-cms-and-what-i-learned" rel="alternate" type="text/html" />
    <id>https://mudassirasghar.dev/blog/how-i-built-my-portfolio-with-next-js-and-sanity-cms-and-what-i-learned</id>
    <updated>2026-06-18T00:00:00.000Z</updated>
    <published>2026-06-18T00:00:00.000Z</published>
    <summary><![CDATA[Behind the scenes of rebuilding my portfolio with Next.js App Router & Sanity CMS—covering GROQ queries, MDX rendering, ISR, and key takeaways.]]></summary>
    <content type="html"><![CDATA[<div class=" prose prose-lg prose-invert dark:prose max-w-none prose-headings:scroll-mt-28 prose-headings:font-bold prose-h1:text-3xl sm:prose-h1:text-4xl prose-h2:text-2xl sm:prose-h2:text-3xl prose-h3:text-xl sm:prose-h3:text-2xl prose-p:text-white/80 dark:prose-p:text-neutral-800/80 prose-p:leading-relaxed prose-p:my-5 prose-a:text-indigo-400 dark:prose-a:text-indigo-600 prose-a:no-underline hover:prose-a:underline prose-ul:my-4 prose-ul:marker:text-indigo-400 dark:prose-ul:marker:text-indigo-600 prose-ol:my-4 prose-li:leading-relaxed prose-blockquote:border-l-indigo-500/40 prose-blockquote:bg-white/5 dark:prose-blockquote:bg-black/5 prose-blockquote:px-4 prose-blockquote:py-3 prose-blockquote:rounded-md prose-blockquote:my-6 prose-pre:bg-[#111] prose-pre:border prose-pre:border-white/10  prose-pre:rounded-lg prose-pre:p-4 prose-code:bg-white/10 dark:prose-code:bg-black/10 prose-code:px-1.5 prose-code:py-0.5  prose-code:rounded prose-code:text-indigo-300 dark:prose-code:text-indigo-600 prose-hr:border-white/10 dark:prose-hr:border-black/10 prose-hr:my-10 prose-table:border-collapse prose-th:bg-white/5 dark:prose-th:bg-black/5 prose-td:border-white/10 dark:prose-td:border-black/10 prose-tr:border-white/10 dark:prose-tr:border-black/10 prose-td:p-3 prose-th:p-3"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Every developer eventually reaches a point where they look at their portfolio and think — <em>this doesn&#x27;t feel like me anymore.</em></p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">That&#x27;s where I was. I wanted something that wasn&#x27;t just a static resume with links. I wanted a real product — something I&#x27;d actually be proud to send to clients.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">So I rebuilt everything from scratch. This is the honest breakdown of how I did it, what I used, and what I learned.</p>
<h2 id="the-stack-at-a-glance" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-stack-at-a-glance"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The Stack at a Glance</h2>
<div class="my-6 grid grid-cols-1 gap-4 sm:grid-cols-2 w-full max-w-4xl not-prose"><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">⚡</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">Next.js 15</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">App Router, Server Components, ISR, generateStaticParams — everything I needed was already built in.</p></div></div></div><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">🧠</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">Sanity CMS</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">Headless CMS with a generous free tier. GROQ queries are clean and the Studio is genuinely nice to use.</p></div></div></div><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">📝</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">next-mdx-remote</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">Compiles MDX strings from Sanity into React components entirely on the server. No client-side hydration needed.</p></div></div></div><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">🗄️</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">Prisma + PostgreSQL</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">Handles all dynamic data — guestbook entries, analytics, user sessions. Fully typed ORM.</p></div></div></div></div>
<h2 id="why-i-ditched-mdx-files" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#why-i-ditched-mdx-files"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Why I Ditched MDX Files</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">My previous setup stored blog posts as <code>.mdx</code> files in a <code>/content</code> folder. It worked — until it didn&#x27;t.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-lg divide-y divide-neutral-800/40 dark:divide-neutral-200/60"><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">❌ Problem 1: Can&#x27;t edit on mobile</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Editing a markdown file means opening a code editor. You can&#x27;t do that from your phone at 11pm when you want to fix a typo in a published post.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">❌ Problem 2: Images are a nightmare</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">With file-based MDX, images either sit in <code>/public</code> or you use external URLs. No built-in upload, no optimization pipeline, no CDN.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">❌ Problem 3: No structured content</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">You can&#x27;t query all posts in a given category from a folder of markdown files without building your own parser. Sanity gives you this for free with GROQ.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">✅ Solution: Headless CMS</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">A headless CMS stores your content separately and exposes a clean API. You write in a proper editor, content is structured, images are handled — and your frontend just fetches what it needs.</p></div></div></div></div></div>
<h2 id="project-structure" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#project-structure"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Project Structure</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here&#x27;s how the blog-related code is organized in the repo:</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">portfoliooo/src</span></div><div class="bg-neutral-950/60 dark:bg-[#f6f8fa] p-4 overflow-x-auto custom-scroll"><div class="text-xs sm:text-[13px] leading-relaxed text-neutral-300 dark:text-neutral-800 select-none flex flex-col gap-0.5 font-CodeFont"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">app</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">blog</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">page.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Blog listing page with ISR</span></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">[slug]</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">page.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Individual blog post — SSG plus dynamic fallback</span></div></div></div></div></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">lib</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">sanity.client.ts</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Sanity client setup</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">sanity.queries.ts</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->All GROQ queries</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">parseMDX.ts</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->MDX compiler with remark and rehype plugins</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">extractHeadings.ts</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Extracts TOC headings from raw MDX</span></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">components</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">mdxcomponents</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">mdx-components.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->All MDX component exports</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">CustomComponents.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Callout, Tabs, Cards, Accordion and more</span></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">customUi</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">TocSidebar.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Table of contents sidebar</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">BlogLayoutWrapper.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Two-column layout wrapper</span></div></div></div></div></div></div></div></div>
<h2 id="step-1-setting-up-the-sanity-client" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#step-1--setting-up-the-sanity-client"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Step 1 — Setting Up the Sanity Client</h2>
<div class="my-8 flex flex-col gap-0 [counter-reset:step]"><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Install dependencies</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">You need two packages — the Sanity client and the image URL builder.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Create the client file</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I put this in <code>src/lib/sanity.client.ts</code>. The entire app imports from this single file — no duplicated config anywhere.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Set up environment variables</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Create <code>.env.local</code> in your project root with your Sanity project ID, dataset name, and API version.</p></div></div></div></div>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-green-500"></span>Bash</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-bash">pnpm add next-sanity @sanity/image-url
</code></pre></div></div></div></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">Don&#x27;t skip this</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I spent an embarrassing amount of time debugging an empty array response from Sanity. Turned out my <code>.env.local</code> variable name had a typo. Always verify your env config in complete isolation before building anything on top of it.</p></div></div></div>
<h2 id="step-2-writing-groq-queries" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#step-2--writing-groq-queries"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Step 2 — Writing GROQ Queries</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">GROQ is Sanity&#x27;s query language. It&#x27;s not hard, but it&#x27;s different — the first hour feels strange if you&#x27;re used to SQL or GraphQL.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Used on the <code>/blog</code> page. Fetches all posts ordered by date, with just the fields needed for the listing card UI.</p><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-pink-500"></span>GROQ</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-groq">*[_type == &quot;blog&quot;] | order(publishedAt desc) {
  _id,
  slug,
  title,
  shortDescription,
  publishedAt,
  readingTime,
  categories,
  coverImage {
    asset-&gt;{ url }
  }
}
</code></pre></div></div></div></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">The asset arrow syntax</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The <code>asset-&gt;</code> in GROQ is a <strong>reference join</strong> — it follows the reference and fetches the actual asset document. Without the arrow, you&#x27;d just get a reference ID, not the image URL. This trips everyone up the first time.</p></div></div></div>
<h2 id="step-3-dynamic-routing" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#step-3--dynamic-routing"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Step 3 — Dynamic Routing</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The blog uses Next.js file-based routing. The file at <code>app/blog/[slug]/page.tsx</code> handles every individual post. Two critical exported functions power the whole thing:</p>
<h3 id="generatestaticparams-ssg" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#generatestaticparams-ssg"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>generateStaticParams <span class="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide font-sans select-none bg-green-500/10 text-green-400 border-green-500/25 dark:bg-green-50 dark:text-green-700 dark:border-green-200"><span class="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-green-400"></span>SSG</span></h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Tells Next.js to pre-render all blog pages at build time. Without this, every page load hits Sanity&#x27;s API. With it, pages are served from the CDN.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-blue-500"></span>TypeScript</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">async</span> <span class="hljs-keyword">function</span> <span class="hljs-title function_">generateStaticParams</span>(<span class="hljs-params"></span>) {
  <span class="hljs-keyword">const</span> slugs = <span class="hljs-keyword">await</span> client.<span class="hljs-title function_">fetch</span>(
    groq<span class="hljs-string">`*[_type == &quot;blog&quot; &amp;&amp; defined(slug.current)]{ &quot;slug&quot;: slug.current }`</span>
  );
  <span class="hljs-keyword">return</span> slugs.<span class="hljs-title function_">map</span>(<span class="hljs-function">(<span class="hljs-params"><span class="hljs-attr">s</span>: { slug: <span class="hljs-built_in">string</span> }</span>) =&gt;</span> ({ <span class="hljs-attr">slug</span>: s.<span class="hljs-property">slug</span> }));
}
</code></pre></div></div></div></div>
<h2 id="step-4-rendering-mdx-content" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#step-4--rendering-mdx-content"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Step 4 — Rendering MDX Content</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Blog post content in Sanity is stored as an MDX string. To render it, I use <code>next-mdx-remote/rsc</code> — which compiles MDX entirely on the server inside a React Server Component. No client-side JS, no hydration overhead.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-blue-500"></span>TypeScript</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-ts"><span class="hljs-keyword">import</span> { compileMDX } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;next-mdx-remote/rsc&quot;</span>;
<span class="hljs-keyword">import</span> remarkGfm <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;remark-gfm&quot;</span>;
<span class="hljs-keyword">import</span> rehypeSlug <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;rehype-slug&quot;</span>;
<span class="hljs-keyword">import</span> rehypeAutolinkHeadings <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;rehype-autolink-headings&quot;</span>;
<span class="hljs-keyword">import</span> rehypeHighlight <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;rehype-highlight&quot;</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">async</span> <span class="hljs-keyword">function</span> <span class="hljs-title function_">parseMDX</span>(<span class="hljs-params"><span class="hljs-attr">source</span>: <span class="hljs-built_in">string</span>, components = {}</span>) {
  <span class="hljs-keyword">const</span> { content } = <span class="hljs-keyword">await</span> <span class="hljs-title function_">compileMDX</span>({
    source,
    components,
    <span class="hljs-attr">options</span>: {
      <span class="hljs-attr">parseFrontmatter</span>: <span class="hljs-literal">true</span>,
      <span class="hljs-attr">mdxOptions</span>: {
        <span class="hljs-attr">remarkPlugins</span>: [remarkGfm],
        <span class="hljs-attr">rehypePlugins</span>: [rehypeSlug, rehypeAutolinkHeadings, rehypeHighlight],
      },
    },
  });
  <span class="hljs-keyword">return</span> content;
}
</code></pre></div></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here&#x27;s what each rehype plugin does:</p>
<div class="my-6 grid grid-cols-1 gap-4 sm:grid-cols-2 w-full max-w-4xl not-prose"><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">📋</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">remarkGfm</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">Enables GitHub Flavored Markdown — tables, strikethrough, task lists, autolinks.</p></div></div></div><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">🔗</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">rehypeSlug</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">Adds unique IDs to every heading. Essential for the table of contents sidebar.</p></div></div></div><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">⚓</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">rehypeAutolinkHeadings</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">Wraps headings in anchor links so users can link directly to any section.</p></div></div></div><div class="group relative flex flex-col rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/50 dark:bg-[#f6f8fa] p-5 shadow-sm hover:shadow-xl transition-all duration-300 hover:-translate-y-1 overflow-hidden"><div class="absolute inset-x-0 top-0 h-[2px] bg-gradient-to-r from-transparent via-pink-500/60 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"></div><div class="flex items-start gap-4"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-neutral-800/60 dark:bg-neutral-200/60 border border-neutral-700/30 dark:border-neutral-300/30 text-xl transition-transform duration-200 group-hover:scale-105">🎨</div><div class="flex-1 min-w-0"><h4 class="m-0 text-xl font-Eb_Garamond  text-neutral-100 dark:text-neutral-900 leading-snug">rehypeHighlight</h4><p class="m-0 mt-1.5 text-[13px] leading-relaxed text-neutral-400 font-alata dark:text-neutral-500">Syntax highlights all code blocks using highlight.js. Handles 100+ languages automatically.</p></div></div></div></div>
<h2 id="step-5-table-of-contents" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#step-5--table-of-contents"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Step 5 — Table of Contents</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Since <code>rehypeSlug</code> adds IDs to all headings, I built a sidebar TOC. The heading extraction runs server-side on the raw MDX string — before compilation:</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-blue-500"></span>TypeScript</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">function</span> <span class="hljs-title function_">extractHeadings</span>(<span class="hljs-params"><span class="hljs-attr">mdx</span>: <span class="hljs-built_in">string</span></span>) {
  <span class="hljs-keyword">const</span> headingRegex = <span class="hljs-regexp">/^(#{1,4})\s+(.*)$/gm</span>;
  <span class="hljs-keyword">const</span> <span class="hljs-attr">headings</span>: { <span class="hljs-attr">level</span>: <span class="hljs-built_in">number</span>; <span class="hljs-attr">text</span>: <span class="hljs-built_in">string</span>; <span class="hljs-attr">id</span>: <span class="hljs-built_in">string</span> }[] = [];

  <span class="hljs-keyword">let</span> match;
  <span class="hljs-keyword">while</span> ((match = headingRegex.<span class="hljs-title function_">exec</span>(mdx)) !== <span class="hljs-literal">null</span>) {
    <span class="hljs-keyword">const</span> level = match[<span class="hljs-number">1</span>].<span class="hljs-property">length</span>;
    <span class="hljs-keyword">const</span> cleanText = match[<span class="hljs-number">2</span>].<span class="hljs-title function_">replace</span>(<span class="hljs-regexp">/[*_`~\[\]]/g</span>, <span class="hljs-string">&quot;&quot;</span>);
    <span class="hljs-keyword">const</span> id = <span class="hljs-title function_">slugify</span>(cleanText);
    headings.<span class="hljs-title function_">push</span>({ level, <span class="hljs-attr">text</span>: cleanText, id });
  }

  <span class="hljs-keyword">return</span> headings;
}
</code></pre></div></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The key detail: <code>extractHeadings</code> runs on the <strong>raw MDX string</strong>, not the compiled HTML. It strips markdown formatting characters and produces slugified IDs that exactly match what <code>rehypeSlug</code> generates in the rendered HTML. Press <kbd class="inline-flex items-center px-2 py-0.5 mx-0.5 rounded-md text-[11px] font-semibold font-CodeFont text-neutral-200 dark:text-neutral-700 bg-neutral-800 dark:bg-neutral-100 border border-neutral-700 dark:border-neutral-300 border-b-2 shadow-sm select-none">Ctrl</kbd> + <kbd class="inline-flex items-center px-2 py-0.5 mx-0.5 rounded-md text-[11px] font-semibold font-CodeFont text-neutral-200 dark:text-neutral-700 bg-neutral-800 dark:bg-neutral-100 border border-neutral-700 dark:border-neutral-300 border-b-2 shadow-sm select-none">F</kbd> in your browser — you&#x27;ll see heading IDs appear in the URL bar when you click any TOC link.</p>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">How it all fits together</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The <code>TocSidebar</code> component receives the headings array and renders smooth-scroll anchor links. Each link&#x27;s <code>href</code> matches the ID that <code>rehypeSlug</code> assigned to the heading in the compiled HTML — so clicking a TOC item jumps directly to that section.</p></div></div></div>
<h2 id="step-6-isr-and-caching" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#step-6--isr-and-caching"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Step 6 — ISR and Caching</h2>
<h3 id="blog-listing-page-isr" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#blog-listing-page-isr"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Blog listing page <span class="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide font-sans select-none bg-neutral-500/10 text-neutral-400 border-neutral-500/25 dark:bg-neutral-100 dark:text-neutral-600 dark:border-neutral-300"><span class="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-neutral-400"></span>ISR</span></h3>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-blue-500"></span>TypeScript</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-ts"><span class="hljs-keyword">export</span> <span class="hljs-keyword">const</span> revalidate = <span class="hljs-number">60</span>;
</code></pre></div></div></div></div>
<h3 id="individual-blog-pages-ssg" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#individual-blog-pages-ssg"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Individual blog pages <span class="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide font-sans select-none bg-green-500/10 text-green-400 border-green-500/25 dark:bg-green-50 dark:text-green-700 dark:border-green-200"><span class="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-green-400"></span>SSG</span></h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Pre-built at deploy time via <code>generateStaticParams</code>. New posts added after a deploy use Next.js&#x27;s on-demand fallback — the first visitor triggers a build, subsequent visitors get the cached page instantly.</p>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">ISR won&#x27;t save a bad schema</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Early on I was leaning on revalidation to paper over a messy Sanity schema. The right move is to design your schema properly first. ISR only controls when the page rebuilds — not how clean your data is.</p></div></div></div>
<h2 id="step-7-seo-and-json-ld" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#step-7--seo-and-json-ld"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Step 7 — SEO and JSON-LD</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Each blog post gets a full JSON-LD structured data block injected into the page. This is what Google uses to understand your content beyond reading the page text.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-blue-500"></span>TypeScript</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-ts"><span class="hljs-keyword">const</span> jsonLd = {
  <span class="hljs-string">&quot;@context&quot;</span>: <span class="hljs-string">&quot;https://schema.org&quot;</span>,
  <span class="hljs-string">&quot;@type&quot;</span>: <span class="hljs-string">&quot;Article&quot;</span>,
  <span class="hljs-attr">headline</span>: post.<span class="hljs-property">title</span>,
  <span class="hljs-attr">description</span>: post.<span class="hljs-property">shortDescription</span>,
  <span class="hljs-attr">author</span>: {
    <span class="hljs-string">&quot;@type&quot;</span>: <span class="hljs-string">&quot;Person&quot;</span>,
    <span class="hljs-attr">name</span>: <span class="hljs-string">&quot;Mudassir Asghar&quot;</span>,
    <span class="hljs-attr">url</span>: <span class="hljs-string">&quot;https://mudassirasghar.dev&quot;</span>,
  },
  <span class="hljs-attr">datePublished</span>: post.<span class="hljs-property">publishedAt</span>,
  <span class="hljs-attr">dateModified</span>: post.<span class="hljs-property">_updatedAt</span> || post.<span class="hljs-property">publishedAt</span>,
};
</code></pre></div></div></div></div>
<div class="my-6 grid grid-cols-1 gap-2 sm:grid-cols-2 max-w-4xl mx-auto w-full"><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/how-i-built-my-portfolio-with-next-js-and-sanity-cms-and-what-i-learned-body-2.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/how-i-built-my-portfolio-with-next-js-and-sanity-cms-and-what-i-learned-body-3.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure></div>
<h2 id="the-diagram-edge-case" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-diagram-edge-case"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The Diagram Edge Case</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">There&#x27;s one tricky bug worth calling out. Sanity content sometimes contains ASCII diagram text that the MDX parser misreads as JSX because of arrow-style syntax. The <code>parseMDX.ts</code> file handles this with a pre-processing regex that wraps Diagram content in code blocks before compilation runs.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here&#x27;s what a rendered Diagram looks like:</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-branch w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">Flow Diagram</span></div><div class="overflow-x-auto custom-scroll bg-neutral-950/60 dark:bg-[#f6f8fa] p-6"><pre class="m-0 p-0 border-0 bg-transparent text-[12px] sm:text-[13px] leading-relaxed tracking-wide text-neutral-300 dark:text-neutral-700 font-CodeFont whitespace-pre [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:p-0 [&amp;&gt;pre]:bg-transparent [&amp;_code]:bg-transparent [&amp;_code]:p-0 [&amp;_code]:text-inherit"><pre><code class="hljs language-text">Request → Next.js Server
    ↓
generateStaticParams (build time)
    ↓
client.fetch(singleBlogQuery)
    ↓
parseMDX(post.content, mdxComponents)
    ↓
Rendered React Component → Browser
</code></pre></pre></div></div>
<h2 id="other-things-worth-knowing" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#other-things-worth-knowing"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Other Things Worth Knowing</h2>
<h3 id="local-fonts-no-google-fonts-requests" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#local-fonts--no-google-fonts-requests"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Local fonts — no Google Fonts requests</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Instead of loading fonts from Google (which adds a network round-trip on every load), I serve fonts locally using Next.js <code>localFont</code> with <code>display: swap</code>. Text renders immediately in a system font, then swaps — no layout shift, no invisible content.</p>
<h3 id="production-console-cleanup-nextjs" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#production-console-cleanup-nextjs"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Production console cleanup <span class="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide font-sans select-none bg-neutral-500/10 text-neutral-400 border-neutral-500/25 dark:bg-neutral-100 dark:text-neutral-600 dark:border-neutral-300"><span class="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-neutral-400"></span>Next.js</span></h3>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-blue-500"></span>TypeScript</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-ts"><span class="hljs-attr">compiler</span>: {
  <span class="hljs-attr">removeConsole</span>: process.<span class="hljs-property">env</span>.<span class="hljs-property">NODE_ENV</span> === <span class="hljs-string">&quot;production&quot;</span>,
},
</code></pre></div></div></div></div>
<h3 id="www-redirect-seo" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#www-redirect-seo"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>WWW redirect <span class="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide font-sans select-none bg-neutral-500/10 text-neutral-400 border-neutral-500/25 dark:bg-neutral-100 dark:text-neutral-600 dark:border-neutral-300"><span class="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-neutral-400"></span>SEO</span></h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">A permanent redirect from <code>www.mudassirasghar.dev</code> to <code>mudassirasghar.dev</code> is handled directly in <code>next.config.ts</code>. No duplicate content penalty from Google for having two versions of the same URL.</p>
<h2 id="what-i-actually-learned" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#what-i-actually-learned"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>What I Actually Learned</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">I want to be honest here — most &quot;what I learned&quot; sections are just disguised tips lists. Here&#x27;s what actually caught me off guard.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-lg divide-y divide-neutral-800/40 dark:divide-neutral-200/60"><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">GROQ takes a day, not an hour</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The syntax for reference joins, projections, and parameterized queries isn&#x27;t obvious upfront. Spend an afternoon in Sanity Studio&#x27;s Vision plugin — their built-in GROQ playground — before writing any frontend code.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">Server Components changed how I think about data fetching</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">With the App Router, I don&#x27;t need client-side data fetching libraries for most things. I just await a Sanity fetch directly inside an async Server Component. It&#x27;s cleaner, simpler, and faster. The mental model shift took a few days to fully click.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">useCdn false matters when you use ISR</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Sanity&#x27;s CDN caches responses. If you use ISR and useCdn together, your revalidation fetches might return stale CDN data. Disabling the CDN ensures you always get fresh content directly from Sanity&#x27;s API when Next.js revalidates.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">Environment variables will burn you at least once</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Mine did. Wrong variable name in .env.local — the client initialized fine but all fetches returned empty arrays. Test your env config completely in isolation before building anything on top of it.</p></div></div></div></div></div>
<h2 id="useful-resources" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#useful-resources"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Useful Resources</h2>
<a href="https://www.sanity.io/docs" target="_blank" rel="noopener noreferrer" class="group my-3 flex items-center justify-between gap-4 rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/40 dark:bg-[#f6f8fa] p-4 shadow-sm hover:shadow-lg hover:border-pink-500/40 dark:hover:border-pink-500/40 transition-all duration-300 no-underline decoration-transparent"><div class="flex items-center gap-3.5 min-w-0"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-pink-500/10 dark:bg-pink-500/8 border border-pink-500/15 dark:border-pink-500/20 text-pink-500 dark:text-pink-600 transition-all duration-200 group-hover:bg-pink-500/20 group-hover:scale-105"><span class="text-lg leading-none">📚</span></div><div class="min-w-0"><p class="m-0 text-sm font-semibold text-neutral-100 dark:text-neutral-900 truncate group-hover:text-white dark:group-hover:text-black transition-colors">Sanity Documentation</p><p class="m-0 mt-0.5 text-xs text-neutral-500 dark:text-neutral-500 line-clamp-1 font-CodeFont">Official docs — schema design, GROQ queries, and Sanity Studio setup</p></div></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link size-4 shrink-0 text-neutral-600 group-hover:text-pink-500 dark:group-hover:text-pink-600 transition-all duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>
<a href="https://github.com/hashicorp/next-mdx-remote" target="_blank" rel="noopener noreferrer" class="group my-3 flex items-center justify-between gap-4 rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/40 dark:bg-[#f6f8fa] p-4 shadow-sm hover:shadow-lg hover:border-pink-500/40 dark:hover:border-pink-500/40 transition-all duration-300 no-underline decoration-transparent"><div class="flex items-center gap-3.5 min-w-0"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-pink-500/10 dark:bg-pink-500/8 border border-pink-500/15 dark:border-pink-500/20 text-pink-500 dark:text-pink-600 transition-all duration-200 group-hover:bg-pink-500/20 group-hover:scale-105"><span class="text-lg leading-none">⚙️</span></div><div class="min-w-0"><p class="m-0 text-sm font-semibold text-neutral-100 dark:text-neutral-900 truncate group-hover:text-white dark:group-hover:text-black transition-colors">next-mdx-remote on GitHub</p><p class="m-0 mt-0.5 text-xs text-neutral-500 dark:text-neutral-500 line-clamp-1 font-CodeFont">The library that compiles MDX strings from Sanity into renderable React components</p></div></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link size-4 shrink-0 text-neutral-600 group-hover:text-pink-500 dark:group-hover:text-pink-600 transition-all duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>
<a href="https://nextjs.org/docs/app" target="_blank" rel="noopener noreferrer" class="group my-3 flex items-center justify-between gap-4 rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/40 dark:bg-[#f6f8fa] p-4 shadow-sm hover:shadow-lg hover:border-pink-500/40 dark:hover:border-pink-500/40 transition-all duration-300 no-underline decoration-transparent"><div class="flex items-center gap-3.5 min-w-0"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-pink-500/10 dark:bg-pink-500/8 border border-pink-500/15 dark:border-pink-500/20 text-pink-500 dark:text-pink-600 transition-all duration-200 group-hover:bg-pink-500/20 group-hover:scale-105"><span class="text-lg leading-none">▲</span></div><div class="min-w-0"><p class="m-0 text-sm font-semibold text-neutral-100 dark:text-neutral-900 truncate group-hover:text-white dark:group-hover:text-black transition-colors">Next.js App Router Docs</p><p class="m-0 mt-0.5 text-xs text-neutral-500 dark:text-neutral-500 line-clamp-1 font-CodeFont">generateStaticParams, ISR, Server Components, generateMetadata — all covered here</p></div></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link size-4 shrink-0 text-neutral-600 group-hover:text-pink-500 dark:group-hover:text-pink-600 transition-all duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you&#x27;re more of a visual learner, this is one of the best walkthroughs of the Next.js App Router + Sanity stack on YouTube:</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-200/10 dark:border-neutral-200/80 bg-black shadow-lg"><div class="relative aspect-video w-full"><iframe src="https://www.youtube-nocookie.com/embed/IF0Px1C4R3s" title="Next.js App Router + Sanity CMS Full Tutorial" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen="" class="absolute inset-0 h-full w-full border-0"></iframe></div></div>
<h2 id="is-this-stack-worth-it" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#is-this-stack-worth-it"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Is This Stack Worth It?</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Short answer: Yes</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you want a portfolio that has a real blog you can manage from anywhere, updates without a redeploy, has proper SEO out of the box, and can scale if you decide to write more seriously — this is one of the best combinations available right now.</p></div></div></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">But not for everyone</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you&#x27;re building a simple five-page portfolio with no dynamic content — this is overkill. Use static files and keep it simple. This setup shines when you have real content management needs.</p></div></div></div>
<hr/>
<div class="my-12 flex w-full items-center justify-center gap-4"><div class="h-px flex-1 max-w-[140px] bg-gradient-to-r from-transparent to-neutral-700 dark:to-neutral-300"></div><div class="flex gap-1.5 items-center"><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span><span class="block w-1.5 h-1.5 rounded-full bg-neutral-500 dark:bg-neutral-500"></span><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span></div><div class="h-px flex-1 max-w-[140px] bg-gradient-to-l from-transparent to-neutral-700 dark:to-neutral-300"></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]"><em>Thanks for reading. If you have questions, find me on Instagram at <a target="_blank" rel="noopener noreferrer" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="https://www.instagram.com/mudassir_asghar_/"><span class="relative">@mudassir_asghar_<span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right h-3.5 w-3.5 text-white dark:text-black opacity-70 transition-transform duration-300 group-hover:-translate-y-0.5 group-hover:translate-x-0.5" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a> or visit <a target="_blank" rel="noopener noreferrer" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="https://mudassirasghar.dev"><span class="relative">mudassirasghar.dev<span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right h-3.5 w-3.5 text-white dark:text-black opacity-70 transition-transform duration-300 group-hover:-translate-y-0.5 group-hover:translate-x-0.5" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a>.</em></p></div><p class="mt-6 font-alata text-neutral-600 dark:text-neutral-400 text-[13px] sm:text-[14px]">Published on <span class="font-medium text-neutral-900 dark:text-neutral-200">June 18, 2026</span></p>]]></content>
    <category term="Next.js" label="Next.js" />
    <category term="SanityCMS" label="SanityCMS" />
    <category term="WebDevelopment" label="WebDevelopment" />
    <category term="Tutorial" label="Tutorial" />
  </entry>
  <entry>
    <title><![CDATA[Developer vs. DevOps: Who Does What?]]></title>
    <link href="https://mudassirasghar.dev/blog/developer-vs-devops-who-does-what" rel="alternate" type="text/html" />
    <id>https://mudassirasghar.dev/blog/developer-vs-devops-who-does-what</id>
    <updated>2026-06-12T00:00:00.000Z</updated>
    <published>2026-06-12T00:00:00.000Z</published>
    <summary><![CDATA[A practical breakdown of Software Developers vs DevOps Engineers: core differences, daily roles, CI/CD pipelines, and shared workflows.]]></summary>
    <content type="html"><![CDATA[<div class=" prose prose-lg prose-invert dark:prose max-w-none prose-headings:scroll-mt-28 prose-headings:font-bold prose-h1:text-3xl sm:prose-h1:text-4xl prose-h2:text-2xl sm:prose-h2:text-3xl prose-h3:text-xl sm:prose-h3:text-2xl prose-p:text-white/80 dark:prose-p:text-neutral-800/80 prose-p:leading-relaxed prose-p:my-5 prose-a:text-indigo-400 dark:prose-a:text-indigo-600 prose-a:no-underline hover:prose-a:underline prose-ul:my-4 prose-ul:marker:text-indigo-400 dark:prose-ul:marker:text-indigo-600 prose-ol:my-4 prose-li:leading-relaxed prose-blockquote:border-l-indigo-500/40 prose-blockquote:bg-white/5 dark:prose-blockquote:bg-black/5 prose-blockquote:px-4 prose-blockquote:py-3 prose-blockquote:rounded-md prose-blockquote:my-6 prose-pre:bg-[#111] prose-pre:border prose-pre:border-white/10  prose-pre:rounded-lg prose-pre:p-4 prose-code:bg-white/10 dark:prose-code:bg-black/10 prose-code:px-1.5 prose-code:py-0.5  prose-code:rounded prose-code:text-indigo-300 dark:prose-code:text-indigo-600 prose-hr:border-white/10 dark:prose-hr:border-black/10 prose-hr:my-10 prose-table:border-collapse prose-th:bg-white/5 dark:prose-th:bg-black/5 prose-td:border-white/10 dark:prose-td:border-black/10 prose-tr:border-white/10 dark:prose-tr:border-black/10 prose-td:p-3 prose-th:p-3"><div class="my-6 grid grid-cols-1 gap-2 sm:grid-cols-2 max-w-4xl mx-auto w-full"><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/developer-vs-devops-who-does-what-body-1.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/developer-vs-devops-who-does-what-body-2.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure></div>
<h1 id="developer-vs-devops-the-ultimate-masterclass" class="scroll-mt-28 font-alata font-bold tracking-tight text-neutral-200 dark:text-neutral-700 leading-tight text-[22px] mt-6 mb-4 sm:text-[22px] md:text-[27px] lg:text-[27px] xl:text-[27px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#developer-vs-devops-the-ultimate-masterclass"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Developer vs. DevOps: The Ultimate Masterclass</h1>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you’ve spent any time in the modern tech ecosystem, you’ve probably noticed that the boundary between writing software and running it has blurred. Years ago, the line was clear: developers wrote the code and threw it &quot;over the wall&quot; to the operations team, who then figured out how to deploy and keep it running.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Today, that wall has been demolished. Terms like <strong>Developer</strong>, <strong>DevOps</strong>, <strong>Platform Engineer</strong>, and <strong>SRE (Site Reliability Engineer)</strong> are co-dependent partners in a unified pipeline.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Yet, confusion remains. Who actually writes the feature logic? Who manages the Kubernetes clusters? Who owns the deployment pipeline? and most importantly, how do these roles interact daily to push code to millions of users?</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">This guide is a comprehensive, 15-minute deep dive into the roles, toolsets, philosophies, and daily realities of Developers and DevOps Engineers.</p>
<hr/>
<h2 id="1-the-historical-silos-why-devops-emerged" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#1-the-historical-silos-why-devops-emerged"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>1. The Historical Silos: Why DevOps Emerged</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">To understand the difference between a Developer and a DevOps Engineer, we have to look back at why DevOps exists. Historically, software companies had two distinct, often adversarial departments:</p>
<ol class="list-decimal ml-6 mt-3 mb-6 space-y-2 text-gray-300  marker:text-neutral-400">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Development (Dev)</strong>: Measured on <strong>velocity</strong>—how many features they could ship.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Operations (Ops)</strong>: Measured on <strong>stability</strong>—maintaining 99.9% uptime and avoiding failures.</li>
</ol>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">This created a fundamental conflict of interest. Developers wanted to change things rapidly, while Operations wanted to keep things exactly the same because changes introduce risk.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The developer would write code on their laptop, declare <em>&quot;It works on my machine!&quot;</em>, package it into a zip file, and hand it over to Operations. If it crashed in production due to environmental differences, Operations blamed the Developer&#x27;s code, and the Developer blamed the Operations server configuration.</p>
<figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/developer-vs-devops-who-does-what-body-3.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div><figcaption class="mt-2 text-sm italic text-neutral-400 font-CodeFont">Figure 1: The intersection of writing code and orchestrating environments</figcaption></figure>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">DevOps emerged in the late 2000s as a cultural movement to break down these silos by uniting software development and software operations under a shared set of values, automation tools, and metrics.</p>
<hr/>
<h2 id="2-who-is-the-software-developer" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#2-who-is-the-software-developer"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>2. Who is the Software Developer?</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">A Software Developer (or Software Engineer) is primarily responsible for translating business requirements into working software. They are builders, architects, and problem solvers of user-facing systems and internal APIs.</p>
<h3 id="the-inner-loop-of-development" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-inner-loop-of-development"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The &quot;Inner Loop&quot; of Development</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Developers operate heavily within the <strong>Inner Loop</strong> of software engineering. The Inner Loop is the iterative process of writing code, building, and testing it locally until it works. It is the phase of creation and engineering before the code gets merged into the shared repository.</p>
<div class="my-8 flex flex-col gap-0 [counter-reset:step]"><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">1. Write Code &amp; Implement Logic</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Developers write product code using programming languages like TypeScript, JavaScript, Rust, Python, or Go. They build components, setup state machines, write routing logic, and format data schemas.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">2. Compile &amp; Local Run</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Bootstrapping the app locally to test initial execution behavior. Developers use local bundlers like Vite, Turbopack, or Webpack to run local development servers (e.g., at <code>localhost:3000</code>).</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">3. Debug, Verify &amp; Test</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Running unit and integration tests (e.g., using Jest, Playwright, Vitest) to verify feature correctness. Fixing logic bugs, managing race conditions, and optimization.</p></div></div></div></div>
<h3 id="core-responsibilities" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#core-responsibilities"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Core Responsibilities</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Feature Delivery</strong>: Building responsive user interfaces, writing scalable backend services, and modeling database relationships.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Code Quality &amp; Maintenance</strong>: Ensuring code is clean, readable, well-commented, and conforms to industry design patterns.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Application Security</strong>: Sanitizing inputs, implementing authentication/authorization protocols (like JWT or OAuth), and encrypting sensitive user data at the application layer.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Local Testing</strong>: Writing comprehensive unit, integration, and end-to-end tests to guarantee regression safety before merging.</li>
</ul>
<h3 id="a-day-in-the-life-of-a-developer" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#a-day-in-the-life-of-a-developer"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>A Day in the Life of a Developer</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>09:30 AM</strong>: Standup meeting. Discuss sprint tasks, highlight blockers in API designs, and align with design/product teams.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>10:00 AM</strong>: Deep-work session. Write a new React dashboard component and integrate it with a Prisma backend API route.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>02:00 PM</strong>: Review a peer&#x27;s Pull Request. Discuss code improvements, check for potential race conditions, and verify TypeScript types.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>03:30 PM</strong>: Write unit tests to cover edge cases in user registration validation logic.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>05:00 PM</strong>: Debug a complex frontend state management bug reported by QA testers in the staging environment.</li>
</ul>
<hr/>
<h2 id="3-who-is-the-devops-engineer" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#3-who-is-the-devops-engineer"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>3. Who is the DevOps Engineer?</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">A DevOps Engineer is not just someone who writes scripts. They are platform and automation architects who build the infrastructure, pipelines, and guardrails that allow developers to ship their code safely, reliably, and rapidly.</p>
<h3 id="the-outer-loop-of-engineering" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-outer-loop-of-engineering"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The &quot;Outer Loop&quot; of Engineering</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">DevOps engineers design and maintain the <strong>Outer Loop</strong>, which starts after a developer commits their code. The Outer Loop covers integration, release, hosting, monitoring, and scaling.</p>
<div class="my-8 flex flex-col gap-0 [counter-reset:step]"><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">1. Continuous Integration (CI)</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Automating build checks, running test suites, linting, and scanning for security secrets inside the codebase. The goal is to verify that any incoming pull request doesn&#x27;t break the existing code.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">2. Continuous Delivery (CD)</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Packaging the build into a container (e.g., Docker) and deploying it automatically to staging or preview environments.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">3. Orchestration &amp; Cloud Infrastructure</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Deploying the container to production server clusters (e.g., Kubernetes) and configuring scaling parameters.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">4. Observability &amp; Log Analysis</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Monitoring server health, gathering logs, setting up alerts, and feeding usage metrics back to developers.</p></div></div></div></div>
<figure class="flex w-full flex-col items-center justify-center select-none my-4"><div class="relative w-full aspect-video overflow-hidden rounded-2xl border border-white/10 bg-black dark:bg-white p-1.5 shadow-2xl md:p-2"><video src="https://cdn.sanity.io/files/g0emqxe5/production/9177c491b4fcb6667d970a444fc05f62e9eab736.mp4" autoPlay="" loop="" muted="" playsInline="" preload="metadata" class="h-full w-full rounded-xl object-cover bg-neutral-900">Your browser does not support the video tag.</video></div><figcaption class="mt-3 text-center font-CodeFont text-sm italic text-neutral-400 select-none">Figure 2: CI/CD runners automatically building and verifying application assets in real-time</figcaption></figure>
<h3 id="the-calms-framework" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-calms-framework"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The CALMS Framework</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">DevOps is governed by five main pillars known as <strong>CALMS</strong>:</p>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Culture</strong>: Fostering shared responsibility between developers and operations teams to prevent finger-pointing.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Automation</strong>: Eliminating manual human tasks through code. If something is done more than twice, it should be automated.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Lean</strong>: Shipping small incremental changes frequently to minimize the blast radius of errors and speed up feedback.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Measurement</strong>: Collecting data on server performance, build success rates, deployment frequency, and error rates.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Sharing</strong>: Documenting lessons learned, post-mortems, and building shared reusable infrastructure modules.</li>
</ul>
<h3 id="a-day-in-the-life-of-a-devops-engineer" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#a-day-in-the-life-of-a-devops-engineer"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>A Day in the Life of a DevOps Engineer</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>09:30 AM</strong>: Standup meeting. Highlight build pipeline blockages, discuss cloud budget trends, and coordinate database migration steps.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>10:00 AM</strong>: Modify Terraform files to provision a new AWS RDS database instance with multi-AZ replication.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>12:00 PM</strong>: Debug a failing CI build runner that is running out of disk space due to container cache buildup.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>02:00 PM</strong>: Configure Prometheus alerts to send Slack notifications when API response latency exceeds 500ms.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>04:00 PM</strong>: Write and optimize a Dockerfile to reduce a production container image size from 1.2GB down to 150MB using multi-stage builds.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>05:30 PM</strong>: Hold a post-mortem meeting to review a minor staging database outage and write preventative runbooks.</li>
</ul>
<hr/>
<h2 id="4-repository-structure-comparison" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#4-repository-structure-comparison"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>4. Repository Structure Comparison</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">To see how their worlds intersect, let&#x27;s look at a typical folder structure for a modern, containerized full-stack application. You&#x27;ll notice development files and operations configurations sitting side-by-side.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">Modern Full-Stack Repository</span></div><div class="bg-neutral-950/60 dark:bg-[#f6f8fa] p-4 overflow-x-auto custom-scroll"><div class="text-xs sm:text-[13px] leading-relaxed text-neutral-300 dark:text-neutral-800 select-none flex flex-col gap-0.5 font-CodeFont"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">production-portal</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">.github</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">workflows</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">ci-cd.yml</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->DevOps: GitHub Actions deployment pipeline configuration</span></div></div></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">infra</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-neutral-400 dark:text-neutral-500"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">main.tf</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->DevOps: Terraform Infrastructure-as-Code for AWS</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-neutral-400 dark:text-neutral-500"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">variables.tf</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->DevOps: Configuration variables for cloud provisioning</span></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">kubernetes</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">deployment.yaml</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->DevOps: K8s pod configuration &amp; replicas</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">ingress.yaml</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->DevOps: Ingress controller routing configuration</span></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">src</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">app</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">page.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Dev: Next.js frontend page component</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">layout.tsx</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Dev: App shell and layout structure</span></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">lib</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-blue-400 dark:text-blue-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">db.ts</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Dev: Prisma client connection layer</span></div></div></div></div></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-neutral-400 dark:text-neutral-500"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">Dockerfile</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->DevOps/Dev: Container build recipe</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">docker-compose.yml</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->DevOps: Local multi-container orchestrator</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">package.json</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Dev: Application scripts &amp; dependencies</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">tsconfig.json</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Dev: TypeScript compiler parameters</span></div></div></div></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">While the developer spends 90% of their time inside the <mark class="px-1.5 py-0.5 rounded-md border font-medium bg-pink-500/15 text-pink-300 border-pink-500/25 dark:bg-pink-500/10 dark:text-pink-700 dark:border-pink-400/30">src/</mark> directory building UI and business logic, the DevOps engineer is focused on fine-tuning <mark class="px-1.5 py-0.5 rounded-md border font-medium bg-blue-500/15 text-blue-300 border-blue-500/25 dark:bg-blue-500/10 dark:text-blue-700 dark:border-blue-400/30">Dockerfile</mark>, Kubernetes configurations, and the automation scripts under <mark class="px-1.5 py-0.5 rounded-md border font-medium bg-green-500/15 text-green-300 border-green-500/25 dark:bg-green-500/10 dark:text-green-700 dark:border-green-400/30">.github/workflows/</mark>.</p>
<hr/>
<h2 id="5-coding-styles-dev-route-vs-devops-config" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#5-coding-styles-dev-route-vs-devops-config"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>5. Coding Styles: Dev Route vs. DevOps Config</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Let’s look at what each engineer actually writes. Click through the tabs below to contrast a typical backend user sign-up route written by a developer with a terraform configuration written by a DevOps engineer.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-xl"><div class="relative flex border-b border-neutral-800/60 dark:border-neutral-200 bg-neutral-900/50 dark:bg-neutral-50 overflow-x-auto custom-scroll"><div class="absolute bottom-0 h-[2px] bg-pink-500 rounded-full transition-all duration-250 ease-in-out" style="left:0;width:0"></div></div><div class="p-4 sm:p-5"><div class="animate-in fade-in duration-200"><div class="flex w-full max-w-4xl flex-col rounded-xl border border-neutral-800/80 dark:border-neutral-200/80 bg-[#0d0d0d] dark:bg-[#f6f8fa] shadow-2xl overflow-hidden"><div class="flex items-center justify-between px-4 pt-4 pb-3"><span class="flex items-center gap-2 text-xs font-CodeFont text-neutral-400 bg-neutral-900 dark:bg-neutral-200/60 dark:text-neutral-600 px-2.5 py-1.5 rounded-md border border-neutral-700/50 dark:border-neutral-300/50 shadow-sm"><span class="inline-block w-2 h-2 rounded-full shrink-0 bg-blue-500"></span>TypeScript</span><button class="group rounded-md p-1.5 hover:bg-neutral-800/60 dark:hover:bg-neutral-200 transition-all duration-200 cursor-pointer" aria-label="Copy code"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy w-4 h-4 text-neutral-500 group-hover:text-neutral-300 dark:text-neutral-400 dark:group-hover:text-neutral-700 transition-colors" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></div><pre class="p-4 pt-1 overflow-x-auto text-[13.5px] sm:text-[14px] leading-[1.8] tracking-wide text-neutral-300 dark:text-neutral-800 custom-scroll font-CodeFont"><code class="hljs language-typescript"><span class="hljs-comment">// src/app/api/signup/route.ts</span>
<span class="hljs-comment">// The developer writes code to handle API calls, validate data, and save users.</span>
<span class="hljs-keyword">import</span> { <span class="hljs-title class_">NextResponse</span> } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;next/server&#x27;</span>;
<span class="hljs-keyword">import</span> { prisma } <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@/lib/prisma&#x27;</span>;
<span class="hljs-keyword">import</span> bcrypt <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;bcrypt&#x27;</span>;

<span class="hljs-keyword">const</span> <span class="hljs-variable constant_">EMAIL_REGEX</span> = <span class="hljs-regexp">/^[^\s@]+@[^\s@]+\.[^\s@]+$/</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">async</span> <span class="hljs-keyword">function</span> <span class="hljs-title function_">POST</span>(<span class="hljs-params"><span class="hljs-attr">request</span>: <span class="hljs-title class_">Request</span></span>) {
  <span class="hljs-keyword">try</span> {
    <span class="hljs-keyword">const</span> body = <span class="hljs-keyword">await</span> request.<span class="hljs-title function_">json</span>();
    <span class="hljs-keyword">const</span> { email, password, username } = body;

    <span class="hljs-comment">// 1. Strict validation checks</span>
    <span class="hljs-keyword">if</span> (!email || !password || !username) {
      <span class="hljs-keyword">return</span> <span class="hljs-title class_">NextResponse</span>.<span class="hljs-title function_">json</span>(
        { <span class="hljs-attr">error</span>: <span class="hljs-string">&#x27;Missing required fields: email, password, username&#x27;</span> },
        { <span class="hljs-attr">status</span>: <span class="hljs-number">400</span> }
      );
    }

    <span class="hljs-keyword">if</span> (!<span class="hljs-variable constant_">EMAIL_REGEX</span>.<span class="hljs-title function_">test</span>(email)) {
      <span class="hljs-keyword">return</span> <span class="hljs-title class_">NextResponse</span>.<span class="hljs-title function_">json</span>(
        { <span class="hljs-attr">error</span>: <span class="hljs-string">&#x27;Invalid email format&#x27;</span> },
        { <span class="hljs-attr">status</span>: <span class="hljs-number">400</span> }
      );
    }

    <span class="hljs-keyword">if</span> (password.<span class="hljs-property">length</span> &lt; <span class="hljs-number">8</span>) {
      <span class="hljs-keyword">return</span> <span class="hljs-title class_">NextResponse</span>.<span class="hljs-title function_">json</span>(
        { <span class="hljs-attr">error</span>: <span class="hljs-string">&#x27;Password must be at least 8 characters long&#x27;</span> },
        { <span class="hljs-attr">status</span>: <span class="hljs-number">400</span> }
      );
    }

    <span class="hljs-comment">// 2. Check if the user already exists in PostgreSQL</span>
    <span class="hljs-keyword">const</span> existingUser = <span class="hljs-keyword">await</span> prisma.<span class="hljs-property">user</span>.<span class="hljs-title function_">findUnique</span>({
      <span class="hljs-attr">where</span>: { email },
    });

    <span class="hljs-keyword">if</span> (existingUser) {
      <span class="hljs-keyword">return</span> <span class="hljs-title class_">NextResponse</span>.<span class="hljs-title function_">json</span>(
        { <span class="hljs-attr">error</span>: <span class="hljs-string">&#x27;A user with this email already exists&#x27;</span> },
        { <span class="hljs-attr">status</span>: <span class="hljs-number">409</span> }
      );
    }

    <span class="hljs-comment">// 3. Hash password with bcrypt (salt rounds = 10)</span>
    <span class="hljs-keyword">const</span> hashedPassword = <span class="hljs-keyword">await</span> bcrypt.<span class="hljs-title function_">hash</span>(password, <span class="hljs-number">10</span>);

    <span class="hljs-comment">// 4. Create and persist user in the database (excl. password in response)</span>
    <span class="hljs-keyword">const</span> user = <span class="hljs-keyword">await</span> prisma.<span class="hljs-property">user</span>.<span class="hljs-title function_">create</span>({
      <span class="hljs-attr">data</span>: {
        <span class="hljs-attr">email</span>: email.<span class="hljs-title function_">toLowerCase</span>(),
        <span class="hljs-attr">username</span>: username.<span class="hljs-title function_">trim</span>(),
        <span class="hljs-attr">password</span>: hashedPassword,
      },
      <span class="hljs-attr">select</span>: {
        <span class="hljs-attr">id</span>: <span class="hljs-literal">true</span>,
        <span class="hljs-attr">email</span>: <span class="hljs-literal">true</span>,
        <span class="hljs-attr">username</span>: <span class="hljs-literal">true</span>,
        <span class="hljs-attr">createdAt</span>: <span class="hljs-literal">true</span>,
      }
    });

    <span class="hljs-keyword">return</span> <span class="hljs-title class_">NextResponse</span>.<span class="hljs-title function_">json</span>(
      { <span class="hljs-attr">success</span>: <span class="hljs-literal">true</span>, <span class="hljs-attr">message</span>: <span class="hljs-string">&#x27;User registered successfully&#x27;</span>, user },
      { <span class="hljs-attr">status</span>: <span class="hljs-number">201</span> }
    );
  } <span class="hljs-keyword">catch</span> (<span class="hljs-attr">error</span>: <span class="hljs-built_in">any</span>) {
    <span class="hljs-variable language_">console</span>.<span class="hljs-title function_">error</span>(<span class="hljs-string">&#x27;Signup error:&#x27;</span>, error);
    <span class="hljs-keyword">return</span> <span class="hljs-title class_">NextResponse</span>.<span class="hljs-title function_">json</span>(
      { <span class="hljs-attr">error</span>: <span class="hljs-string">&#x27;Internal server error&#x27;</span> },
      { <span class="hljs-attr">status</span>: <span class="hljs-number">500</span> }
    );
  }
}
</code></pre></div></div></div></div>
<hr/>
<h2 id="6-real-time-collaboration-the-pipeline" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#6-real-time-collaboration-the-pipeline"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>6. Real-Time Collaboration: The Pipeline</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">To visualize how a Developer and a DevOps Engineer collaborate in real-time, here is a visual flow of a change migrating through the system:</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-branch w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">Flow Diagram</span></div><div class="overflow-x-auto custom-scroll bg-neutral-950/60 dark:bg-[#f6f8fa] p-6"><pre class="m-0 p-0 border-0 bg-transparent text-[12px] sm:text-[13px] leading-relaxed tracking-wide text-neutral-300 dark:text-neutral-700 font-CodeFont whitespace-pre [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:p-0 [&amp;&gt;pre]:bg-transparent [&amp;_code]:bg-transparent [&amp;_code]:p-0 [&amp;_code]:text-inherit"><pre><code class="hljs language-text">┌─────────────────┐       ┌─────────────────┐       ┌─────────────────────────┐
│ Developer       │ ───&gt;  │ Git Repository  │ ───&gt;  │ GitHub Actions Runner   │
│ (Commits Code)  │       │ (Pull Request)  │       │ (CI check compiles code)│
└─────────────────┘       └─────────────────┘       └─────────────────────────┘
                                                                 │
                                                                 │ Runs Tests &amp; Builds
                                                                 v
┌─────────────────┐       ┌─────────────────┐       ┌─────────────────────────┐
│ Production Host │ &lt;───  │ Docker Registry │ &lt;───  │ DevOps Pipeline         │
│ (Rolling Deploy)│       │ (Stores Image)  │       │ (Packages container)    │
└─────────────────┘       └─────────────────┘       └─────────────────────────┘
</code></pre></pre></div></div>
<hr/>
<h2 id="7-technical-comparison-matrix" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#7-technical-comparison-matrix"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>7. Technical Comparison Matrix</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here is an exhaustive snapshot of the tools, philosophies, pain points, metrics, and troubleshooting models that define each profession:</p>
<div class="my-8 w-full overflow-x-auto rounded-xl border border-neutral-200/10 dark:border-neutral-800/20 bg-black/10 dark:bg-white/5 shadow-xl"><table class="min-w-full text-left text-[13.5px] font-alata text-neutral-200 dark:text-neutral-800 border-collapse"><thead class="bg-neutral-950/60 dark:bg-neutral-100/80 border-b border-neutral-200/10 dark:border-neutral-800/20"><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left">Attribute</th><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left"><span class="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide font-sans select-none bg-pink-500/10 text-pink-400 border-pink-500/25 dark:bg-pink-50 dark:text-pink-700 dark:border-pink-200"><span class="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-pink-400"></span>Developer</span></th><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left"><span class="inline-flex items-center gap-1.5 rounded-full border px-2.5 py-0.5 text-[11px] font-semibold tracking-wide font-sans select-none bg-blue-500/10 text-blue-400 border-blue-500/25 dark:bg-blue-50 dark:text-blue-700 dark:border-blue-200"><span class="inline-block w-1.5 h-1.5 rounded-full shrink-0 bg-blue-400"></span>DevOps Engineer</span></th></tr></thead><tbody class="divide-y divide-neutral-200/5 dark:divide-neutral-800/10"><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Output</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Code files, visual UI elements, database records</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Pipelines, cloud infrastructure, dashboards</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Philosophy</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">&quot;How can we build this feature?&quot;</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">&quot;How can we deploy and monitor this reliably?&quot;</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Pain Points</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Hard-to-reproduce bugs, complex states</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Outages, slow deployment pipelines, cloud costs</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Key Metric</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Features shipped, sprint velocity</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Mean Time to Recovery (MTTR), Deployment frequency</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Core Tooling</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Next.js, Prisma, React, Express, Jest</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Docker, Kubernetes, AWS, Terraform, Ansible</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Daily Activity</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Coding, debugging, code reviews</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Writing IaC, fixing pipelines, setting up metrics</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Scale Focus</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Code execution complexity (Big O)</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Network requests, container orchestrations, bandwidth</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Automation</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Functional tests, mock services</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">CI/CD build scripts, server provisioning</td></tr></tbody></table></div>
<hr/>
<h2 id="8-sre-vs-platform-engineering-vs-devops" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#8-sre-vs-platform-engineering-vs-devops"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>8. SRE vs. Platform Engineering vs. DevOps</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">As technology has advanced, DevOps has branched into a few distinct sub-disciplines:</p>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>DevOps</strong>: A cultural philosophy and approach focused on breaking silos and automating delivery pipelines.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Site Reliability Engineering (SRE)</strong>: A software-engineering approach to operations. SREs focus on system availability, latency, error budgets, and ensuring the application scales without failing.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Platform Engineering</strong>: Building &quot;Internal Developer Platforms&quot; (IDPs). Platform engineers create the templates, self-service portals, and pre-configured databases that developers can spin up with one click, reducing cognitive load for developers.</li>
</ul>
<hr/>
<h2 id="9-frequently-asked-questions" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#9-frequently-asked-questions"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>9. Frequently Asked Questions</h2>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-lg divide-y divide-neutral-800/40 dark:divide-neutral-200/60"><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">Can a Software Developer do DevOps?</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Absolutely. In many startups, developers wear both hats (often called &quot;Full-Cycle Developers&quot;). However, as an organization grows, managing cloud environments, networking, compliance, and deployment pipelines becomes a full-time specialization requiring dedicated DevOps expertise.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">Do DevOps Engineers write code?</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Yes! DevOps engineers write automation code using bash, Python, or Go. They also write <strong>Infrastructure as Code (IaC)</strong> using tools like Terraform or Pulumi. Their focus is on building automation tooling rather than user-facing product features.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">Is DevOps a role or a culture?</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">It is both. DevOps started as a cultural movement to break down the silos between Development and Operations teams. Over time, it has evolved into a specialized role focused on the tools and platforms that enable that collaboration.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">What is the difference between DevOps and SRE?</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">While DevOps focuses on the pipeline and development speed, Site Reliability Engineering (SRE) focuses on system reliability, service-level objectives (SLOs), and automating operational tasks. DevOps asks &quot;How do we deploy?&quot;, while SRE asks &quot;How do we make it failproof?&quot;</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">Which career path pays more?</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Both paths offer highly competitive salaries. DevOps engineers often earn a premium at mid-to-senior levels due to the scarcity of specialists who understand both software engineering and complex cloud infrastructure.</p></div></div></div></div><div class="bg-neutral-950/30 dark:bg-[#f6f8fa]/60 transition-colors hover:bg-neutral-950/50 dark:hover:bg-white/40"><button class="flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-neutral-100 dark:text-neutral-900 outline-none cursor-pointer gap-3"><span class="leading-snug">Should I start my career in Dev or DevOps?</span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-right size-4 shrink-0 text-neutral-500 dark:text-neutral-400 transition-transform duration-300" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></button><div class="grid transition-all duration-300 ease-in-out grid-rows-[0fr] opacity-0"><div class="overflow-hidden"><div class="px-5 pb-5 pt-1 text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600 border-t border-neutral-800/30 dark:border-neutral-200/30"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Starting as a Software Developer is generally easier because it focuses on core programming principles. Once you understand how code is written, shifting into DevOps is much smoother as you already understand the needs of the developers you are building platforms for.</p></div></div></div></div></div>
<hr/>
<h2 id="10-conclusion-breaking-down-the-silos" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#10-conclusion-breaking-down-the-silos"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>10. Conclusion: Breaking Down the Silos</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">A healthy engineering organization does not have a &quot;wall&quot; between developers and DevOps. Instead, they operate as a feedback loop. Developers write application code, while DevOps builds the automation platforms that allow that code to be shipped and monitored safely.</p>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">Pro Tip for Aspiring Engineers</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you are a developer, learning the basics of Docker and CI/CD pipelines will make you twice as valuable to any engineering team. If you are in DevOps, understanding how code works allows you to build much better platforms for your developers.</p></div></div></div>
<h3 id="recommended-resources" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#recommended-resources"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Recommended Resources</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you want to dig deeper into the world of DevOps and system design, check out these excellent external resources:</p>
<a href="https://roadmap.sh/devops" target="_blank" rel="noopener noreferrer" class="group my-3 flex items-center justify-between gap-4 rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/40 dark:bg-[#f6f8fa] p-4 shadow-sm hover:shadow-lg hover:border-pink-500/40 dark:hover:border-pink-500/40 transition-all duration-300 no-underline decoration-transparent"><div class="flex items-center gap-3.5 min-w-0"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-pink-500/10 dark:bg-pink-500/8 border border-pink-500/15 dark:border-pink-500/20 text-pink-500 dark:text-pink-600 transition-all duration-200 group-hover:bg-pink-500/20 group-hover:scale-105"><span class="text-lg leading-none">🗺️</span></div><div class="min-w-0"><p class="m-0 text-sm font-semibold text-neutral-100 dark:text-neutral-900 truncate group-hover:text-white dark:group-hover:text-black transition-colors">The DevOps Roadmap</p><p class="m-0 mt-0.5 text-xs text-neutral-500 dark:text-neutral-500 line-clamp-1 font-CodeFont">A comprehensive step-by-step guide to becoming a DevOps engineer, covering technologies, certifications, and pathways.</p></div></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link size-4 shrink-0 text-neutral-600 group-hover:text-pink-500 dark:group-hover:text-pink-600 transition-all duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>
<a href="https://docs.docker.com/" target="_blank" rel="noopener noreferrer" class="group my-3 flex items-center justify-between gap-4 rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 bg-neutral-950/40 dark:bg-[#f6f8fa] p-4 shadow-sm hover:shadow-lg hover:border-pink-500/40 dark:hover:border-pink-500/40 transition-all duration-300 no-underline decoration-transparent"><div class="flex items-center gap-3.5 min-w-0"><div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-pink-500/10 dark:bg-pink-500/8 border border-pink-500/15 dark:border-pink-500/20 text-pink-500 dark:text-pink-600 transition-all duration-200 group-hover:bg-pink-500/20 group-hover:scale-105"><span class="text-lg leading-none">🐳</span></div><div class="min-w-0"><p class="m-0 text-sm font-semibold text-neutral-100 dark:text-neutral-900 truncate group-hover:text-white dark:group-hover:text-black transition-colors">Docker Documentation</p><p class="m-0 mt-0.5 text-xs text-neutral-500 dark:text-neutral-500 line-clamp-1 font-CodeFont">Learn the fundamentals of containerization and how to package your apps to run anywhere.</p></div></div><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link size-4 shrink-0 text-neutral-600 group-hover:text-pink-500 dark:group-hover:text-pink-600 transition-all duration-200 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a>
<hr/>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]"><em>Written by Mudassir Asghar... Happy coding!</em></p></div><p class="mt-6 font-alata text-neutral-600 dark:text-neutral-400 text-[13px] sm:text-[14px]">Published on <span class="font-medium text-neutral-900 dark:text-neutral-200">June 12, 2026</span></p>]]></content>
    <category term="Development" label="Development" />
    <category term="DevOps" label="DevOps" />
    <category term="CI-CD" label="CI-CD" />
    <category term="Software-Engineering" label="Software-Engineering" />
  </entry>
  <entry>
    <title><![CDATA[What Nobody Tells You About Learning DevOps]]></title>
    <link href="https://mudassirasghar.dev/blog/what-nobody-tells-you-about-learning-devops" rel="alternate" type="text/html" />
    <id>https://mudassirasghar.dev/blog/what-nobody-tells-you-about-learning-devops</id>
    <updated>2026-06-05T00:00:00.000Z</updated>
    <published>2026-06-05T00:00:00.000Z</published>
    <summary><![CDATA[The lessons, challenges, and mindset shifts every aspiring DevOps engineer discovers sooner or later. Focus on principles over tools.]]></summary>
    <content type="html"><![CDATA[<div class=" prose prose-lg prose-invert dark:prose max-w-none prose-headings:scroll-mt-28 prose-headings:font-bold prose-h1:text-3xl sm:prose-h1:text-4xl prose-h2:text-2xl sm:prose-h2:text-3xl prose-h3:text-xl sm:prose-h3:text-2xl prose-p:text-white/80 dark:prose-p:text-neutral-800/80 prose-p:leading-relaxed prose-p:my-5 prose-a:text-indigo-400 dark:prose-a:text-indigo-600 prose-a:no-underline hover:prose-a:underline prose-ul:my-4 prose-ul:marker:text-indigo-400 dark:prose-ul:marker:text-indigo-600 prose-ol:my-4 prose-li:leading-relaxed prose-blockquote:border-l-indigo-500/40 prose-blockquote:bg-white/5 dark:prose-blockquote:bg-black/5 prose-blockquote:px-4 prose-blockquote:py-3 prose-blockquote:rounded-md prose-blockquote:my-6 prose-pre:bg-[#111] prose-pre:border prose-pre:border-white/10  prose-pre:rounded-lg prose-pre:p-4 prose-code:bg-white/10 dark:prose-code:bg-black/10 prose-code:px-1.5 prose-code:py-0.5  prose-code:rounded prose-code:text-indigo-300 dark:prose-code:text-indigo-600 prose-hr:border-white/10 dark:prose-hr:border-black/10 prose-hr:my-10 prose-table:border-collapse prose-th:bg-white/5 dark:prose-th:bg-black/5 prose-td:border-white/10 dark:prose-td:border-black/10 prose-tr:border-white/10 dark:prose-tr:border-black/10 prose-td:p-3 prose-th:p-3"><figure class="flex w-full flex-col items-center justify-center select-none my-4"><div class="relative w-full aspect-video overflow-hidden rounded-2xl border border-white/10 bg-black dark:bg-white p-1.5 shadow-2xl md:p-2"><video src="https://cdn.sanity.io/files/g0emqxe5/production/fa484b2689dafdf01bfb96c2b2127d2760e5094d.mp4" autoPlay="" loop="" muted="" playsInline="" preload="metadata" class="h-full w-full rounded-xl object-cover bg-neutral-900">Your browser does not support the video tag.</video></div></figure>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Let’s be honest: the internet is flooded with &quot;How to become a DevOps engineer in 3 months&quot; roadmaps. You’ve probably seen them—massive, intimidating tree diagrams containing fifty different tool logos, from Docker and Kubernetes to Terraform, Ansible, AWS, Prometheus, and Jenkins.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you&#x27;re just starting out, your immediate reaction is probably panic. <em>Do I really need to master all of this just to get an entry-level job?</em></p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here is the short answer: No.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">And here is the truth that most bootcamp sellers and certificate mills won&#x27;t tell you: <strong>DevOps is one of the most misunderstood areas in tech.</strong> Most beginners spend months memorizing YAML syntax and tool flags, only to freeze during a real interview when asked to debug a simple networking issue.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Let’s skip the marketing fluff and talk about how DevOps actually works in the real world, why tool fatigue is a trap, and what you should focus on instead.</p>
<div class="my-6 grid grid-cols-1 gap-2 sm:grid-cols-2 max-w-4xl mx-auto w-full"><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/what-nobody-tells-you-about-learning-devops-body-1.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/what-nobody-tells-you-about-learning-devops-body-2.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">The DevOps Definition (Without the Buzzwords)</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">DevOps isn&#x27;t a software package you install, and it isn&#x27;t just a job title. It&#x27;s a way of working. It exists because developers want to push code fast, and operations teams want to keep the servers from crashing. DevOps is the glue (and the automation) that keeps these two sides from killing each other.</p></div></div></div>
<hr/>
<h2 id="1-the-tool-hype-is-a-trap-and-why-youre-burning-out" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#1️⃣-the-tool-hype-is-a-trap-and-why-youre-burning-out"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>1️⃣ The Tool Hype Is a Trap (And Why You&#x27;re Burning Out)</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you treat DevOps like a checklist of tools, you are going to burn out. Fast.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The industry changes constantly. The tool that is hot today might be deprecated tomorrow. But the fundamental problems they solve? Those haven&#x27;t changed in thirty years.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">When companies hire a DevOps engineer, they aren&#x27;t paying for someone who has memorized Terraform commands. They are paying for someone who understands how to bridge the gap between code and running servers safely.</p>
<h3 id="understanding-the-wall-of-confusion" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#understanding-the-wall-of-confusion"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Understanding the &quot;Wall of Confusion&quot;</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">To understand why DevOps exists, you have to look at the history of software development. Historically, companies had two distinct silos:</p>
<ol class="list-decimal ml-6 mt-3 mb-6 space-y-2 text-gray-300  marker:text-neutral-400">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Development (Dev):</strong> Incentivized to ship new features as fast as possible.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Operations (Ops):</strong> Incentivized to keep the production environment stable, which naturally meant resisting change.</li>
</ol>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Developers would build software, bundle it up, and literally &quot;throw it over the wall&quot; to the operations team to run it. When the application crashed in production, developers would blame operations (claiming &quot;it worked on my machine&quot;), and operations would blame the developers&#x27; code.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">DevOps is the methodology designed to tear down this wall.</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-branch w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">Flow Diagram</span></div><div class="overflow-x-auto custom-scroll bg-neutral-950/60 dark:bg-[#f6f8fa] p-6"><pre class="m-0 p-0 border-0 bg-transparent text-[12px] sm:text-[13px] leading-relaxed tracking-wide text-neutral-300 dark:text-neutral-700 font-CodeFont whitespace-pre [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:p-0 [&amp;&gt;pre]:bg-transparent [&amp;_code]:bg-transparent [&amp;_code]:p-0 [&amp;_code]:text-inherit"><pre><code class="hljs language-text">   DEVELOPERS [Dev]                          OPERATORS [Ops]
+--------------------+                     +--------------------+
|  Wants to change   |    Throws Code      |  Wants to maintain |
|  features quickly  |  ================&gt;  |  stability, avoids |
|  to satisfy users  |   Over the Wall     |  risky deployments |
+--------------------+                     +--------------------+
</code></pre></pre></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Let&#x27;s look at the shift from learning a tool&#x27;s syntax to understanding its actual purpose:</p>
<h3 id="docker-is-not-just-about-writing-dockerfiles" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#docker-is-not-just-about-writing-dockerfiles"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Docker is not just about writing Dockerfiles</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Most tutorials teach you to write <code>FROM node:alpine</code>, <code>COPY . .</code>, and call it a day. But that&#x27;s just packaging.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">In the real world, you need to know <em>why</em> we containerize. We do it to isolate processes and ensure consistency across developer laptops, staging environments, and production servers. Under the hood, containers aren&#x27;t mini Virtual Machines. They don&#x27;t run their own guest operating systems. They are just regular Linux processes running inside a partition, sharing the host kernel.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you want to understand Docker, skip the syntax and learn how the Linux kernel keeps them apart:</p>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Namespaces:</strong> What isolates what the process can see. For example, a process inside a net namespace thinks it has its own private loopback interface and routing table, completely unaware of other networks on the host.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Control Groups (cgroups):</strong> What keeps a buggy database container from eating up 100% of your server’s CPU or memory. If a container exceeds its cgroup memory limit, the host kernel triggers the OOM killer and shuts it down.</li>
</ul>
<h3 id="terraform-is-not-just-about-running-apply" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#terraform-is-not-just-about-running-apply"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Terraform is not just about running <code>apply</code></h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">It&#x27;s easy to copy-paste a resource block to spin up an EC2 instance. But what happens when someone manually logs into the AWS console and changes a security group? Or when two developers run <code>terraform apply</code> at the same time and corrupt the state file?</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Real Infrastructure as Code (IaC) expertise is about:</p>
<ol class="list-decimal ml-6 mt-3 mb-6 space-y-2 text-gray-300  marker:text-neutral-400">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>State Management:</strong> Understanding how Terraform maps your code to real-world cloud resources.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Concurrency and State Locking:</strong> Using a backend like S3 with DynamoDB to prevent two developers from applying changes simultaneously.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Handling Configuration Drift:</strong> How to detect and remediate changes made directly in the cloud console without updating the code.</li>
</ol>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-red-500/8 dark:bg-red-500/5 border-red-500/20 dark:border-red-400/30 ring-red-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-red-400 dark:bg-red-500 shadow-[0_0_12px_rgba(248,113,113,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-x size-[18px] text-red-400 dark:text-red-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m15 9-6 6"></path><path d="m9 9 6 6"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-red-100 dark:text-red-900">Common IaC Anti-Pattern</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-red-200/80 dark:text-red-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]"><strong>Manual Tweaks (Clickops)</strong>: The quickest way to ruin an IaC setup is letting developers log into the AWS/GCP console to &quot;quickly fix&quot; a security group or change an instance size. The moment someone does this, your Terraform state is out of sync, and the next automated deployment might overwrite their manual changes, causing an unexpected outage.</p></div></div></div>
<h3 id="cicd-is-not-just-about-yaml-pipelines" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#cicd-is-not-just-about-yaml-pipelines"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>CI/CD is not just about YAML pipelines</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Writing a GitHub Actions runner is simple. The hard part is designing the release strategy. How do you deploy a new version of an app that serves millions of users without dropping a single request?
This is where you need to understand deployment paradigms:</p>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Canary Deployments:</strong> Sending only 5% of users to the new version to monitor for errors before rolling it out to everyone.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Blue-Green Deployments:</strong> Having two identical environments (Blue is active, Green is idle). You deploy the new code to Green, run tests, and swap the router configuration instantly.</li>
</ul>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-branch w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">Flow Diagram</span></div><div class="overflow-x-auto custom-scroll bg-neutral-950/60 dark:bg-[#f6f8fa] p-6"><pre class="m-0 p-0 border-0 bg-transparent text-[12px] sm:text-[13px] leading-relaxed tracking-wide text-neutral-300 dark:text-neutral-700 font-CodeFont whitespace-pre [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:p-0 [&amp;&gt;pre]:bg-transparent [&amp;_code]:bg-transparent [&amp;_code]:p-0 [&amp;_code]:text-inherit"><pre><code class="hljs language-text"> BLUE-GREEN ROUTING
 
                  [ User Traffic ]
                         │
                         ▼
               [ Load Balancer/Router ]
                 /                  \
   (Active 100%) /                    \ (New Release / Testing)
                ▼                      ▼
        +---------------+      +---------------+
        |  Environment  |      |  Environment  |
        |     BLUE      |      |     GREEN     |
        |    (v1.0.0)   |      |    (v1.1.0)   |
        +---------------+      +---------------+
</code></pre></pre></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Let&#x27;s summarize the difference between focusing on tool syntax versus focusing on the underlying fundamentals:</p>
<div class="my-8 w-full overflow-x-auto rounded-xl border border-neutral-200/10 dark:border-neutral-800/20 bg-black/10 dark:bg-white/5 shadow-xl"><table class="min-w-full text-left text-[13.5px] font-alata text-neutral-200 dark:text-neutral-800 border-collapse"><thead class="bg-neutral-950/60 dark:bg-neutral-100/80 border-b border-neutral-200/10 dark:border-neutral-800/20"><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left">Tool</th><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left">Surface Level (Syntax)</th><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left">Deep Level (Fundamentals)</th></tr></thead><tbody class="divide-y divide-neutral-200/5 dark:divide-neutral-800/10"><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Docker</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Writing standard <code>Dockerfile</code> commands</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Linux namespaces, cgroups, process isolation</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Terraform</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Running <code>terraform apply</code></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">State file locking, drift detection, resource graphs</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Github Actions</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Triggering a job on <code>git push</code></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Deployment strategies, caching, artifact management</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><strong>Kubernetes</strong></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Writing 100-line YAML manifests</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Container Network Interfaces (CNI), control plane loops</td></tr></tbody></table></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">The DevOps Rule of Thumb</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Never learn a tool without first understanding the manual pain it was designed to fix. If you don&#x27;t know the headache of manually ssh-ing into ten servers to configure Nginx, you won&#x27;t appreciate why we use Ansible or Terraform.</p></div></div></div>
<div class="my-12 flex w-full items-center justify-center gap-4"><div class="h-px flex-1 max-w-[140px] bg-gradient-to-r from-transparent to-neutral-700 dark:to-neutral-300"></div><div class="flex gap-1.5 items-center"><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span><span class="block w-1.5 h-1.5 rounded-full bg-neutral-500 dark:bg-neutral-500"></span><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span></div><div class="h-px flex-1 max-w-[140px] bg-gradient-to-l from-transparent to-neutral-700 dark:to-neutral-300"></div></div>
<h2 id="2-linux-and-networking-the-foundations-you-cant-skip" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#2️⃣-linux-and-networking-the-foundations-you-cant-skip"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>2️⃣ Linux and Networking: The Foundations You Can&#x27;t Skip</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here is a common scenario: An aspiring engineer spends weeks learning Kubernetes. They deploy an application, but it can&#x27;t connect to the database. They run <code>kubectl logs</code> and see a generic connection timeout.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">They are stuck. Why? Because they don&#x27;t know basic Linux networking.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you don&#x27;t know how packets move between virtual interfaces, or how to read OS logs, Kubernetes is just a black box that throws errors at you.</p>
<h3 id="the-linux-internals-that-actually-matter" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-linux-internals-that-actually-matter"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The Linux Internals that Actually Matter</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">You don&#x27;t need to be a kernel developer, but you must know how Linux operates:</p>
<ol class="list-decimal ml-6 mt-3 mb-6 space-y-2 text-gray-300  marker:text-neutral-400">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>The virtual directories:</strong> You need to understand that <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">/etc</code> is where configurations live, <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">/var/log</code> is your debugging goldmine, and <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">/proc</code> is a virtual window into running kernel processes. It&#x27;s not a real directory on your hard drive; it&#x27;s a dynamic interface created by the kernel to show system metrics on the fly.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Process Signals:</strong> When Kubernetes terminates a pod, it sends a <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">SIGTERM</code> (Signal 15) to your app. If your application code doesn&#x27;t handle <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">SIGTERM</code> correctly, it will abruptly cut off active user connections instead of shutting down gracefully. If it doesn&#x27;t respond in a reasonable time, the system escalates to <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">SIGKILL</code> (Signal 9), which terminates the process immediately.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>File Descriptors:</strong> In Linux, &quot;everything is a file.&quot; A database connection, a web socket, a text file—they all use file descriptors. When you see <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">Too many open files</code> in your server logs, you need to know how to adjust the system limits using <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">ulimit</code> or editing <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">/etc/security/limits.conf</code>.</li>
</ol>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here&#x27;s where config files typically live in a standard production project. Notice how config files, environment variables, Docker setup, and CI pipelines are separated from the raw source code:</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">Project Configuration Structure</span></div><div class="bg-neutral-950/60 dark:bg-[#f6f8fa] p-4 overflow-x-auto custom-scroll"><div class="text-xs sm:text-[13px] leading-relaxed text-neutral-300 dark:text-neutral-800 select-none flex flex-col gap-0.5 font-CodeFont"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">my-app</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">.github</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">workflows</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">ci-cd.yml</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->CI/CD Pipeline</span></div></div></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">infra</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-neutral-400 dark:text-neutral-500"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">main.tf</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Terraform Cloud Resources</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-neutral-400 dark:text-neutral-500"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">variables.tf</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Terraform Input variables</span></div></div></div><div class="flex flex-col"><button class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors cursor-pointer w-fit text-left outline-none group"><span class="text-neutral-500 dark:text-neutral-400 shrink-0 transition-transform duration-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevron-down size-3.5" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span><span class="text-yellow-400 dark:text-yellow-500 shrink-0"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open size-4" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></span><span class="font-semibold text-neutral-200 dark:text-neutral-800 group-hover:text-white dark:group-hover:text-black transition-colors">src</span></button><div class="pl-4 ml-3.5 border-l border-neutral-700/50 dark:border-neutral-300/60 flex flex-col gap-0.5 mt-0.5"><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-yellow-400 dark:text-yellow-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">server.js</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Application Code</span></div></div></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-neutral-400 dark:text-neutral-500"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">.env.example</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Environment Template</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-neutral-400 dark:text-neutral-500"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">Dockerfile</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Multi-stage Container Config</span></div><div class="flex items-center gap-1.5 py-0.5 px-1.5 rounded hover:bg-white/5 dark:hover:bg-black/5 transition-colors w-fit group"><span class="w-3.5 shrink-0"></span><span class="shrink-0 transition-colors text-emerald-400 dark:text-emerald-600"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file size-3.5" aria-hidden="true"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"></path><path d="M14 2v4a2 2 0 0 0 2 2h4"></path></svg></span><span class="text-neutral-300 dark:text-neutral-700 group-hover:text-white dark:group-hover:text-black transition-colors">docker-compose.yml</span><span class="text-neutral-600 dark:text-neutral-400 text-[10.5px] ml-2 font-sans font-normal italic">— <!-- -->Local Development Setup</span></div></div></div></div></div></div>
<h3 id="the-networking-commands-youll-use-every-day" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#the-networking-commands-youll-use-every-day"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>The Networking Commands You’ll Use Every Day</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">When production goes down, these are the commands that will save your job:</p>
<h3 id="is-our-app-actually-listening-on-the-port-we-think-it-is" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#is-our-app-actually-listening-on-the-port-we-think-it-is"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Is our app actually listening on the port we think it is?</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]"><code>ss -tulpn</code></p>
<h3 id="can-we-resolve-the-hostname-of-our-database" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#can-we-resolve-the-hostname-of-our-database"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Can we resolve the hostname of our database?</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]"><code>dig database.internal.net</code></p>
<h3 id="what-is-nginx-actually-receiving-lets-check-headers" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#what-is-nginx-actually-receiving-lets-check-headers"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>What is Nginx actually receiving? Let&#x27;s check headers.</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]"><code>curl -Iv http://localhost:8080</code></p>
<h3 id="why-is-this-process-hanging-lets-trace-its-system-calls" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#why-is-this-process-hanging-lets-trace-its-system-calls"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Why is this process hanging? Let&#x27;s trace its system calls.</h3>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]"><code>strace -p &lt;PID&gt; -e trace=network</code></p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here’s a quick guide to what tools you actually need for common infrastructure headaches:</p>
<div class="my-8 w-full overflow-x-auto rounded-xl border border-neutral-200/10 dark:border-neutral-800/20 bg-black/10 dark:bg-white/5 shadow-xl"><table class="min-w-full text-left text-[13.5px] font-alata text-neutral-200 dark:text-neutral-800 border-collapse"><thead class="bg-neutral-950/60 dark:bg-neutral-100/80 border-b border-neutral-200/10 dark:border-neutral-800/20"><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left">What you want to do</th><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left">The tool to run</th><th class="px-4 py-3 font-semibold text-neutral-100 dark:text-neutral-900 font-CodeFont text-xs tracking-wider uppercase" style="text-align:left">Why it matters</th></tr></thead><tbody class="divide-y divide-neutral-200/5 dark:divide-neutral-800/10"><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Check port usage</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><code>ss</code> or <code>netstat</code></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Verifying if your app is binding to the correct port</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Trace DNS lookups</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><code>dig</code> or <code>nslookup</code></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Finding out if your internal domain name resolution is broken</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">View live hardware metrics</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><code>htop</code> or <code>top</code></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Identifying which resource (CPU, RAM) is bottlenecking</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Read raw system calls</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><code>strace</code></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Debugging why an application is stuck or refusing connections</td></tr><tr class="hover:bg-white/[0.02] dark:hover:bg-black/[0.02] transition-colors duration-150"><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Inspect disk allocation</td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left"><code>df -h</code></td><td class="px-4 py-3.5 font-CodeFont text-neutral-300 dark:text-neutral-700 leading-relaxed max-w-xs sm:max-w-none" style="text-align:left">Spotting if a log directory filled up 100% of your disk</td></tr></tbody></table></div>
<div class="my-12 flex w-full items-center justify-center gap-4"><div class="h-px flex-1 max-w-[140px] bg-gradient-to-r from-transparent to-neutral-700 dark:to-neutral-300"></div><div class="flex gap-1.5 items-center"><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span><span class="block w-1.5 h-1.5 rounded-full bg-neutral-500 dark:bg-neutral-500"></span><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span></div><div class="h-px flex-1 max-w-[140px] bg-gradient-to-l from-transparent to-neutral-700 dark:to-neutral-300"></div></div>
<h2 id="3-staring-at-logs-the-reality-of-debugging" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#3️⃣-staring-at-logs-the-reality-of-debugging"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>3️⃣ Staring at Logs: The Reality of Debugging</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you think DevOps is about writing clean, complex automation scripts all day, let me share a reality check: <strong>Most of your time will be spent debugging configurations that worked perfectly on staging but broke in production.</strong></p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Let’s run through a real-world scenario. You get an alert: <em>Production web server is throwing 502 Bad Gateway.</em></p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Here is how Nginx interfaces with your backend node application:</p>
<div class="my-6 w-full max-w-4xl overflow-hidden rounded-xl border border-neutral-800/60 dark:border-neutral-200/80 shadow-xl"><div class="flex items-center gap-2 px-4 py-2.5 bg-neutral-900/80 dark:bg-neutral-100 border-b border-neutral-800/60 dark:border-neutral-200"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-git-branch w-3.5 h-3.5 text-neutral-500 dark:text-neutral-400" aria-hidden="true"><line x1="6" x2="6" y1="3" y2="15"></line><circle cx="18" cy="6" r="3"></circle><circle cx="6" cy="18" r="3"></circle><path d="M18 9a9 9 0 0 1-9 9"></path></svg><span class="text-[11px] font-semibold tracking-widest uppercase text-neutral-500 dark:text-neutral-400 font-CodeFont">Flow Diagram</span></div><div class="overflow-x-auto custom-scroll bg-neutral-950/60 dark:bg-[#f6f8fa] p-6"><pre class="m-0 p-0 border-0 bg-transparent text-[12px] sm:text-[13px] leading-relaxed tracking-wide text-neutral-300 dark:text-neutral-700 font-CodeFont whitespace-pre [&amp;&gt;pre]:m-0 [&amp;&gt;pre]:p-0 [&amp;&gt;pre]:bg-transparent [&amp;_code]:bg-transparent [&amp;_code]:p-0 [&amp;_code]:text-inherit"><pre><code class="hljs language-text">                  THE 502 BAD GATEWAY FLOW
                  
+--------------+        HTTP Get       +-------------------+
| User Browser | ====================&gt; |   Reverse Proxy   |
+--------------+                       |   (Nginx/APIGW)   |
                                       +-------------------+
                                                 ||
                                                 || Connection
                                                 || Refused!
                                                 \/
                                       +-------------------+
                                       |  App (Node/Go)    |
                                       |  Port: 3000       |
                                       |  [CRASHED / OOM]  |
                                       +-------------------+
</code></pre></pre></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Let&#x27;s walk step-by-step through how a human engineer troubleshoots this incident instead of blindly running random commands they found on Google:</p>
<div class="my-8 flex flex-col gap-0 [counter-reset:step]"><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Don&#x27;t guess. Read Nginx logs</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">First, check Nginx’s error log file. On Linux systems, it’s usually at <code>/var/log/nginx/error.log</code>.</p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you see:
<code>connect() failed (111: Connection refused) while connecting to upstream</code></p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">This tells you that Nginx itself is running fine and listening on port 80/443. The error is occurring because the upstream application server (your Node/Go app running on port 3000) is refusing connections. It’s either offline, crashed, or not binding to the correct port.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Check the application process status</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Is the backend server actually running? Check the system process.</p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If it&#x27;s a systemd service, run:
<code>systemctl status my-app</code></p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If it&#x27;s running inside Docker, run:
<code>docker ps</code></p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If the process is dead, we need to find out why it stopped. If it crashed due to an application exception, the application&#x27;s stderr log should contain a stack trace.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Check for Kernel interventions (OOM Killer)</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If the process is completely missing from the system process list and systemd indicates it exited unexpectedly, the OS kernel might have stepped in to terminate it. This happens when the application runs out of memory.</p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Run the kernel ring buffer logs query:
<code>dmesg -T | grep -i oom</code></p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you see:
<code>Out of memory: Kill process 12345 (node) score 425 or sacrifice child</code></p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Now you have the culprit. Your application has a memory leak, or you gave the container too little memory, and the Linux Out-Of-Memory (OOM) Killer stepped in to terminate it to save the rest of the OS.</p></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Isolate recent configuration changes</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">What changed in the last 30 minutes? Outages rarely happen at random. Check the Git commit log or deployment pipelines.</p><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Did a developer change a database environment variable name? Did someone commit a typo in a YAML file? Nine times out of ten, configuration drift or a bad configuration value is the root cause.</p></div></div></div></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">Production Golden Rule</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Never run a command on a production server that you don&#x27;t fully understand. Stumbling upon a <code>rm -rf</code> or a database configuration tweak on an online forum and pasting it into your production terminal is the easiest way to turn a minor glitch into a complete disaster. If your terminal hangs, don&#x27;t panic. Gently exit the process by hitting <kbd class="inline-flex items-center px-2 py-0.5 mx-0.5 rounded-md text-[11px] font-semibold font-CodeFont text-neutral-200 dark:text-neutral-700 bg-neutral-800 dark:bg-neutral-100 border border-neutral-700 dark:border-neutral-300 border-b-2 shadow-sm select-none">Ctrl + C</kbd> or <kbd class="inline-flex items-center px-2 py-0.5 mx-0.5 rounded-md text-[11px] font-semibold font-CodeFont text-neutral-200 dark:text-neutral-700 bg-neutral-800 dark:bg-neutral-100 border border-neutral-700 dark:border-neutral-300 border-b-2 shadow-sm select-none">q</kbd> instead of force-closing the window, which can leave orphaned background processes running.</p></div></div></div>
<div class="my-12 flex w-full items-center justify-center gap-4"><div class="h-px flex-1 max-w-[140px] bg-gradient-to-r from-transparent to-neutral-700 dark:to-neutral-300"></div><div class="flex gap-1.5 items-center"><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span><span class="block w-1.5 h-1.5 rounded-full bg-neutral-500 dark:bg-neutral-500"></span><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span></div><div class="h-px flex-1 max-w-[140px] bg-gradient-to-l from-transparent to-neutral-700 dark:to-neutral-300"></div></div>
<h2 id="4-the-ops-part-means-people-and-empathy" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#4️⃣-the-ops-part-means-people-and-empathy"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>4️⃣ The &quot;Ops&quot; Part Means People (And Empathy)</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">The biggest bottleneck in software delivery isn&#x27;t slow compilation times or bad tools. It’s communication.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">In traditional companies, developers and sysadmins don&#x27;t talk. Developers write code, test it on their local laptops, and throw it over the wall to Ops to run it. When it crashes, the finger-pointing begins: &quot;Your code is broken&quot; vs &quot;Your server setup is bad.&quot;</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">As a DevOps engineer, you are the bridge. You need to build trust:</p>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Stop gatekeeping:</strong> Don&#x27;t write complex scripts that only you understand. Your goal should be to build <strong>Self-Service Platforms</strong>. If a developer wants a testing database, they should be able to spin it up automatically with a simple pull request, without needing to ping you on Slack.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Write human documentation:</strong> A system that isn&#x27;t documented doesn&#x27;t exist. Write simple, clear runbooks. If a service crashes at 3:00 AM, the on-call engineer should be able to follow your documentation step-by-step to fix it without waking you up.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><strong>Embrace Blameless Post-Mortems:</strong> When things break, don&#x27;t look for someone to blame. Look for the system failure. If someone drops a production database table, the question shouldn&#x27;t be &quot;Who did this?&quot; It should be &quot;Why did our production system allow a single command to delete critical data without validation?&quot;</li>
</ul>
<div class="my-12 flex w-full items-center justify-center gap-4"><div class="h-px flex-1 max-w-[140px] bg-gradient-to-r from-transparent to-neutral-700 dark:to-neutral-300"></div><div class="flex gap-1.5 items-center"><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span><span class="block w-1.5 h-1.5 rounded-full bg-neutral-500 dark:bg-neutral-500"></span><span class="block w-1 h-1 rounded-full bg-neutral-600 dark:bg-neutral-400"></span></div><div class="h-px flex-1 max-w-[140px] bg-gradient-to-l from-transparent to-neutral-700 dark:to-neutral-300"></div></div>
<h2 id="5-a-realistic-action-plan-without-the-overwhelm" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#5️⃣-a-realistic-action-plan-without-the-overwhelm"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>5️⃣ A Realistic Action Plan (Without the Overwhelm)</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If you want to learn DevOps properly, stop trying to learn everything at once. Build a foundation layer-by-layer:</p>
<div class="my-8 flex flex-col gap-0 [counter-reset:step]"><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Start with a single virtual machine</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Don&#x27;t jump straight to the cloud. Spin up a cheap $5/month Linux VM on DigitalOcean, AWS, or Hetzner.</p><ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Connect to it using SSH keys only (disable password authentication!).</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Install Nginx and configure a reverse proxy.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Buy a cheap domain name and set up SSL manually using Let&#x27;s Encrypt certificates.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Read and rotate Nginx logs. Make mistakes, break configs, and fix them.</li>
</ul></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Master version control (Git)</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Learn Git inside out. It&#x27;s the absolute foundation of everything in DevOps.</p><ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Understand trunk-based development vs feature branching.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Practice resolving complex merge conflicts.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Learn how Git rebase works and how to squash commits.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Explore Git hooks to automate tasks locally before code is even pushed.</li>
</ul></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Containerize your applications</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Take a simple React or Node app and build a Dockerfile for it.</p><ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Learn multi-stage builds to keep your final container images tiny and secure.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Understand how container volumes work to persist data.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Write a <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">docker-compose.yml</code> file to link your web application container with a database container on a private local network.</li>
</ul></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Automate with CI/CD pipelines</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Set up a repository on GitHub or GitLab and automate the build process.</p><ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Write a workflow file that triggers on every push.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Run code linting, security scans, and unit tests automatically.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Build the Docker image and push it to a registry (like Docker Hub or GitHub Container Registry) only if the tests pass.</li>
</ul></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Adopt Infrastructure as Code (IaC)</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Stop clicking buttons in the AWS Console.</p><ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Write Terraform files to spin up your virtual machines, VPCs, and database instances.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Track your cloud resource configuration in Git.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Implement remote state storage and state locking to prepare for team collaboration.</li>
</ul></div></div></div><div class="relative flex gap-5 [counter-increment:step] group"><div class="flex flex-col items-center"><div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-neutral-800 to-neutral-900 dark:from-neutral-100 dark:to-neutral-200 border border-neutral-700/60 dark:border-neutral-300/60 shadow-md text-xs font-bold text-neutral-200 dark:text-neutral-800 before:content-[counter(step)] transition-all duration-200 group-hover:border-pink-500/50 group-hover:shadow-[0_0_12px_rgba(236,72,153,0.2)]"></div><div class="w-px flex-1 mt-1 mb-0 min-h-[1.5rem] bg-gradient-to-b from-neutral-700/60 to-transparent dark:from-neutral-300/60 dark:to-transparent last-of-type:hidden"></div></div><div class="flex-1 pb-8"><h3 class="mt-0.5 mb-2 text-sm sm:text-base font-semibold text-neutral-100 dark:text-neutral-900 leading-snug">Move to orchestration (Kubernetes) only when ready</h3><div class="text-[13.5px] leading-relaxed text-neutral-400 dark:text-neutral-600"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Do not touch Kubernetes until you are comfortable with everything above.</p><ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Start locally using lightweight distributions like K3s or Minikube.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Learn the fundamental resources: Pods, Deployments, Services, and Ingresses.</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Understand how Kubernetes schedules containers and manages configuration using ConfigMaps and Secrets.</li>
</ul></div></div></div></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Milestone Reached!</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Once you complete these steps, you will have built a solid foundation. You won&#x27;t just be copy-pasting YAML files; you&#x27;ll actually understand the flow of data, process boundaries, and how systems connect.</p></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">DevOps is a long journey. Don&#x27;t worry about learning every tool. Focus on the problems, learn operating system basics, write clear documentation, and remember—automation is there to solve human problems, not just to write cool looking code. Keep building!</p></div><p class="mt-6 font-alata text-neutral-600 dark:text-neutral-400 text-[13px] sm:text-[14px]">Published on <span class="font-medium text-neutral-900 dark:text-neutral-200">June 5, 2026</span></p>]]></content>
    <category term="DevOps" label="DevOps" />
    <category term="Linux" label="Linux" />
    <category term="Career" label="Career" />
    <category term="Automation" label="Automation" />
  </entry>
  <entry>
    <title><![CDATA[Clean Code Principles: How to Write Readable and Maintainable TypeScript]]></title>
    <link href="https://mudassirasghar.dev/blog/clean-code-principles-how-to-write-readable-and-maintainable-typescript" rel="alternate" type="text/html" />
    <id>https://mudassirasghar.dev/blog/clean-code-principles-how-to-write-readable-and-maintainable-typescript</id>
    <updated>2026-01-24T00:00:00.000Z</updated>
    <published>2026-01-24T00:00:00.000Z</published>
    <summary><![CDATA[Learn clean code principles in TypeScript to write readable, maintainable, and scalable software. Includes real-world guidelines and code examples.]]></summary>
    <content type="html"><![CDATA[<div class=" prose prose-lg prose-invert dark:prose max-w-none prose-headings:scroll-mt-28 prose-headings:font-bold prose-h1:text-3xl sm:prose-h1:text-4xl prose-h2:text-2xl sm:prose-h2:text-3xl prose-h3:text-xl sm:prose-h3:text-2xl prose-p:text-white/80 dark:prose-p:text-neutral-800/80 prose-p:leading-relaxed prose-p:my-5 prose-a:text-indigo-400 dark:prose-a:text-indigo-600 prose-a:no-underline hover:prose-a:underline prose-ul:my-4 prose-ul:marker:text-indigo-400 dark:prose-ul:marker:text-indigo-600 prose-ol:my-4 prose-li:leading-relaxed prose-blockquote:border-l-indigo-500/40 prose-blockquote:bg-white/5 dark:prose-blockquote:bg-black/5 prose-blockquote:px-4 prose-blockquote:py-3 prose-blockquote:rounded-md prose-blockquote:my-6 prose-pre:bg-[#111] prose-pre:border prose-pre:border-white/10  prose-pre:rounded-lg prose-pre:p-4 prose-code:bg-white/10 dark:prose-code:bg-black/10 prose-code:px-1.5 prose-code:py-0.5  prose-code:rounded prose-code:text-indigo-300 dark:prose-code:text-indigo-600 prose-hr:border-white/10 dark:prose-hr:border-black/10 prose-hr:my-10 prose-table:border-collapse prose-th:bg-white/5 dark:prose-th:bg-black/5 prose-td:border-white/10 dark:prose-td:border-black/10 prose-tr:border-white/10 dark:prose-tr:border-black/10 prose-td:p-3 prose-th:p-3"><hr/>
<figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/clean-code-principles-how-to-write-readable-and-maintainable-typescript-body-1.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure>
<hr/>
<h2 id="1-use-meaningful-and-descriptive-names-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#1️⃣-use-meaningful-and-descriptive-names-️"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>1️⃣ Use Meaningful and Descriptive Names 🏷️</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">Why It Matters</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Clear naming improves readability and reduces the need for unnecessary comments.</p></div></div></div>
<h3 id="naming-guidelines" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#naming-guidelines"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Naming Guidelines</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Use nouns for variables and classes</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Use verbs for functions</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Avoid unclear abbreviations</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-red-500/8 dark:bg-red-500/5 border-red-500/20 dark:border-red-400/30 ring-red-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-red-400 dark:bg-red-500 shadow-[0_0_12px_rgba(248,113,113,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-x size-[18px] text-red-400 dark:text-red-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m15 9-6 6"></path><path d="m9 9 6 6"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-red-100 dark:text-red-900">Common Error</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-red-200/80 dark:text-red-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Using short or meaningless variable names like <code>x</code>, <code>d</code>, or <code>temp</code>.</p></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">❌ <strong>Bad Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">let</span> <span class="hljs-attr">d</span>: <span class="hljs-built_in">number</span>;
</code></pre>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">✅ <strong>Good Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">let</span> <span class="hljs-attr">userAge</span>: <span class="hljs-built_in">number</span>;
</code></pre>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Best Practice</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">A good name should explain its purpose without requiring comments.</p></div></div></div>
<hr/>
<h2 id="2-keep-functions-small-and-focused-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#2️⃣-keep-functions-small-and-focused-"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>2️⃣ Keep Functions Small and Focused 🎯</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">Single Responsibility Principle</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Each function should perform only one task and do it well.</p></div></div></div>
<h3 id="benefits" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#benefits"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Benefits</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Easier testing</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Easier debugging</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Better reusability</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">Warning</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">If a function name contains “and”, it is likely doing too much.</p></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">❌ <strong>Bad Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">function</span> <span class="hljs-title function_">handleUser</span>(<span class="hljs-params"><span class="hljs-attr">user</span>: <span class="hljs-built_in">any</span></span>) {
  <span class="hljs-title function_">validateUser</span>(user);
  <span class="hljs-title function_">saveUser</span>(user);
  <span class="hljs-title function_">sendEmail</span>(user);
}
</code></pre>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">✅ <strong>Good Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">function</span> <span class="hljs-title function_">createUser</span>(<span class="hljs-params"><span class="hljs-attr">user</span>: <span class="hljs-title class_">User</span></span>) {
  <span class="hljs-title function_">validateUser</span>(user);
  <span class="hljs-title function_">persistUser</span>(user);
}
</code></pre>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">Pro Tip</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Break large functions into smaller reusable helpers.</p></div></div></div>
<hr/>
<h2 id="3-prefer-interfaces-and-types-over-any-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#3️⃣-prefer-interfaces-and-types-over-any-"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>3️⃣ Prefer Interfaces and Types Over <code>any</code> 🧩</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-red-500/8 dark:bg-red-500/5 border-red-500/20 dark:border-red-400/30 ring-red-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-red-400 dark:bg-red-500 shadow-[0_0_12px_rgba(248,113,113,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-x size-[18px] text-red-400 dark:text-red-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m15 9-6 6"></path><path d="m9 9 6 6"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-red-100 dark:text-red-900">Common Error</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-red-200/80 dark:text-red-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Using <code>any</code> removes all TypeScript safety and defeats its purpose.</p></div></div></div>
<h3 id="why-strong-typing-matters" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#why-strong-typing-matters"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Why Strong Typing Matters</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Prevents runtime bugs</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Improves IDE support</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Makes code self-documenting</li>
</ul>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">❌ <strong>Bad Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">function</span> <span class="hljs-title function_">login</span>(<span class="hljs-params"><span class="hljs-attr">user</span>: <span class="hljs-built_in">any</span></span>) {}
</code></pre>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">✅ <strong>Good Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">interface</span> <span class="hljs-title class_">User</span> {
  <span class="hljs-attr">email</span>: <span class="hljs-built_in">string</span>;
  <span class="hljs-attr">password</span>: <span class="hljs-built_in">string</span>;
}

<span class="hljs-keyword">function</span> <span class="hljs-title function_">login</span>(<span class="hljs-params"><span class="hljs-attr">user</span>: <span class="hljs-title class_">User</span></span>) {}
</code></pre>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Best Practice</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Use <code>interface</code> for objects and <code>type</code> for unions or aliases.</p></div></div></div>
<hr/>
<h2 id="4-avoid-deep-nesting-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#4️⃣-avoid-deep-nesting-"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>4️⃣ Avoid Deep Nesting 🚫</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">Warning</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Deeply nested conditions increase complexity and reduce readability.</p></div></div></div>
<h3 id="recommended-approach" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#recommended-approach"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Recommended Approach</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Use early returns</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Validate conditions early</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Keep logic flat</li>
</ul>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">❌ <strong>Bad Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">if</span> (user) {
  <span class="hljs-keyword">if</span> (user.<span class="hljs-property">isActive</span>) {
    <span class="hljs-keyword">if</span> (user.<span class="hljs-property">role</span> === <span class="hljs-string">&quot;admin&quot;</span>) {
      <span class="hljs-comment">// logic</span>
    }
  }
}
</code></pre>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">✅ <strong>Good Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">if</span> (!user || !user.<span class="hljs-property">isActive</span> || user.<span class="hljs-property">role</span> !== <span class="hljs-string">&quot;admin&quot;</span>) <span class="hljs-keyword">return</span>;

<span class="hljs-comment">// logic</span>
</code></pre>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">Pro Tip</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Early returns significantly improve code clarity.</p></div></div></div>
<hr/>
<h2 id="5-write-self-explaining-code-not-comments-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#5️⃣-write-self-explaining-code-not-comments-"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>5️⃣ Write Self-Explaining Code, Not Comments 🧠</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">Note</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Clean code should explain itself through naming and structure.</p></div></div></div>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-red-500/8 dark:bg-red-500/5 border-red-500/20 dark:border-red-400/30 ring-red-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-red-400 dark:bg-red-500 shadow-[0_0_12px_rgba(248,113,113,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-x size-[18px] text-red-400 dark:text-red-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m15 9-6 6"></path><path d="m9 9 6 6"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-red-100 dark:text-red-900">Common Error</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-red-200/80 dark:text-red-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Using comments to explain obvious code.</p></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">❌ <strong>Bad Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-comment">// Check if user is active</span>
<span class="hljs-keyword">if</span> (user.<span class="hljs-property">isActive</span>) {}
</code></pre>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">✅ <strong>Good Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">if</span> (<span class="hljs-title function_">isActiveUser</span>(user)) {}
</code></pre>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Best Practice</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Use comments only to explain <em>why</em>, not <em>what</em>.</p></div></div></div>
<hr/>
<div class="my-6 grid grid-cols-1 gap-2 sm:grid-cols-2 max-w-4xl mx-auto w-full"><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/clean-code-principles-how-to-write-readable-and-maintainable-typescript-body-2.jpg" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure><figure class="flex w-full flex-col items-center justify-center select-none my-4"><div class="relative w-full aspect-video overflow-hidden rounded-2xl border border-white/10 bg-black dark:bg-white p-1.5 shadow-2xl md:p-2"><video src="https://cdn.sanity.io/files/g0emqxe5/production/69c8785731cdae2606d5505b073613db2a133af5.mp4" autoPlay="" loop="" muted="" playsInline="" preload="metadata" class="h-full w-full rounded-xl object-cover bg-neutral-900">Your browser does not support the video tag.</video></div></figure></div>
<h2 id="6-follow-consistent-formatting-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#6️⃣-follow-consistent-formatting-"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>6️⃣ Follow Consistent Formatting 📐</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">Note</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Consistency improves collaboration and reduces cognitive load.</p></div></div></div>
<h3 id="recommended-tools" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#recommended-tools"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Recommended Tools</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Prettier for formatting</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">ESLint for linting</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">EditorConfig for editor consistency</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">Pro Tip</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Automated tools enforce clean code rules across the entire team.</p></div></div></div>
<hr/>
<h2 id="7-handle-errors-gracefully-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#7️⃣-handle-errors-gracefully-️"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>7️⃣ Handle Errors Gracefully ⚠️</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-amber-500/8 dark:bg-amber-500/5 border-amber-500/20 dark:border-amber-400/30 ring-amber-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-amber-400 dark:bg-amber-500 shadow-[0_0_12px_rgba(251,191,36,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-triangle-alert size-[18px] text-amber-400 dark:text-amber-600" aria-hidden="true"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"></path><path d="M12 9v4"></path><path d="M12 17h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-amber-100 dark:text-amber-900">Warning</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-amber-200/80 dark:text-amber-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Generic error messages make debugging harder.</p></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">❌ <strong>Bad Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-title class_">Error</span>(<span class="hljs-string">&quot;Error&quot;</span>);
</code></pre>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">✅ <strong>Good Example</strong></p>
<pre><code class="hljs language-ts"><span class="hljs-keyword">throw</span> <span class="hljs-keyword">new</span> <span class="hljs-title class_">Error</span>(<span class="hljs-string">&quot;User authentication failed: invalid credentials&quot;</span>);
</code></pre>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Best Practice</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Error messages should be clear, specific, and actionable.</p></div></div></div>
<hr/>
<h2 id="8-avoid-overengineering-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#8️⃣-avoid-overengineering-"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>8️⃣ Avoid Overengineering 🧱</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">Note</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Clean code values simplicity over cleverness.</p></div></div></div>
<h3 id="common-mistakes" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#common-mistakes"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Common Mistakes</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Too many abstractions</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Premature optimization</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Designing for imaginary future needs</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">Pro Tip</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Write the simplest solution that works today.</p></div></div></div>
<hr/>
<h2 id="9-write-tests-for-critical-logic-" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#9️⃣-write-tests-for-critical-logic-"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>9️⃣ Write Tests for Critical Logic 🧪</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-blue-500/8 dark:bg-blue-500/5 border-blue-500/20 dark:border-blue-400/30 ring-blue-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-blue-400 dark:bg-blue-500 shadow-[0_0_12px_rgba(96,165,250,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-info size-[18px] text-blue-400 dark:text-blue-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="M12 16v-4"></path><path d="M12 8h.01"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-blue-100 dark:text-blue-900">Note</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-blue-200/80 dark:text-blue-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Tests protect clean code from breaking over time.</p></div></div></div>
<h3 id="what-to-test" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#what-to-test"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>What to Test</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Business logic</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Utility functions</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">API integrations</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Best Practice</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Tests act as a safety net for refactoring.</p></div></div></div>
<hr/>
<h2 id="-conclusion" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-conclusion"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>🏁 Conclusion</h2>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Final Takeaway</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Clean code is a habit, not a one-time effort.</p></div></div></div>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">By following these principles, your TypeScript code becomes:</p>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Readable</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Maintainable</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Scalable</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Professional</li>
</ul>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">✨ <strong>Happy Coding! 🚀</strong></p></div><p class="mt-6 font-alata text-neutral-600 dark:text-neutral-400 text-[13px] sm:text-[14px]">Published on <span class="font-medium text-neutral-900 dark:text-neutral-200">January 24, 2026</span></p>]]></content>
    <category term="CleanCode" label="CleanCode" />
    <category term="TypeScript" label="TypeScript" />
    <category term="ReadableCode" label="ReadableCode" />
    <category term="LearningToCode" label="LearningToCode" />
  </entry>
  <entry>
    <title><![CDATA[React TypeScript for Beginners: Everything You Need to Get Started🖥️]]></title>
    <link href="https://mudassirasghar.dev/blog/react-typescript-for-beginners-everything-you-need-to-get-started" rel="alternate" type="text/html" />
    <id>https://mudassirasghar.dev/blog/react-typescript-for-beginners-everything-you-need-to-get-started</id>
    <updated>2026-01-03T00:00:00.000Z</updated>
    <published>2026-01-03T00:00:00.000Z</published>
    <summary><![CDATA[A beginner-friendly guide to React with TypeScript. Learn core typing patterns, prop types, state hooks, and best practices for modern web apps.]]></summary>
    <content type="html"><![CDATA[<div class=" prose prose-lg prose-invert dark:prose max-w-none prose-headings:scroll-mt-28 prose-headings:font-bold prose-h1:text-3xl sm:prose-h1:text-4xl prose-h2:text-2xl sm:prose-h2:text-3xl prose-h3:text-xl sm:prose-h3:text-2xl prose-p:text-white/80 dark:prose-p:text-neutral-800/80 prose-p:leading-relaxed prose-p:my-5 prose-a:text-indigo-400 dark:prose-a:text-indigo-600 prose-a:no-underline hover:prose-a:underline prose-ul:my-4 prose-ul:marker:text-indigo-400 dark:prose-ul:marker:text-indigo-600 prose-ol:my-4 prose-li:leading-relaxed prose-blockquote:border-l-indigo-500/40 prose-blockquote:bg-white/5 dark:prose-blockquote:bg-black/5 prose-blockquote:px-4 prose-blockquote:py-3 prose-blockquote:rounded-md prose-blockquote:my-6 prose-pre:bg-[#111] prose-pre:border prose-pre:border-white/10  prose-pre:rounded-lg prose-pre:p-4 prose-code:bg-white/10 dark:prose-code:bg-black/10 prose-code:px-1.5 prose-code:py-0.5  prose-code:rounded prose-code:text-indigo-300 dark:prose-code:text-indigo-600 prose-hr:border-white/10 dark:prose-hr:border-black/10 prose-hr:my-10 prose-table:border-collapse prose-th:bg-white/5 dark:prose-th:bg-black/5 prose-td:border-white/10 dark:prose-td:border-black/10 prose-tr:border-white/10 dark:prose-tr:border-black/10 prose-td:p-3 prose-th:p-3"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">A complete beginner-friendly guide to getting started with React and TypeScript, including setup, core concepts, real-world examples, and best practices.</p>
<br/>
<figure class="flex w-full flex-col items-center justify-center select-none my-4"><div class="relative w-full aspect-video overflow-hidden rounded-2xl border border-white/10 bg-black dark:bg-white p-1.5 shadow-2xl md:p-2"><video src="https://cdn.sanity.io/files/g0emqxe5/production/b4a65f9dbed8d69e473ccd4a94ed8800e64fad0b.mp4" autoPlay="" loop="" muted="" playsInline="" preload="metadata" class="h-full w-full rounded-xl object-cover bg-neutral-900">Your browser does not support the video tag.</video></div></figure>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">React is one of the most popular libraries for building modern user interfaces, while TypeScript has become the industry standard for writing reliable and maintainable JavaScript. When combined, <strong>React + TypeScript</strong> provides a powerful development experience that helps developers build scalable applications with confidence.
A beginner-friendly, practical guide to building modern, scalable React applications using <strong>TypeScript</strong>.</p>
<hr/>
<div class="my-6 grid grid-cols-1 gap-2 sm:grid-cols-2 max-w-4xl mx-auto w-full"><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/react-typescript-for-beginners-everything-you-need-to-get-started-body-1.png" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure><figure class="relative w-full flex flex-col items-center "><div class="relative w-full rounded-2xl border border-white/10 p-1.5 bg-neutral-950/20 dark:bg-neutral-50/20"><div class="relative aspect-video w-full overflow-hidden rounded-xl cursor-zoom-in"><img src="/blog-assets/react-typescript-for-beginners-everything-you-need-to-get-started-body-2.png" alt="Blog Image" class="object-cover rounded-xl w-full" loading="lazy" /></div></div></figure></div>
<h2 id="-why-react-typescript" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-why-react--typescript"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>🚀 Why React + TypeScript?</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">React and TypeScript together help you write cleaner, safer, and more maintainable code.</p>
<h3 id="-catch-bugs-early" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-catch-bugs-early"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>✅ Catch Bugs Early</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Errors are caught at compile time</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Fewer runtime crashes</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-red-500/8 dark:bg-red-500/5 border-red-500/20 dark:border-red-400/30 ring-red-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-red-400 dark:bg-red-500 shadow-[0_0_12px_rgba(248,113,113,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-x size-[18px] text-red-400 dark:text-red-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m15 9-6 6"></path><path d="m9 9 6 6"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-red-100 dark:text-red-900">Common Error</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-red-200/80 dark:text-red-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Ignoring TypeScript errors during development can lead to serious runtime bugs later.</p></div></div></div>
<h3 id="-predictable-components" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-predictable-components"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>✅ Predictable Components</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Strongly typed props and state</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Clear data contracts between components</li>
</ul>
<h3 id="-confident-refactoring" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-confident-refactoring"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>✅ Confident Refactoring</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Rename and refactor safely</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">TypeScript shows what breaks</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-pink-500/8 dark:bg-pink-500/5 border-pink-500/20 dark:border-pink-400/30 ring-pink-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-pink-400 dark:bg-pink-500 shadow-[0_0_12px_rgba(244,114,182,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-lightbulb size-[18px] text-pink-400 dark:text-pink-600" aria-hidden="true"><path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path><path d="M9 18h6"></path><path d="M10 22h4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-pink-100 dark:text-pink-900">Pro Tip</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-pink-200/80 dark:text-pink-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Fully typed components make large refactors much safer and faster.</p></div></div></div>
<h3 id="-industry-standard" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-industry-standard"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>✅ Industry Standard</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Widely used in production React apps</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Preferred by modern teams</li>
</ul>
<hr/>
<h2 id="-tech-stack" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-tech-stack"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>🛠 Tech Stack</h2>
<h3 id="core-technologies" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#core-technologies"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Core Technologies</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">React</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">TypeScript</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Vite</li>
</ul>
<h3 id="runtime-and-tools" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#runtime--tools"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>Runtime &amp; Tools</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Node.js (LTS)</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">npm / pnpm</li>
</ul>
<div class="group relative my-6 flex gap-4 overflow-hidden rounded-xl border p-4 pl-5 shadow-sm hover:shadow-lg transition-all duration-300 ring-1 bg-green-500/8 dark:bg-green-500/5 border-green-500/20 dark:border-green-400/30 ring-green-500/10"><div class="absolute inset-y-0 left-0 w-[3px] rounded-l-xl transition-all duration-300 group-hover:w-[4px] bg-green-400 dark:bg-green-500 shadow-[0_0_12px_rgba(74,222,128,0.6)]"></div><div class="mt-0.5 shrink-0 transition-all duration-200 group-hover:scale-110 group-hover:-translate-y-0.5"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-check size-[18px] text-green-400 dark:text-green-600" aria-hidden="true"><circle cx="12" cy="12" r="10"></circle><path d="m9 12 2 2 4-4"></path></svg></div><div class="flex flex-1 flex-col gap-1.5 min-w-0"><p class="m-0 text-[14px] font-semibold leading-snug text-green-100 dark:text-green-900">Best Practice</p><div class="m-0 text-[13.5px] leading-relaxed empty:hidden text-green-200/80 dark:text-green-800/80"><p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Prefer Vite + React + TypeScript for new projects.</p></div></div></div>
<hr/>
<h2 id="-getting-started" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-getting-started"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>⚡ Getting Started</h2>
<h3 id="1-create-project" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#1️⃣-create-project"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>1️⃣ Create Project</h3>
<pre><code class="hljs language-bash">npm create vite@latest my-app -- --template react-ts
</code></pre>
<h3 id="2-move-into-project" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#2️⃣-move-into-project"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>2️⃣ Move into Project</h3>
<pre><code class="hljs language-bash"><span class="hljs-built_in">cd</span> my-app
</code></pre>
<h3 id="3-install-dependencies" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#3️⃣-install-dependencies"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>3️⃣ Install Dependencies</h3>
<pre><code class="hljs language-bash">npm install
</code></pre>
<h3 id="4-start-dev-server" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#4️⃣-start-dev-server"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>4️⃣ Start Dev Server</h3>
<pre><code class="hljs language-bash">npm run dev
</code></pre>
<hr/>
<h2 id="-project-structure" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-project-structure"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>📁 Project Structure</h2>
<pre><code>src/
 ├─ main.tsx
 ├─ App.tsx
 ├─ components/
 ├─ hooks/
 └─ types/
</code></pre>
<hr/>
<h2 id="-example-component" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-example-component"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>🧩 Example Component</h2>
<pre><code class="hljs language-tsx"><span class="hljs-keyword">type</span> <span class="hljs-title class_">ButtonProps</span> = {
  <span class="hljs-attr">label</span>: <span class="hljs-built_in">string</span>;
  <span class="hljs-attr">onClick</span>: <span class="hljs-function">() =&gt;</span> <span class="hljs-built_in">void</span>;
};

<span class="hljs-keyword">export</span> <span class="hljs-keyword">function</span> <span class="hljs-title function_">Button</span>(<span class="hljs-params">{ label, onClick }: <span class="hljs-title class_">ButtonProps</span></span>) {
  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{onClick}</span>&gt;</span>{label}<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span></span>;
}
</code></pre>
<hr/>
<h2 id="-typed-state-example" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-typed-state-example"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>🔁 Typed State Example</h2>
<pre><code class="hljs language-tsx"><span class="hljs-keyword">const</span> [count, setCount] = useState&lt;<span class="hljs-built_in">number</span>&gt;(<span class="hljs-number">0</span>);
</code></pre>
<pre><code class="hljs language-tsx"><span class="hljs-keyword">type</span> <span class="hljs-title class_">User</span> = {
  <span class="hljs-attr">id</span>: <span class="hljs-built_in">string</span>;
  <span class="hljs-attr">name</span>: <span class="hljs-built_in">string</span>;
};

<span class="hljs-keyword">const</span> [user, setUser] = useState&lt;<span class="hljs-title class_">User</span> | <span class="hljs-literal">null</span>&gt;(<span class="hljs-literal">null</span>);
</code></pre>
<hr/>
<h2 id="-best-practices" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-best-practices"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>📌 Best Practices</h2>
<h3 id="-recommended" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-recommended"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>✅ Recommended</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Avoid <code class="px-1.5 py-0.5 rounded-md bg-gray-800 text-pink-400 font-mono text-sm border border-gray-700">any</code></li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Type props and state</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Centralize shared types</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Listen to TypeScript warnings</li>
</ul>
<h3 id="-avoid" class=" scroll-mt-28 font-alata font-semibold text-neutral-200 dark:text-neutral-800 text-[17px] leading-snug mt-4 mb-2 sm:text-[17px] md:text-[17px] lg:text-[20px] xl:text-[20px] "><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-avoid"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>❌ Avoid</h3>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Ignoring errors</li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]">Overengineering types early</li>
</ul>
<hr/>
<h2 id="-useful-links" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-useful-links"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>📚 Useful Links</h2>
<ul class="list-disc ml-6 mt-3 mb-6 space-y-2 text-[16px] font-alata  text-neutral-200 leading-8">
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><a target="_blank" rel="noopener noreferrer" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="https://react.dev"><span class="relative">https://react.dev<span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right h-3.5 w-3.5 text-white dark:text-black opacity-70 transition-transform duration-300 group-hover:-translate-y-0.5 group-hover:translate-x-0.5" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a></li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><a target="_blank" rel="noopener noreferrer" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="https://www.typescriptlang.org"><span class="relative">https://www.typescriptlang.org<span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right h-3.5 w-3.5 text-white dark:text-black opacity-70 transition-transform duration-300 group-hover:-translate-y-0.5 group-hover:translate-x-0.5" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a></li>
<li class="leading-5 marker:text-neutral-100 dark:marker:text-neutral-800 text-neutral-300 dark:text-neutral-700 font-CodeFont text-[16px]"><a target="_blank" rel="noopener noreferrer" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="https://vitejs.dev"><span class="relative">https://vitejs.dev<span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right h-3.5 w-3.5 text-white dark:text-black opacity-70 transition-transform duration-300 group-hover:-translate-y-0.5 group-hover:translate-x-0.5" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a></li>
</ul>
<hr/>
<h2 id="-conclusion" class="scroll-mt-28 font-alata text-neutral-200 dark:text-neutral-800 text-[18px] leading-snug mt-6 mb-5 sm:text-[18px] md:text-[25px] lg:text-[25px] xl:text-[25px]"><a target="_self" rel="" class="group relative inline-flex items-center gap-1 font-medium text-white dark:text-black " href="#-conclusion"><span class="relative"><span class="icon icon-link"></span><span class="absolute -bottom-0.5 left-0 h-px bg-white dark:bg-black w-full"></span></span></a>✅ Conclusion</h2>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">React + TypeScript is the modern standard for frontend development.
Learn the basics well and scale with confidence.</p>
<p class="font-CodeFont font-light tracking-wide text-neutral-300 dark:text-neutral-700 text-[14px] leading-[1.6] sm:leading-[1.65] md:text-[15px] md:leading-[1.7] lg:leading-[1.75]">Happy coding 🚀</p></div><p class="mt-6 font-alata text-neutral-600 dark:text-neutral-400 text-[13px] sm:text-[14px]">Published on <span class="font-medium text-neutral-900 dark:text-neutral-200">January 3, 2026</span></p>]]></content>
    <category term="ReactJs" label="ReactJs" />
    <category term="NextJs" label="NextJs" />
    <category term="2026" label="2026" />
    <category term="Blog" label="Blog" />
  </entry>
</feed>