Bello Craft

Architecture Dossier

CS-02

Citaspace - Scheduling SaaS

Multi-Tenant Booking Platform with Payments, Reservations & Real-Time Scheduling

Role

Architect & Lead Developer

Organization

Independent Product

Period

2024 - Present

Deployment

Live Production
Next.jsFastifyPostgreSQLPrismaStripe Connect
Citaspace - Scheduling SaaSFig. 02 — System Conceptual Plate

01 · 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.

02 · 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.

03 · 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.

04 · Interactive System Topology

Tap any tier or run a live fault-injection drill

Tier 01 · Presentation

2 nodes

Tier 02 · Application

3 nodes

Tier 03 · Data

4 nodes
3-tier production architecture blueprint

Technical Stack

Next.jsFastifyPostgreSQLPrismaStripe ConnectRedisBullMQTypeScriptTurborepo

05 · Key Engineering Decisions (4)

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.

06 · Production Outcome

Shipped a production booking platform that handles concurrency and payment edge cases, enabling providers to run scheduling and deposits with minimal manual intervention.
07 · Studio Pairing // Cultural Cross-Pollination

Multi-tenant boundaries require deep modules with clean interfaces, polyrhythmic coordination, and architectural framing.

Full Archive
3 Studio Influences