
A booking link looks like a small feature. It is not. It is a scheduling system, a timezone converter, a concurrency problem and a confirmation pipeline in one screen.
We rebuilt our own strategy-call flow this month. The old flow sent people to a contact form and then to an external scheduler. Every redirect was a place to drop off, and every manual confirmation was a place to make a mistake. The new flow lives at /book: a real calendar, live availability, a three-step form and an instant confirmation.
What we wanted
The requirements were deliberately small:
- A free 30-minute strategy call.
- Weekdays only, in the next three weeks.
- Seven published slots per day, in Pakistan Standard Time.
- One booking per slot, with no double-booking under concurrent requests.
- Times shown in the visitor's own timezone.
- A confirmation email, a Google Calendar link and an .ics file.
- A record in our dashboard so the team can follow up.
No Calendly account, no redirect, no per-seat scheduler fee.
The data model
The core table is simple: name, email, company, phone, service, notes, slot date, slot time, timezone and a status. The important part is the unique slot key:
- A booking is identified by "date|time", for example "2026-11-26|10:00".
- That key has a unique index in Postgres.
- The insert uses INSERT ... ON CONFLICT (slotKey) DO NOTHING RETURNING id.
If two people press the same slot at the same moment, exactly one insert wins. The other request gets a 409 and a clear message to choose another time. The database is the source of truth, not a JavaScript array or a client-side assumption.
Timezones without guesswork
The business runs on Pakistan Standard Time, which is UTC+5 all year. We store every slot as a date and a time in PKT, then convert it in the browser with Intl.DateTimeFormat for display.
Two details matter:
- The visitor sees their local time, with the PKT time underneath when they differ.
- Their local date can be the previous or next day. A 10:00 PKT call is 00:00 in New York, so the UI shows the local day label as well.
The server validates the same rules the client sees: weekday, allowed slot, future date. A manipulated request cannot invent a 03:00 Sunday slot.
The UI is the product
The calendar is a real month grid, not a list of dates. Unavailable days are visible but disabled. Choosing a date moves the visitor to the time step, then the details step. The confirmation replaces the form with the exact local time, the PKT time, an add-to-calendar button and a reference number.
One detail we had to fix: the native select for "what do you need help with?" is rendered by the operating system, so its popup was white with a blue highlight on Windows. We replaced it with a keyboard-accessible listbox that uses the site's own dark theme.
The unglamorous parts
Most of the work is not visible:
- Sending the admin notification and the visitor confirmation through the existing SMTP rotation, without failing the booking if mail is down.
- Mirroring the booking into the lead pipeline so it appears in the dashboard.
- Building the .ics file and the Google Calendar URL from the same slot data.
- Rate limiting, a honeypot, and server-side validation.
- Making the form work on a 390px screen.
What we learned
A booking flow is a SaaS product in miniature. It has identity, availability, concurrency, notifications, timezones, an admin view and a mobile experience. If any one of those is sloppy, the whole thing feels unreliable.
The new flow removes two redirects, one manual confirmation and one source of double-booking. It also gives us a reusable pattern for client products: clinics, agencies, gyms, consultants and any team that sells time.
If you are building a booking flow into your own product, book a free strategy call and we will scope it with you. If you want the short version of what we build, start with SaaS development.