$ ls /writings · 5 posts
Engineering notes.
Notes on architecture, payments, and concurrency, grounded in the systems I build.
~/writings/index.tsx
Start here
Why I Moved from Next.js API Routes to a Dedicated Node.js Backend
Why Petrol Partner outgrew Next.js API routes, and what changed when I moved its backend to Node.js.
Architecture
Behind the build · Petrol Partner
(opens in a new tab)Designing Backend Systems That Survive Concurrency, Retries, and Real-World Failures
How concurrency and retries challenge backend correctness, even when individual queries are atomic.
Backend Systems
(opens in a new tab)Designing Payment Systems That Survive Retries, Crashes, and Race Conditions
How to reason about payment reliability when retries, crashes, and race conditions interrupt the happy path.
Payments
(opens in a new tab)What Actually Breaks in Real-World Payment Systems (And How to Design for It)
How database constraints help protect payment flows from duplicate requests and webhook replays.
Payments
(opens in a new tab)Preventing Double Booking: Understanding Race Conditions in Real Systems
Why concurrent booking requests can claim the same seat, and how to reason about preventing double bookings.
Concurrency
(opens in a new tab)