← BACK TO HOME

Cronos

A production-grade multi-tenant SaaS for appointment-based businesses. Each tenant gets a branded public booking portal and a full back-office dashboard — all under a shared infrastructure with per-org data isolation.

LIVE ↗

Architecture

Every resource is scoped to an organizationId. The Next.js app serves two surfaces under the same codebase: a public booking portal at /:orgSlug/book (no auth required) and a private dashboard at /:orgSlug/dashboard with server-side session enforcement.

Key Integrations

  • Better Auth — Google OAuth with offline access and Calendar scope for automatic two-way appointment sync via the Google Calendar API.
  • CASL — attribute-based authorization with OWNER and EMPLOYEE roles, subscription state-aware rule evaluation.
  • Meilisearch — real-time indexing of six entity types filtered by tenant, with transparent Prisma fallback when unavailable.
  • notify-svc — a standalone Bun + Elysia microservice handling WhatsApp (Evolution API), Web Push (VAPID), and email (Resend) over an internal queue.
  • Serwist — Workbox-based service worker for full PWA support, offline caching, and push subscription management.

State & Data Fetching

Server Components handle all initial data loads. TanStack Query v5 manages client-side cache invalidation and optimistic updates. Jotai drives the multi-step booking wizard state without prop drilling. URL state (filters, tabs) is persisted via nuqs.

Observability

New Relic APM on the Next.js Node.js runtime, PostHog for product analytics (self-proxied through Next.js rewrites), and OpenTelemetry with OTLP export on the notify-svc side.