<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Full-stack notes by Muhammad Osama Khan</title>
    <link>https://www.osamakhan.online/blog</link>
    <description>Practical full-stack articles by Muhammad Osama Khan: JWT auth, MongoDB schema design and indexes, Express API structure, RTK Query and deploying MERN apps.</description>
    <language>en</language>
    <lastBuildDate>Sat, 07 Nov 2026 08:00:00 GMT</lastBuildDate>
    <atom:link href="https://www.osamakhan.online/rss.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Deploying a MERN App: Environment Variables, CORS and a Production Checklist</title>
      <link>https://www.osamakhan.online/blog/deploy-mern-app-production-checklist</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/deploy-mern-app-production-checklist</guid>
      <pubDate>Sat, 07 Nov 2026 08:00:00 GMT</pubDate>
      <category>DevOps</category>
      <description>The settings that differ between your laptop and production: secrets, CORS, cookies behind a proxy, rate limits, health checks and graceful shutdown.</description>
    </item>
    <item>
      <title>Server State in React with RTK Query: Caching, Invalidation and Optimistic Updates</title>
      <link>https://www.osamakhan.online/blog/rtk-query-caching-invalidation-optimistic-updates</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/rtk-query-caching-invalidation-optimistic-updates</guid>
      <pubDate>Tue, 03 Nov 2026 08:00:00 GMT</pubDate>
      <category>React</category>
      <description>Stop hand-writing loading flags and refetch logic. Define endpoints once, tag the data and let RTK Query keep the cache correct.</description>
    </item>
    <item>
      <title>Fixing Slow MongoDB Queries: Indexes, explain() and Cursor Pagination</title>
      <link>https://www.osamakhan.online/blog/fix-slow-mongodb-queries-indexes-explain</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/fix-slow-mongodb-queries-indexes-explain</guid>
      <pubDate>Tue, 27 Oct 2026 08:00:00 GMT</pubDate>
      <category>Performance</category>
      <description>Read explain() output, build the right compound index and replace skip-based pagination with a cursor. Steps you can repeat on any slow endpoint.</description>
    </item>
    <item>
      <title>How to Structure an Express API: Routes, Controllers, Services and Error Handling</title>
      <link>https://www.osamakhan.online/blog/structure-express-api-routes-controllers-services</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/structure-express-api-routes-controllers-services</guid>
      <pubDate>Tue, 20 Oct 2026 08:00:00 GMT</pubDate>
      <category>APIs</category>
      <description>Keep routes thin, put business rules in services, validate input at the edge and handle every error in one place.</description>
    </item>
    <item>
      <title>MongoDB Schema Design for MERN Apps: Embed or Reference?</title>
      <link>https://www.osamakhan.online/blog/mongodb-schema-design-embed-or-reference</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/mongodb-schema-design-embed-or-reference</guid>
      <pubDate>Tue, 13 Oct 2026 08:00:00 GMT</pubDate>
      <category>Database</category>
      <description>Embed what you always read together and what stays small; reference what grows or is shared. Worked examples with Mongoose models.</description>
    </item>
    <item>
      <title>JWT Authentication in a MERN App: Access Tokens, Refresh Tokens and httpOnly Cookies</title>
      <link>https://www.osamakhan.online/blog/jwt-auth-mern-refresh-tokens</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/jwt-auth-mern-refresh-tokens</guid>
      <pubDate>Tue, 06 Oct 2026 08:00:00 GMT</pubDate>
      <category>Auth</category>
      <description>Keep the access token in memory, the refresh token in an httpOnly cookie, and retry once on a 401. A complete flow with Express and React code.</description>
    </item>
    <item>
      <title>Next.js Server Components vs Client Components: What Runs Where and When to Use Each</title>
      <link>https://www.osamakhan.online/blog/nextjs-server-components-vs-client-components</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/nextjs-server-components-vs-client-components</guid>
      <pubDate>Tue, 29 Sep 2026 08:00:00 GMT</pubDate>
      <category>Next.js</category>
      <description>Components are server components by default. Learn what that changes, how to keep the client boundary small and the errors to watch for.</description>
    </item>
    <item>
      <title>Prisma with PostgreSQL: Schema Design, Migrations and Avoiding N+1 Queries</title>
      <link>https://www.osamakhan.online/blog/prisma-postgresql-schema-migrations-n-plus-one</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/prisma-postgresql-schema-migrations-n-plus-one</guid>
      <pubDate>Tue, 22 Sep 2026 08:00:00 GMT</pubDate>
      <category>Database</category>
      <description>Model relations, ship migrations without surprises, replace query loops with include and wrap multi-step writes in a transaction.</description>
    </item>
    <item>
      <title>Testing React Components with Vitest and React Testing Library</title>
      <link>https://www.osamakhan.online/blog/test-react-components-vitest-testing-library</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/test-react-components-vitest-testing-library</guid>
      <pubDate>Tue, 15 Sep 2026 08:00:00 GMT</pubDate>
      <category>Testing</category>
      <description>A working Vitest setup, tests that query the page like a user does, a mocked API call and the habits that keep tests from breaking on every refactor.</description>
    </item>
    <item>
      <title>A GitHub Actions CI/CD Pipeline for a Vite and Node.js App</title>
      <link>https://www.osamakhan.online/blog/github-actions-ci-cd-vite-node-app</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/github-actions-ci-cd-vite-node-app</guid>
      <pubDate>Tue, 08 Sep 2026 08:00:00 GMT</pubDate>
      <category>DevOps</category>
      <description>One workflow that checks every push and pull request, and a second job that deploys to production only when those checks are green.</description>
    </item>
    <item>
      <title>Real-Time Features with Socket.IO and React: Rooms, Auth and Clean-Up</title>
      <link>https://www.osamakhan.online/blog/socketio-react-real-time-rooms-auth</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/socketio-react-real-time-rooms-auth</guid>
      <pubDate>Tue, 01 Sep 2026 08:00:00 GMT</pubDate>
      <category>Real-time</category>
      <description>A chat-style example: a Socket.IO server with JWT auth and rooms, and a React hook that connects, joins, listens and cleans up properly.</description>
    </item>
    <item>
      <title>Zustand or Redux Toolkit? Choosing State Management for a React App</title>
      <link>https://www.osamakhan.online/blog/zustand-vs-redux-toolkit-react-state</link>
      <guid isPermaLink="true">https://www.osamakhan.online/blog/zustand-vs-redux-toolkit-react-state</guid>
      <pubDate>Tue, 25 Aug 2026 08:00:00 GMT</pubDate>
      <category>React</category>
      <description>The same cart written with Zustand and with Redux Toolkit, a plain comparison, and a simple way to decide which one your app needs.</description>
    </item>
  </channel>
</rss>
