↖▢✒TPen tool · drawing
T Piyush Yadav · vector
Piyush0 × 180 · 0%
  • ↳ Importing Cover
0%

▢ Case study · 2026

Schedulr

A full Calendly-style scheduling platform with public booking pages, real-time availability, Google Calendar and Meet sync, and its own email engine. Double-bookings are blocked at the database level.

Schedulr booking page showing a month calendar with available dates and a list of open time slots beside it.
Role
Solo full-stack developer
Year
2026
Timeline
Sep to Oct 2026
Built with
TypeScriptReactViteTailwindTanStack QueryNode.jsExpressPostgreSQLPrismaRedisBullMQZodPlaywrightVitestDockerAWSGitHub Actions

01

The problem

Booking a meeting usually means a chain of “does Tuesday work?” emails. Tools like Calendly solve this, but they hide the hard parts. Behind them are real-time availability across time zones, calendar sync, and email that actually reaches the inbox. Above all, they guarantee that two people can never grab the same slot.

I wanted to build that whole system myself, from scratch. The goal was the same feature depth as a real scheduling product, running in production.

02

What he built

Schedulr is a production scheduling platform. Hosts set their availability and share a booking page. Invitees pick a time in their own time zone. The meeting lands in the host’s Google Calendar with a Meet link, and everyone gets confirmation and reminder emails.

Features

  • Event types with buffers, minimum notice, booking windows and daily or weekly limits

  • Weekly availability, date overrides, vacations and holiday import

  • Group events with seat limits, approval-based bookings, waitlists and recurring bookings

  • Teams: co-hosts and round-robin events, plus routing forms that send invitees to the right event

  • Single-use links, group polls and shareable time snippets

  • An embed script (about 3.4 KB gzipped) that adds a booking page to any website: inline, popup or floating badge

  • Two-factor sign-in, browser push notifications and an admin area for email delivery

03

The hard parts

Making double-booking impossible. Two people clicking the same slot at the same instant is a classic race condition. I solved it at two levels. First, every booking and slot hold for a host runs under a single PostgreSQL advisory lock. Second, an exclusion constraint makes the database itself refuse overlapping bookings. Race tests run 20 times on every CI build to prove it holds.

Time zones and DST. Every timestamp is stored in UTC, and the slot engine converts per viewer. Tests cover daylight-saving transitions so a 9 AM slot never quietly shifts by an hour.

Side effects that never get lost. A booking has to trigger emails, a calendar event, a Meet link, reminders and push notifications. If the server crashed midway, some of those could be lost. So the booking transaction writes an outbox event, and the worker fans out from there. Failed jobs land in a dead-letter table instead of disappearing.

Building my own email engine. Instead of relying on a hosted email API, I built one:

  • React Email templates

  • DKIM signing

  • Retries and bounce parsing

  • A suppression list

  • A per-message delivery timeline

Security. The security work covers:

  • argon2id password hashing

  • __Host- session cookies with CSRF protection

  • AES-256-GCM encryption for Google tokens and DKIM keys

  • Link tokens stored only as SHA-256 hashes

  • Rate limits and bot protection on every public endpoint

A tenancy test also calls every route as a second account to make sure no one can see another user’s data.

04

How it turned out

Schedulr is live at schedulr.piyushydv.com (opens in a new tab). It runs on AWS EC2 with Docker Compose and Caddy, and every push to main deploys automatically once CI passes.

  • About 200K lines of TypeScript across 39 API modules and 53 database models

  • Around 490 test files plus 15 Playwright end-to-end suites covering bookings, group events, round-robin, approvals, embeds and two-factor sign-in

  • Zero double-bookings by design, enforced by the database and verified by repeated race tests

  • An embed script of about 3.4 KB gzipped, small enough to drop onto any site

It’s the most complete system I’ve built. It taught me how much engineering sits behind a “simple” booking button.

Gallery · 6

  • Dashboard
  • Calender
  • Booking Page
  • Booking Page
  • Availability
  • Single-use links