PromptStack

Booking and appointments

A system for reserving time or resources: availability rules, bookable slots, confirmations, reminders, and cancellations. Preventing double-booking across time zones is the hard part.

You can change every choice once the builder opens.
Core features for the MVP
  • Bookable resources with opening hours and exceptions
  • Availability calculated from rules, existing bookings, and buffer time
  • Customer-facing booking flow showing only genuinely free slots
  • Confirmation and reminder messages by email
  • Cancellation and rescheduling within a policy window
  • Staff diary view across day, week, and resource
  • Correct handling of time zones and daylight saving changes
Left for later
  • Deposits and prepayment at booking time
  • Recurring bookings
  • Waiting list that offers a freed slot automatically
  • Two-way sync with an external calendar

Recommended stack

SectionRecommended
LanguageTypeScript
Frontend frameworkNext.js
UI and stylingTailwind CSSshadcn/ui
BackendNext.js server
API styleServer actions
Architecture and code structureModular monolithLayered codeDomain core with ports and adapters
Data handling patternsFast lookup by id or keyPaging through long listsStopping duplicates and repeatsCounting events and enforcing limitsQueueing slow work
Database enginePostgreSQL
Database providerNeon
ORM and data accessDrizzle
AuthenticationClerk
Authorization and rolesRole-based access control
SecurityInput validationRate limitingSecurity headers and CSPSecrets management
Background jobs and cronInngest
Email and notificationsResendSMS with Twilio
PaymentsStripe
Hosting and deploymentVercel
CI/CDGitHub Actions
Monitoring and analyticsSentry
TestingVitestPlaywright
ExtrasInternationalizationAccessibility (WCAG)BackupsDocumentation

Data model draft

Resource

The thing being booked: a person, a room, or a piece of equipment.

  • id
  • name
  • resourceType
  • timeZone
  • bufferMinutes
  • isActive
  • Has many AvailabilityRules
  • Has many Bookings
AvailabilityRule

When a resource is normally available, or explicitly unavailable.

  • id
  • resourceId
  • dayOfWeek
  • startTime
  • endTime
  • effectiveFrom
  • effectiveTo
  • isBlackout
  • Belongs to one Resource
Booking

One reserved interval. Stored in UTC with the original time zone kept.

  • id
  • reference
  • resourceId
  • customerId
  • serviceId
  • startsAtUtc
  • endsAtUtc
  • bookedTimeZone
  • status
  • createdAt
  • Belongs to one Resource
  • Belongs to one Customer
  • Belongs to one Service
Service

What is being booked, and how long it takes.

  • id
  • name
  • durationMinutes
  • priceMinorUnits
  • currency
  • isActive
  • Has many Bookings
Customer

The person making the booking.

  • id
  • fullName
  • email
  • phone
  • notes
  • createdAt
  • Has many Bookings