<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hasnain Jaffer</title>
    <description>The latest articles on DEV Community by Hasnain Jaffer (@hasnainjaffer).</description>
    <link>https://dev.to/hasnainjaffer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4027395%2F55655aeb-e670-4b84-916a-2fb36c61ae4a.jpg</url>
      <title>DEV Community: Hasnain Jaffer</title>
      <link>https://dev.to/hasnainjaffer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hasnainjaffer"/>
    <language>en</language>
    <item>
      <title>Moving Beyond the MERN Stack: My Roadmap to Modern Backend Engineering</title>
      <dc:creator>Hasnain Jaffer</dc:creator>
      <pubDate>Sat, 18 Jul 2026 04:05:28 +0000</pubDate>
      <link>https://dev.to/hasnainjaffer/moving-beyond-the-mern-stack-my-roadmap-to-modern-backend-engineering-amo</link>
      <guid>https://dev.to/hasnainjaffer/moving-beyond-the-mern-stack-my-roadmap-to-modern-backend-engineering-amo</guid>
      <description>&lt;p&gt;Like many developers, I started my journey mastering the MERN stack. Building full-stack apps with MongoDB, Express, React, and Node.js was a fantastic foundation—it got me comfortable with JavaScript, API design, and asynchronous logic.&lt;/p&gt;

&lt;p&gt;But as I near the final stages of my degree and prepare for my final year project (a university bus tracking system), I’ve realized that "full-stack" is a constantly moving target. To build scalable, production-ready systems, I’m shifting my focus this summer to a more robust backend toolkit.&lt;/p&gt;

&lt;p&gt;Here is what I’m tackling in my current roadmap:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Embracing Type Safety with TypeScript&lt;br&gt;
While I loved the flexibility of JavaScript, working on larger projects has shown me the value of static typing. Migrating my logic to TypeScript has already significantly reduced runtime bugs and improved my IDE experience. If you’re still on the fence, the interface and type definitions alone are worth the switch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;High-Performance Backends (FastAPI &amp;amp; Django)&lt;br&gt;
Node.js is great, but for data-heavy applications and AI integrations, I’m exploring Python.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;FastAPI has been a game-changer for building high-performance asynchronous APIs.&lt;/p&gt;

&lt;p&gt;I’m also digging into Django for projects that require a "batteries-included" approach to rapid development.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;PostgreSQL Over NoSQL&lt;br&gt;
While MongoDB served me well for flexible schemas, I’m moving toward PostgreSQL for my upcoming projects. Understanding relational data modeling, complex joins, and ACID compliance is a non-negotiable skill for backend engineers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Entering the World of AI Agents&lt;br&gt;
Perhaps the most exciting part of my summer study is AI agent orchestration. Learning how to move from simple API calls to building agents that can reason, use tools, and maintain state is the next frontier.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why the shift?&lt;br&gt;
My goal is to build software that is not only functional but resilient. By combining containerization (Docker/Kubernetes) with a stronger grasp of backend architecture, I want to ensure that the code I write in development performs just as well when it hits production.&lt;/p&gt;

&lt;p&gt;I’m currently documenting my progress and sharing snippets of my build process on my [Link to your GitHub/Portfolio].&lt;/p&gt;

&lt;p&gt;If you're also transitioning from a JavaScript-heavy background to more diverse backend technologies, let’s connect! What’s one tool you think every modern backend developer should have in their belt?&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8gmofc7vekzec9tuqxlw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8gmofc7vekzec9tuqxlw.png" alt=" " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>backend</category>
      <category>fullstack</category>
      <category>python</category>
    </item>
    <item>
      <title>CORS + Auth Worked Perfectly Locally, Then Broke the Moment I Deployed (Here's Why)</title>
      <dc:creator>Hasnain Jaffer</dc:creator>
      <pubDate>Mon, 13 Jul 2026 14:29:58 +0000</pubDate>
      <link>https://dev.to/hasnainjaffer/cors-auth-worked-perfectly-locally-then-broke-the-moment-i-deployed-heres-why-ee3</link>
      <guid>https://dev.to/hasnainjaffer/cors-auth-worked-perfectly-locally-then-broke-the-moment-i-deployed-heres-why-ee3</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7x50uuq2ypurf82n652a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7x50uuq2ypurf82n652a.png" alt=" " width="800" height="441"&gt;&lt;/a&gt;I ran into this bug recently and it took me longer to fix than I'd like to admit: my React + Express app worked flawlessly on localhost, but the moment I deployed it, authenticated requests started silently failing. No errors in my own code — just requests that looked like they went out, but the backend never seemed to receive the session/token.&lt;br&gt;
The setup&lt;/p&gt;

&lt;p&gt;React frontend and Express backend deployed to separate origins (different domains/subdomains)&lt;br&gt;
Auth relying on a cookie (or JWT sent with credentials) set by the backend&lt;br&gt;
Locally, both ran on localhost with different ports, which browsers treat more leniently&lt;/p&gt;

&lt;p&gt;What actually happened&lt;br&gt;
Once frontend and backend were on genuinely different origins in production, a few things I'd gotten away with locally stopped working:&lt;/p&gt;

&lt;p&gt;My CORS config allowed origin: '*' — which silently breaks anything using credentials, since browsers won't send cookies/auth headers when the origin is a wildcard.&lt;br&gt;
The cookie itself wasn't configured for cross-site use — no SameSite=None; Secure, which most browsers now require for any cookie sent across origins over HTTPS.&lt;br&gt;
On the frontend, requests weren't explicitly sending credentials (credentials: 'include' in fetch, or withCredentials: true in axios).&lt;/p&gt;

&lt;p&gt;Locally, same-origin-ish behavior papered over all three problems at once.&lt;br&gt;
The fix&lt;/p&gt;

&lt;p&gt;Set CORS to an explicit origin (not *) and credentials: true on the Express side&lt;br&gt;
Set the cookie with SameSite=None; Secure so browsers allow it cross-site&lt;br&gt;
Explicitly send credentials on every authenticated request from the frontend&lt;/p&gt;

&lt;p&gt;Once all three were aligned, everything that had been "randomly failing" in production started working immediately.&lt;br&gt;
Takeaway: if your auth works locally but silently fails after deploy, check CORS origin config, cookie SameSite/Secure attributes, and whether the frontend is actually sending credentials — together, not just one of them.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>node</category>
      <category>react</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
