// op_012 — case study Live
The Sugar Haus Bakery
// the problem
A bakery taking custom orders by phone and DM has no reliable way to check a requested event date against actual kitchen capacity, vacation blocks, and already-accepted orders — double-bookings and missed messages were a real risk without a real booking system.
// architecture decisions
Booking Logic
The order form validates a requested event date against a configurable prep window, cross-checking already-accepted orders and manually blocked vacation ranges stored in Postgres — all server-side, no client-trusted availability check.
Order Pipeline
Resend sends an instant order-received confirmation to the customer plus a baker notification with an embedded accept/decline link — order status updates without the baker ever logging into the admin panel.
Backend
Node/Express with PostgreSQL handles the order and date-block data model, with token-protected admin routes managing the pipeline and Sentry covering error monitoring.
Deployment
Deployed on Railway via Nixpacks — no Dockerfile to maintain for a single-service app with a straightforward build.
// key outcomes
The accept/decline-by-email flow means the baker manages the entire order pipeline from their inbox, with the prep-window and vacation-block logic preventing double-bookings automatically — no manual calendar-checking required.
// related builds