Essays & notes
Production debugging stories, frontend architecture decisions, and lessons from building real-time systems.
Why Sentry Was Showing 11-Second Button Clicks: Debugging Bad Data, Multiple Bundles, and an 82% Size Cut
Garbage Sentry data led us to multiple SDK bundles and wildcard imports. Fixing the init pattern and tree-shaking cut our Sentry payload from 400KB to 70KB.
How I Cut a Trading Platform's Memory from 1GB to 400MB
A production debugging story — how I tracked down a 1GB memory leak on a crypto trading platform caused by a subtle useEffect dependency and unmemoized table re
Shipping a Payment Flow Across Web and Native Without Losing Your Mind
Building a Razorpay payment flow that works across web, React Native, and WebView — with a postMessage bridge, HMAC verification, and webhook reconciliation.
Doctor Scheduling with Recurring Rules and Timezone Traps
RRule-based recurring availability, lazy slot generation with IST-UTC conversion, FOR UPDATE SKIP LOCKED for race-safe booking, and payment locking with cron-based cleanup.
Building a Real-Time Assessment Engine with WebSockets and State Machines
How we built a real-time clinical assessment engine using Socket.IO, Redis state machines, and config-driven scoring — with emergency short-circuits for risk detection.
Rendering 20 Message Types in a Chat UI Without Losing Your Mind
Rendering 20 message types in a single chat UI with a switch statement, the isLastMessage single-active-step pattern, and three hooks pushing to one Redux store.
What I Learned Deploying a Full Observability Stack for a Side Project
Deploying Prometheus, Grafana, Loki, Tempo, and Alertmanager for a Node.js backend. What actually caught production issues and what was overkill.
Building a Retry-Aware API Client with Silent Token Refresh
Building an Axios-based HTTP client with linear backoff retries, a subscriber queue for silent token refresh, server-down detection via CustomEvents, and forced logout after repeated failures.
OTP Auth, Rate Limiting, and the Token Refresh Dance
Phone-based OTP auth with crypto-safe generation, cookie-only JWT delivery, escalating rate limits across six tiers, and full refresh token rotation with bcrypt verification.