Skip to content
Shobam

02Full-stack engineer2026

Booking platform

A booking product built end to end: the schema, the hold, the payment, and every email that follows it.

Stack
Next.js · TypeScript · PostgreSQL · Stripe
The booking surface — availability on the left, the booking panel on the right.
The booking surface, abstracted: availability, a held slot, and the panel that takes payment.

00The problem

Booking is a deceptively small product. On the surface it is a calendar, a form and a receipt. Underneath it is a concurrency problem, a money problem and a notification problem, and the interface is only the visible third of it.

01What I owned

All of it, which is why this is the project where I learned to be a full-stack engineer rather than a frontend one who could read a schema.

  • The data model: what a slot is, what a booking is, and how they differ.
  • The availability query and the hold mechanism that protects it.
  • Checkout, payment confirmation, and the webhooks that follow.
  • Transactional email, and the failure path when it doesn't arrive.

02The hard part

Two people reach the same slot at the same time. The second person must not be told the slot is free after the first person has already committed to it.

The obvious approach — check, then insert — has a gap between the two statements, and that gap is where double bookings live. Either both requests see the slot as free, or neither does.

Most concurrency bugs are this simple. That's what makes them dangerous.

Three steps — claim, hold, confirm — with the middle step marked as a held slot.
The shape of the flow, abstracted: a slot is claimed, held for a window, and released if the payment doesn't land.

03What I changed

I stopped asking 'is this slot free?' and started asking 'can this slot be claimed?'. A claim is an operation that either succeeds or fails, and it is the database's job to decide which — not mine.

So availability became a derived view rather than a source of truth, and the booking itself became the thing that enforces the constraint. The interface then had one job: tell the truth about the outcome of a claim, including when it fails.

On the payment side, the same reasoning applied. A checkout that succeeds but whose confirmation email never arrives is a booking the customer doesn't believe in, so the email was treated as part of the flow, with a retry and a visible status, rather than as an afterthought.

04What it did

The product works, which for a booking flow is the whole job. Slots cannot be double-booked, a failed payment doesn't leave a booking behind, and every confirmed booking has a receipt and a calendar entry.

More valuable than the feature list: I stopped treating 'the frontend called the API' as the end of a feature. The parts users judge — does it feel right, does it stay correct — live at the seams.

05What I'd do differently

I'd write the tests for the concurrency path first. I found the double-booking problem by reasoning about it, not by watching it fail, and I wrote the test afterwards. That ordering is backwards: the test is the specification, and I let the code be the specification for a while.

I'd also pick a smaller scope. The first version did availability, holds, payments, reminders and an admin view. Three of those would have shipped sooner, taught me more, and left the others easier to design.