Product · Booking · Pricing
Resort booking
Availability that counts units, not overlaps
The booking half of a resort site: per-night availability across room types, seasonal and length-of-stay pricing, and refusals that name the night that blocked the stay rather than shrugging.
- TypeScript
- React
- Vitest
- 33 tests
Room type
Garden Villa · next 14 nights
Free units per night, not per booking. A stay is refused only when every unit is taken on one of its nights — and the refusal names that night.
Quote
Reservations · 4
- Reyes family · Beach Loft2026-03-05 → 2026-03-08
- M. Santos · Ocean Suite2026-03-04 → 2026-03-07
- J. Cruz · Ocean Suite2026-03-06 → 2026-03-09
- L. Bautista · Garden Villa2026-03-03 → 2026-03-06
Try booking the Beach Loft — there is only one, and it is already taken over the weekend. The refusal names the night rather than shrugging, which is the difference between a guest giving up and a guest shifting by a day.
Then book a Garden Villa four times. The fourth is refused; the first three are not, because four units means four bookings.
What this is, and what it is not
This is the part of the product that is worth building carefully: the rules that decide what can be sold, for how much, and what happens when the answer is no. It is a real engine with tests beside it, running in your browser with no server involved.
It is not a whole product. There is no login, no database and no payment provider — those are known quantities, and building them here would demonstrate nothing that the interesting half does not already demonstrate better. State lives in the page and resets when you reload it.
Read the full case study