Introduction
The Booki platform is a multi-tenant booking system built on a Nuxt (SPA) frontend stack and an Express v5 backend. All apps share common infrastructure through two internal packages: codi-layer and codi-node-utils.
Repository Overview
booki-api
Express v5 REST API with Socket.IO. MongoDB (native driver), Redis cache, JWT auth, Joi validation.
codi-node-utils
Shared Node.js utilities published as @codisolutions23/node-utils. HTTP errors, auth middleware, DB/cache helpers.
codi-layer
Shared Nuxt layer. Contains base composables (useAuth, useBooking, useTenant…), plugins ($api, socket), and types used by all SPAs.
customer-booki-web-app
Customer-facing booking SPA. Subdomain-based multi-tenancy, Google Identity login.
owner-booki-web-app
Business owner dashboard. Manages bookings, staff, services, and payment methods.
admin-booki-web-app
Super-admin panel. Organization management, billing, SOA reports.
cms-booki-web-app
Public landing and organization registration pages.
Key Architectural Decisions
| Decision | Choice | Reason |
|---|---|---|
| Frontend rendering | ssr: false (SPA) | All apps deployed to Cloudflare Pages as SPAs |
| Frontend UI | Tailwind CSS v4 + DaisyUI | Component classes, theming, responsive layout |
| API routing | Nuxt route rules proxy | Avoids CORS, hides API URL from client |
| Deployment | Cloudflare Pages (nitro preset: cloudflare-pages) | Each app deployed independently |
| HTTP client | $fetch via $api plugin | Shared auth headers, 401 auto-redirect |
| Multi-tenancy | Subdomain (x-tenant-slug header) | One customer app deployment per tenant via subdomain |
| Auth | JWT (access + refresh cookies) | Stateless, works across services |
| Database ORM | None — MongoDB native driver | Performance, flexibility |
| Validation (backend) | Joi | Schema-driven, consistent error messages |
| Validation (frontend) | Custom useFormHandler composable | Lightweight, reactive |