Backends that fail safely
NestJS, Postgres and job queues, with payments, credits and webhooks designed so nothing is lost or charged twice.
- level
- strong
- years
- 2
- evidence
- work/pixro
What I can do
- Build modular NestJS services on Postgres, with migrations instead of auto-sync, background workers on BullMQ/Redis, and deploys on AWS.
- Handle money correctly. In Pixro’s credit ledger every spend is recorded as pending first, credits are deducted in a fixed order from free to paid buckets, failed jobs are refunded automatically, and repeated requests are made idempotent. I wrote the subscription billing on Razorpay end to end.
- Make concurrency boring: quota is reserved before any AI provider is called, so two messages arriving at once can’t spend the same credits.
- Take in webhooks without losing any: a tiny Lambda with no framework verifies Meta’s signature, stores each event exactly once (keyed on a hash of the body), and asks Meta to retry if storage fails. The main app sweeps up stored events every 15 seconds.
- Change risky things gradually: feature flags, per-user beta model routing, and migrating every existing user to a new auth provider with backfill scripts rather than a big-bang cutover.
How I learned it
Flask APIs in college, Node at Bajaj Finserv Health, Go services at RockX, then NestJS while building Pixro, where a bug in billing or messaging costs real money or a real customer.
Where it shows
Pixro: the credit ledger, subscriptions, the conversations module and the webhook receiver.