Confidential Brief
CS-02
Citaspace - Scheduling SaaS
Multi-Tenant Booking Platform with Payments, Reservations & Real-Time Scheduling
Next.jsFastifyPostgreSQLPrismaStripe ConnectRedisBullMQTypeScriptTurborepo
Problem & Context
Citaspace is for service pros who need bookings and payments in one place. Most tools were either too expensive, too generic, or brittle once real edge cases showed up.
Constraints
Booking logic breaks fast under concurrency. We had to prevent double bookings, handle timezone differences correctly, and survive partial payment failures without corrupting reservation state.
Architectural Approach
I used a Turborepo setup with Next.js and a Fastify API, sharing types across the stack. Slot holds use database constraints plus TTL cleanup to block double booking. Stripe Connect webhooks drive payment state updates, and BullMQ handles async notifications so checkout stays fast.
System Architecture
Presentation
Next.js Frontend
Radix UI
Application
Fastify API
BullMQ Workers
Stripe Webhooks
Data
PostgreSQL
Redis
Stripe Connect
AWS S3
Technical Stack
Next.jsFastifyPostgreSQLPrismaStripe ConnectRedisBullMQTypeScriptTurborepo
Key Decisions
Added reservation holds with a 10-minute TTL and DB constraints to prevent checkout collisions.
Used Stripe Connect Express so providers own payouts and the platform takes fees cleanly.
Moved email and notifications to BullMQ so failures never block booking flow.
Computed availability server-side with IANA timezones to avoid client drift.
Outcome
Shipped a production booking platform that handles concurrency and payment edge cases, enabling providers to run scheduling and deposits with minimal manual intervention.