Stiekema StudioNederlands

Case sheet

Booking planner

A self-built replacement for Cal.com that pulls free slots out of Google Calendar, books them with a Meet link and lets visitors cancel through a signed link. No database, and with deliberately narrow calendar permissions.

View the live site (opens in a new tab)

XBAS Business Intelligence · Almere NL · Case booking-planner

The booking form of the planner: step 1 with a row of available days (Friday 24 July selected), step 2 with time slots from 08:30 to 11:30, and the label 'Times in Europe/Amsterdam'.
Plate · Booking planner

Summary

The booking planner is the intro-call scheduler on this site: a self-built alternative to Cal.com. It reads free time out of Google Calendar, offers visitors the open slots, and on booking records an appointment with a Google Meet link. Cancelling goes through a signed link with a confirmation button. There is no database: every booking lives in the calendar itself. At the heart of it is a deliberate choice about permissions: the app only gets access to the calendar it created itself through the API, plus free/busy information, so it cannot write to the main calendar or read what I am busy with.

The brief

The site had no booking path and ended in a mailto. Cal.com asks for full read and write rights on the whole calendar; that was the reason to build it myself with the narrowest scopes possible.

What I built

  • Free-slot calculation from Google Calendar based on working hours, with a buffer between appointments and a booking horizon
  • Booking an appointment with an automatically created Google Meet link, straight into a separate calendar created through the API
  • Cancelling as a POST with a confirmation button behind an HMAC-signed link, not as a GET (mail scanners follow GET links automatically)
  • Time zone logic that always works internally in UTC instants and converts to Europe/Amsterdam per slot boundary, so slots do not shift by an hour around the daylight saving change
  • Confirmation and cancellation mail through Resend, with the Meet link and the cancel button in it
  • Bot defence: a honeypot field and a minimum fill-in time, without hindering real visitors

In detail

  • The narrowest calendar permissions possible: only the self-created booking calendar plus free/busy, no read or write access on the main calendar
  • No database: every booking lives in Google Calendar itself, so there is no separate store to manage or secure
  • Time zone conversion that survives the daylight saving change, covered by tests on the slot boundaries around it
  • Cancelling through a signed link with a confirmation, resistant to mail scanners that open links in advance
  • Changing availability is one file: working hours, slot length, buffer and horizon sit in one place

Outcome

In use on this site as the primary route to an intro call. The code runs with a test suite covering the time zone arithmetic and the HMAC signing, the places where a mistake would be silent and only hurt much later.