What it is
An independent hotel taking enquiries by phone and WhatsApp, with no system of record beyond a diary. The brief was a website; the actual requirement was a booking engine that cannot oversell a room and a dashboard the front desk would use instead of the diary.
Rooms exist in several types at different tariffs, availability has to be computed across a date range rather than for a single night, and the person using the dashboard is working while a guest stands at the counter.
Everything a visitor reads and every rate they are quoted is editable from the dashboard. There is no deploy step for changing a tariff, a photograph or a description.
The problem
Nobody had been asked how many rooms of each type exist
Not by us, not by the previous developer, not by the hotel. It is the single fact standing between a booking form and overselling a room, and it was absent from every document in the project.
Two of the client's answers contradicted each other
The tariff sheet was written plus tax, while the written answer to the tax question said rates include GST. Separately, one room type was priced below the type below it. Both were real answers from the real client, and neither could simply be picked.
A third-party email outage would have cost room nights
The natural implementation sends a confirmation email inside the request that saves the booking. If the provider has a bad afternoon, the send throws, the request fails, the guest sees an error and the room goes back on sale. A sale is lost to somebody else's outage.
Availability is a range problem, not a night problem
A guest booking three nights needs every one of those nights free in the same room, and the rate for the stay is not the average of the three. Two guests can also submit for the last room in the same second.
The build would not run without a reachable database
Public pages are prerendered by actually executing their queries, so a release needs a migrated, reachable database at build time — which a plain container build is not connected to. The failure arrives as a connection error that looks like a configuration mistake and is not one.
What we built
The unanswered questions became a feature of the dashboard
Rather than chasing the client by email for three weeks or shipping placeholders and hoping, the dashboard carries a Still to do list that names each missing fact and why it matters. It is on screen at every login until it is filled in. The gap became visible to the person who can close it.
Contradictions were recorded, not resolved by guesswork
Where two client answers disagreed, we shipped the one that was written down, and wrote down that we had asked. The lower-priced premium room went live as given. Inventing a resolution would have produced a tariff nobody could explain at the counter.
A pending booking holds the room
Inventory is re-checked inside a serializable transaction at the moment of submission, and a pending booking reserves the room while payment or confirmation is outstanding. Two simultaneous submissions for the last room cannot both succeed.
Nothing in the email layer is allowed to throw
The booking is saved and the room is held first; the confirmation is a side effect. A failed send is logged against the booking with the provider's own reason and a Send again button on the dashboard. With no email credentials configured at all, the site still takes bookings.
The release script refuses to run on a contradiction
Before anything is built, the deploy checks that the two host variables name the same host. If they drift, the site is served at one address and links to another, and nothing at runtime reports it — so it is checked at the only moment it can be caught cheaply.
What the client has now
- The front desk works from the dashboard rather than a diary, with every booking traceable.
- The booking form cannot oversell a room, including under simultaneous submissions.
- An email provider outage degrades to a logged failure and a retry button; no booking is lost.
- Tariffs, descriptions, photographs and contact details are all editable without a release.
- Releases are zero-downtime, and a release that fails its health check tears nothing down.
What we took from it
A side effect must never fail the transaction that pays you
Saving the booking is the business. Sending the email is a courtesy. When the two share a transaction, the courtesy can cancel the business — and it will, on the day the provider has an incident, which is a day you do not control and will not be told about. The same reasoning applies to analytics, webhooks, notifications and anything else bolted onto a request that earns money.