Overview · Published
Four systems, and what each one proves
Most backend portfolios are the same CRUD app wearing a different logo: auth, a form, a table, a list view. They prove you can wire a framework together. They don't prove you can reason about a race condition, a network partition, or a node dying mid-write. So I built four "build-your-own-X" systems instead — each one chosen to corner a different hard problem and then prove it holds under load. Concurrency, consensus, real-time convergence, and AI infrastructure is an unusual spread to have running live in one place, and that's the point.
Here's the 30-second map.
FrontRow — it can't oversell a seat
FrontRow is a high-concurrency seat-booking system on the everyday production stack — Spring Boot, Postgres, Kafka, Redis — built around one promise it can prove: it never sells the same seat twice. The hard thing is the stampede. Thousands of buyers reach for the same few seats at the same instant; hold a seat too loosely and you oversell, hold it too tightly (a row lock across the user's payment) and you don't scale. FrontRow uses two independent layers — an atomic Redis SET NX PX hold for the race to grab, and a Postgres conditional UPDATE … WHERE booking_id IS NULL as the authoritative truth — so overbooking is structurally impossible. The headline: a live "stampede" of 1000 buyers chasing 1 seat books exactly 1, rejects 999, and oversells 0, start to finish in single-digit milliseconds.
Deep-dive: /writing/frontrow-no-double-booking · demo /frontrow
Raft lab — consensus you can break in the browser
The Raft lab is a real, from-scratch implementation of the Raft consensus algorithm running as a live 5-node cluster you can break from the browser. The hard thing it proves is that I understand consensus, not just consume it: "I read the paper" and "I implemented the parts that bite — term races, log divergence, the §5.4 commit rule" are very different claims, and this makes the second one inspectable. Kill the leader and a new one gets elected on a higher term; heal a partition and the stragglers catch up. The consensus is the genuine algorithm; only the network is pluggable, so the whole cluster runs in one process and every failure is reproducible.
Deep-dive: /writing/raft-from-scratch · demo /raft-lab
Liveboard — a canvas that converges identically everywhere
Liveboard is a real-time multiplayer canvas: open it, see everyone's cursors move, and draw together on a board that converges to the same picture on every screen. The hard thing is real-time fan-out plus conflict-free convergence — concurrent edits arrive out of order, late joiners must see the board as it already stands, and the server can restart mid-session. I modeled strokes as a grow-only CRDT keyed by (siteId, seq) with Lamport timestamps, so every client renders in identical z-order regardless of arrival order. It's seen real traffic: 701 messages relayed through the live process so far.
Deep-dive: /writing/liveboard-realtime-crdt · demo /liveboard
LLM gateway — the production layer a raw API call skips
The LLM gateway is an OpenAI-compatible proxy that fronts multiple providers behind one endpoint, with the concerns a direct API call ignores: routing, caching, streaming, and resilience. The hard thing it proves is AI infrastructure — point any OpenAI client at <host>/v1 and you get config-driven multi-provider routing, an exact-match cache that returns hits in ~0 ms, SSE streaming relayed in real time, and a per-provider circuit breaker with retry and cross-provider fallback. Verified end-to-end against Groq, with a live ops dashboard surfacing cache hit rate, tokens saved, and p50/p99 latency off the running process.
Deep-dive: /writing/llm-gateway · demo /gateway
The site is the work sample
The thesis is simple: I'd rather show four systems that each fail in an interesting way than one that doesn't fail at all. Concurrency control, distributed consensus, CRDT convergence, and AI-infra resilience are four distinct muscles, and each project here exists to exercise exactly one of them and then prove it with a number you can reproduce by clicking a button.
And the whole site is itself the demonstration. Everything on namangupta.me — the stampede that books 1 of 1000, the Raft cluster electing a leader live, the 701 relayed strokes, the gateway's cache hit rate — is served by its own backend, in real time, off the running process. No screenshots, no asserted numbers. If you want to know whether it works, break it yourself. The code for all four is in one repo: github.com/naman1gupta/portfolio.