Muhammad Sarim Khan · Full-stack engineer & instructor

I build SaaS backends and the products on top of them

Multi-tenant SaaS, async pipelines and real-time systems, built so slow work never blocks a request and tenants stay isolated.

Open to remote engineering roles Hyderabad, Sindh, Pakistan --:-- PKT · GMT+5
About

Most of my work comes down to two questions: whose data is this, and what happens when this takes 30 seconds?

The answers show up as tenant boundaries, queues and workers. I also teach the MERN stack to developers in Pakistan, write a free JavaScript book, and serve as a Microsoft Student Ambassador. Teaching keeps my explanations honest.

How I build

Isolate first
Tenant scope is designed into the schema and indexes, not added to queries later
Keep requests short
Anything slow goes to a queue, so the event loop stays free
One way to fail
Async errors flow to one global handler instead of scattered try/catch
Test against the real thing
Integration tests hit a real database, because mocks don't enforce a unique index
Stay portable
Open tools and free tiers first, with no vendor I can't walk away from

Selected work

Two systems worth reading, and a free book that goes from your first line of JavaScript to production.

01 · AI code analysisLive

CodeWise

CodeWise explains code line by line, with complexity analysis, refactoring suggestions, shareable reports and PDF export.

CodeWise architecture. A Next.js client with a Monaco editor calls an Express API, which queues jobs in Redis and BullMQ. A separate worker calls Gemini and writes results to PostgreSQL through Prisma.
The hard part
An AI call takes seconds. Holding an HTTP request open for it wastes capacity and feels broken.
The decision
The API enqueues and returns. A separate worker process does the slow work.
TurborepoNext.js 14MonacoExpressPostgreSQLPrismaRedisBullMQGemini
02 · Multi-tenant SaaSBackend to product

EdSync

EdSync is a B2B LMS where each institute is an isolated tenant, with cohorts, curriculum, assignments, grading and live chat.

EdSync architecture. Institutes reach an Express API that applies JWT auth, role checks and organizationId scoping, then MongoDB, a BullMQ email queue with a worker, and Socket.io chat.
The hard part
One missed filter in a shared database leaks a whole institute's data.
The decision
Tenant identity travels in the token, every scoped query is keyed on organizationId, and cross-tenant requests get a 404, so the API never confirms that another tenant's data exists.
The proof
100+ integration tests run against a real MongoDB in CI.
Next.jsExpress 5MongoDBRedisBullMQSocket.ioGitHub Actions
03 · Open-source bookVolume 1 out now

JavaScript: From First Line to Production

A free, open-source book that takes you from your first line of JavaScript to full-stack production systems. It is written for complete beginners and for developers who want to go full-stack.

Every chapter opens with an everyday analogy, then moves to runnable examples with real output, and ends with exercises and a recap.

VolumeTitleLevelStatus
1FoundationsBeginnerAvailable now
2Real ApplicationsIntermediateIn progress
3Production Systems at ScaleSeniorIn progress

Volume 1 covers the core language, the DOM, async code, modules and Git, and ends with a capstone app. It is licensed under CC BY-NC-SA 4.0.

JavaScriptDOMAsyncModulesGitCC BY-NC-SA 4.0
Stack

What I work with

Interface
TypeScript, JavaScript, React, Next.js, Tailwind, Expo
Services
Node.js, Express, Socket.io, JWT
Data + async
MongoDB, PostgreSQL, Prisma, Redis, BullMQ
AI
Gemini, LangChain
Delivery
Docker, GitHub Actions, Turborepo, Vercel, Render, Cloudinary
Teaching

I teach it too

I've taught the MERN stack to developers in Pakistan, and I'm teaching it today. Teaching keeps my explanations honest.

  • CommunityMicrosoft Student Ambassador
  • WritingA free JavaScript book, from first line to production
Contact

Let's talk.

Open to remote engineering roles. Email me at sarimkhan13579@gmail.com.

Right now

  • Taking EdSync from backend to product, with a Next.js client and a React Native app
  • Writing JavaScript: From First Line to Production, with Volume 1 out and Volumes 2 and 3 in progress
  • Teaching MERN batches with a curriculum I designed
  • Open to remote engineering roles