Skip to content
Back to projects
svc/02personal

Cadence

A scheduling and call-booking app, live at bookcadence.app: hosts set their weekly hours and share one link, invitees pick a time in their own timezone, and the call lands on the host's calendar. Rust on Axum and Postgres behind a React front end.

Role
Solo
Year
2026
Runtime
RustAxumTokiosqlxPostgreSQLTypeScriptReactTanStackDocker

What it is

A booking app. A host signs up, sets the weekly hours they take calls in their own timezone, and shares one link. An invitee opens the link, sees the open times in their timezone, and picks one. The call goes on the host's calendar, with a Google Meet link when the host has connected Google Calendar and chosen Meet, and both sides get email about it.

It is live at bookcadence.app. My own booking page runs on it, and it is the one embedded at the bottom of this site's home page.

How it's built

The back end is Rust: Axum on Tokio, Postgres through sqlx, split into domain modules (auth, availability, bookings, event types, emails, Google Calendar, billing, webhooks and others). The front end is React with TanStack Router and TanStack Query, built with Vite. The two share types through ts-rs, which exports the Rust request and response models as TypeScript, and CI fails if the committed bindings are out of date.

A few decisions carry most of the weight.

Open times are derived, never stored. Availability is weekly rules - weekday, start, end, slot length - plus date overrides. The slot policy in bookings/slots.rs is the one place that decides what a visitor can book: it expands the rules inside the booking window and after the notice period, keeps the host's gap from every booked call, and keeps a gap around Google Calendar busy events. Changing a host's Tuesday means editing one row, not regenerating a calendar.

Conflicts are the database's job. Reserving a slot re-checks it inside a transaction that locks the host, and bookings carries a partial unique index on (host_unid, slot_start) for every call that is not cancelled. Two invitees racing for the same time do not both win: one insert fails, the handler recognises the unique violation, and the API answers 409 with "this time is no longer available".

The booking is written before anything is announced. The calendar event, the emails and the webhooks run after the booking commits, in their own task, so a refused booking never leaves an invite behind, and a visitor who drops the request half-way still leaves a call everyone hears about. Email goes into an email_queue table that a worker drains every minute; webhook deliveries go into their own table, signed with HMAC-SHA256 and retried on failure.

Auth is Argon2 password hashing with a JWT session in a cookie, read by Axum FromRequestParts extractors, so a route that needs a signed-in host or an admin says so in its signature.

Where it stands

Live in production. GitHub Actions runs the quality gate on every push: rustfmt, clippy with warnings as errors, the backend's HTTP tests (each test gets a throwaway database through #[sqlx::test]), and the front end's build, typecheck, lint and tests. A manually triggered deploy workflow builds the back end and front end as Docker images, swaps the containers on the server behind Nginx with Let's Encrypt TLS, and smoke-tests both health endpoints before tagging the deployed commit.

Back to projects