Yash Gupta
Software developer. I build multi-tenant systems in NestJS, Django and Next.js, and I find out where the time actually goes.
I work across three products at a B2B SaaS company: a multi-tenant WhatsApp business platform with 170+ connected business accounts, an ERP, and a CRM. Below are two measurements from that work, drawn to scale.
A 5,000-recipient campaign send
89 min to 6 min 14x faster
Measured on production runs. The serial loop sent about 56 messages a minute, so 5,000 contacts took about 89 minutes. The Redis job queue sends about 790 a minute, so the same campaign takes about 6 minutes.
- Serial loop, one send in flight
- Redis job queue, 15 a second
Both rates are measured on production runs rather than calculated. The largest real run sent 18,615 contacts in 23.6 minutes, with no duplicates and no double charges across 20,637 sends.
One contacts-list request
515ms to 30ms 17x faster
Before: list query 69.3 ms, count 38.6 ms, tag lookup 269 ms, group lookup 138 ms. After: 0.38 ms, 16.3 ms, 9.5 ms and 4.1 ms.
- Scanning whole tables and sorting
- Walking an index
Four queries per request, measured on a 528,000-row copy of production. Two join tables had no index at all, and one index could not be used for ordering.
Case studies
Each one covers the problem, what I found, what I changed and how I checked it. Customer names, identifiers and proprietary code are left out.
If you only read three: why a campaign took an hour and a half for measured performance work, selling the platform to a reseller for system design under a new tenancy boundary, and an API that works is not yet an API you can publish for how I verify a change I cannot take back.
-
Why a campaign took an hour and a half to send
Live in production56 to 790 messages a minute, measured.
The send loop slept on delays we had set ourselves. Removing them helped; the real ceiling was that it sent one message at a time.
NestJS, BullMQ, Redis, WhatsApp Business API
-
Selling the platform to a reseller without leaking its customers
Live in productionA second tenancy boundary above the existing one: ownership of a company written into the schema, a billing owner hidden from the company's own member list, and a checkout that verifies Razorpay's signature and grants credits once under a row lock.
NestJS, PostgreSQL, Drizzle ORM, Razorpay
-
An API that works is not yet an API you can publish
Live in productionOur API-key surface authenticated correctly and returned the right rows. It still answered a rejected send with a bare 500, lost a retry's idempotency key, and refused
?page=1because an internal convention had leaked into the public contract. Changing it meant proving the other 59 of 74 responses stayed identical.NestJS, PostgreSQL, Redis, idempotency, API design
-
A 17x faster contacts API from six indexes
Live in production515ms to 30ms per request.
Unindexed join tables, composite indexes in the wrong column order, and an ORM default that silently made an index useless for sorting.
PostgreSQL, EXPLAIN ANALYZE, Drizzle ORM
-
Money in a float column
Live in productionEvery balance and ledger amount is a 32-bit float. One reconciliation query returned a different total each run because the planner changed the accumulation order, and a safety assertion started refusing to let the largest customers be charged at all.
PostgreSQL, NestJS, Drizzle ORM, concurrency
-
Moving events between a Django ERP and a NestJS platform without losing any
Merged to productionA payment-funnel change in one service has to start a messaging journey in another. I built it on a transactional outbox, so an event exists exactly when the fact does.
Django, Celery, PostgreSQL, HMAC-SHA256, NestJS
-
The same record, written twice, 13 milliseconds apart
Live in productionThree code paths mirrored the same provider data, none aware of the others, and left 356 duplicated templates across 153 production companies. A per-company advisory lock fixes it, but only because the rows are read again inside it.
NestJS, PostgreSQL, Drizzle ORM, concurrency
-
Taking money through an app you do not control
Live in productioniPhone customers buy plans and credits inside the app, and all my server gets is a message claiming a purchase happened. It asks Apple, and a partial unique index makes a replayed transaction impossible rather than merely unlikely.
NestJS, PostgreSQL, App Store Server API, idempotency
-
Work that a deploy used to destroy
Merged to productionCampaign sending lived in a process a deploy could kill mid-run. Moving it onto a queue was the easy half; the rest was atomic claims in Lua, a reconciler for jobs the queue loses, and keeping "unknown" distinct from "failed".
NestJS, Bull, Redis, Lua, PostgreSQL
-
The campaigns that could only fail before dawn
Fixed and liveEvery campaign scheduled between midnight and 05:29 silently never sent, and the interface went on showing it as scheduled. Two date helpers disagreed by a day, and only in the timezone production runs in, so it could not be reproduced from a fresh checkout.
NestJS, PostgreSQL, cron, Docker
-
You cannot test a push notification with a mock
Live in productionThe provider validates the device token before it ever reads your payload, so a fake token proves nothing. A harness driving a real browser against real infrastructure found three bugs, two of them already live.
NestJS, Firebase Cloud Messaging, service workers
-
Four production incidents, and what each one taught me
30+ root-causedAn 8-day outage that returned HTTP 200, media failing for about 90% of accounts, a unique index that stopped every invite expiring, and 26 hours of failures caused by trailing spaces.
Webhooks, AWS S3, PostgreSQL, Django
-
Moving a live message channel without sending anything twice
Built, in reviewInvoice PDFs go to business owners on WhatsApp through a provider we pay per message, and that traffic should come home to our own platform. A fallback to the old provider is only safe when failure proves nothing was sent, so the work is a taxonomy of failures that do and do not prove it.
Django, Python, MySQL, WhatsApp Business API
-
A contract reviewer that cannot quote what is not there
Personal project, public repo16/16 items scored, 13/13 with a verified quote.
The server re-checks every model quote against the contract and shows the document's own words, not the model's, so an invented clause has no path to the screen.
Next.js 15, TypeScript, Postgres with pgvector, Bull, Clerk, Docker
Experience
Software Development Engineer
- A multi-tenant WhatsApp business platform: campaigns, inbox, chatbots, billing and onboarding for 170+ connected business accounts.
- User Journeys: built end to end, from schema and event-ingest API to the dispatch scheduler and UI. Dark-launched, then taken live per tenant behind feature flags.
- Payments and billing: server-verified iOS in-app purchases, and per-message metered billing that charges once from the delivery webhook and refuses sends when credits run out.
- Delivery: campaign sending moved onto a Redis-backed queue with atomic claims, a reconciler and a circuit breaker.
- Security: closed multi-tenant authorization holes, authenticated the real-time socket channel, and fixed a cross-tenant leak in the CRM.
- An ERP and a payments product in Django: the outbound half of the event pipeline, on a transactional outbox with Celery workers.
- A CRM in NestJS and Next.js: a staging environment refreshed from production behind data masking, a manual release gate, and a shared visual language across its screens.
Skills
Split by where I have actually used them.
- In production
- TypeScript, Node.js, NestJS, Python, Django, Celery, PostgreSQL, Redis, BullMQ, Docker, AWS S3, Linux, REST, webhooks, WebSockets, OAuth 2.0
- Patterns I have shipped
- Transactional outbox, idempotent consumers, atomic claims in Lua, reconciliation of lost work, circuit breakers, HMAC request signing, secret rotation, feature-flagged rollouts, multi-tenant isolation, composite indexing, server-verified in-app purchases, metered billing
- AI tooling
- Claude and Claude Code, Model Context Protocol tool servers, LLM tool calling, retrieval-augmented generation, embeddings and vector search, ChromaDB, LangChain, open-weight models run locally with Ollama
- Also comfortable with
- React, Next.js, SQL, Drizzle ORM
Education
B.Tech, Computer Science Engineering
CGPA 9.0 out of 10
Achievements
- NPTEL Reinforcement Learning, Elite, top 2%
- NPTEL Cryptography and Network Security, Elite
Contact
I am open to backend and full-stack roles. The fastest way to reach me is email.