Behind the build
About Clearbook
Clearbook is a production-ready, multi-tenant booking platform crafted as a solo-engineered SaaS. Businesses can run their day-to-day operations on it today, while prospects and recruiters can spin up a demo sandbox workspace to explore the full experience safely.
Multi-tenant foundation
Built on Next.js 14 (App Router) with MongoDB + Mongoose, each tenant receives isolated services, staff, and availability. Redis (Upstash) powers cache-tagged availability lookups while middleware enforces IP rate limits. Draft/publish workflows keep schedule changes private until approved.
Payments & compliance
Stripe Connect Express powers payouts with application fees, reverse transfers on refunds, and automated onboarding education. GDPR tooling includes soft deletes with retention windows, nightly cleanup cron jobs, and legal paperwork (privacy policy, DPA, subprocessors) available in-app.
Public booking experience
The hosted booking page and `/embed/[tenant]` widget reuse the same APIs as the admin dashboard. Idempotency headers, honeypot spam traps, and Mongo unique indexes prevent double bookings, while theme tokens keep the widget aligned with each tenant’s branding.
Testing & reliability
node:test covers domain logic, API routes, and availability math. Integration suites spin up Mongo + Stripe mock containers, and Cypress exercises the customer journey end-to-end. GitHub Actions runs CI on every push plus nightly cleanup workflows.
Demo sandbox
Marketing CTAs launch a dedicated demo tenant populated with services, staff, and bookings. A cookie tracks the sandbox slug so the booking widget preview mirrors the exact workspace, and the cleanup job expires the demo after a few hours.
Why it matters
Clearbook replaces spreadsheets and DMs with a polished workflow that lets small teams manage services, staff, availability, analytics, and branded customer bookings without engineering help.
Explore further
The case study covers architecture choices, testing strategy, and roadmap; production tenants run on the same stack customers use today; and the demo sandbox workspace mirrors that experience with Stripe in test mode so you can explore freely. View the technical write-up or email alle7000.andersson@gmail.com for access or questions.