Booki

Overview

Overview of the Booki web applications — frontend and backend architecture.

The Booki web app is made up of four Nuxt SPA frontends sharing a common backend API. Each frontend is scoped to a specific audience and role.

Applications

AppAudienceAuthTenancy
customer-booki-web-appCustomersCookie JWTSubdomain slug
owner-booki-web-appBusiness ownersCookie JWTOrg from user profile
admin-booki-web-appSuper adminsCookie JWT + admin roleNone
cms-booki-web-appPublicNoneNone

Frontend Architecture

All frontend apps are Single-Page Applications built with Nuxt and deployed to Cloudflare Pages. They share:

  • A common Nuxt layer (codi-layer) providing composables, plugins, and types
  • Tailwind CSS v4 + DaisyUI for UI
  • Phosphor Icons for iconography
  • JWT in cookies for authentication
  • Nuxt route rules to proxy all /api/** calls — the browser never sees the real API URL

Backend Architecture

booki-api uses a strict layered architecture:

Route → Middleware → Controller → Service → Repository → MongoDB + Redis
  • No Mongoose — MongoDB native driver for performance and flexibility
  • Joi for request validation
  • Redis for caching (TTL-based, invalidated on writes)
  • JWT with revoked-token tracking
  • Soft deletesdeletedAt: null on all records

Documentation Structure

  • Frontend — Component conventions, composables, pages, middleware, plugins, state, and TypeScript
  • Backend — Controllers, services, repositories, models, routes, middleware, validation, and error handling