Project Overview
Booking Platform is a multi-tenant SaaS booking platform built as a Moonrepo monorepo with 36 workspaces across apps/, packages/, integrations/, and tools/. The project version is 0.2.0 and uses Bun >= 1.3.0 as the runtime and package manager.
Monorepo Architecture
booking-platform/
├── apps/
│ ├── website/ # Main web app (SolidJS + TanStack Start)
│ ├── admin/ # Admin dashboard (SolidJS + TanStack Start)
│ └── mobile/ # Mobile app (Capacitor)
├── packages/ # 24 shared packages
│ ├── ai/ # AI integration utilities
│ ├── auth/ # Authentication and session management
│ ├── billing/ # Billing and subscription logic
│ ├── bookings/ # Booking domain logic
│ ├── chat/ # Chat domain logic
│ ├── communication/ # Email, SMS, and notification dispatch
│ ├── config/ # App configuration
│ ├── database/ # Drizzle ORM schema, migrations, queries
│ ├── devtools/ # Developer tools and debugging
│ ├── feature-flags/ # Feature flag management
│ ├── infrastructure/ # Server infrastructure and oRPC setup
│ ├── layout/ # App layout components
│ ├── notifications/ # Notification system
│ ├── payments/ # Payment processing
│ ├── provider/ # Provider domain logic
│ ├── rbac/ # Role-based access control
│ ├── reviews/ # Review and rating logic
│ ├── search/ # Search and filtering
│ ├── settings/ # User and provider settings
│ ├── shared/ # Shared utilities and types
│ ├── support/ # Support ticket logic
│ ├── ui/ # Shared UI component library
│ └── user/ # User profile and management
├── integrations/
│ ├── apple-business-connect/ # Apple Business Connect API client
│ ├── claude-app/ # Claude AI MCP server
│ ├── chatgpt-app/ # ChatGPT MCP server
│ ├── google-maps-booking/ # Google Maps Booking API client
│ ├── line-liff/ # LINE LIFF web app
│ └── shared/ # Shared integration utilities
├── tools/
│ ├── analyze/ # AST-based deep analysis CLI
│ └── health/ # Project health analysis CLI
├── docs/ # Documentation site (VitePress)
├── rules/ # ast-grep rules
├── scripts/ # Quality reporting scripts
├── .moon/workspace.yml # Moonrepo config
├── biome.jsonc # Biome linter/formatter config
├── lefthook.yml # Git hooks config
├── knip.json # Unused code detection config
├── sgconfig.yml # ast-grep config
└── package.json # Root workspace configTech Stack
| Layer | Technology | Version |
|---|---|---|
| Runtime | Bun | >= 1.3.0 |
| Framework | SolidJS | ^1.9.14 |
| Meta Framework | TanStack Start | ^1.168.32 |
| Build Tool | Vite | ^8.2.1 |
| Database | PostgreSQL + Drizzle ORM | ^0.45.2 |
| Auth | Supabase + jose JWT + WebAuthn | ^2.111.0 / ^6.2.4 / ^13.3.2 |
| API Layer | oRPC + Zod 4 | ^1.14.12 / ^4.4.3 |
| Payments | Stripe | ^22.5.0 |
| Styling | UnoCSS | ^66.7.5 |
| Testing | Vitest + Playwright | ^4.1.10 / ^1.62.0 |
| Table | TanStack Solid Table | ^8.21.3 |
| Linting | Biome | ^2.5.6 |
| Monorepo | Moonrepo | ^2.4.6 |
| AI | OpenAI + TanStack AI | ^6.49.0 / ^0.39.1 |
| Redis | ioredis | ^5.11.1 |
| Mobile | Capacitor | ^8.5.0 |
| Git Hooks | Lefthook | >= 2.0.0 |
| Code Analysis | ast-grep | ^0.44.1 |
| Type Checking | TypeScript | ^7.0.2 |
| Resend | ^6.18.1 | |
| Markdown | markdown-it + @shikijs/markdown-it | ^15.0.0 / ^4.4.1 |
| Sanitization | isomorphic-dompurify | ^3.19.0 |
Core Principles
- Type Safety — TypeScript strict mode in every file, Zod 4 for runtime validation
- Type-safe API — oRPC propagates types from database to UI end-to-end
- Clean Architecture — Vertical Slice Modules with domain, application, adapters, and presentation layers
- RBAC — 5 roles, 30+ permissions, enforced at route and API level
- Minimal Changes — Fix root causes, not symptoms
- File Limits — Every file stays under 250 lines
- No Bypass — Never bypass Git hooks, Biome rules, or permission checks
Dependency Management
bash
# Install all monorepo dependencies
bun install
# Add dependency to specific workspace
bun --filter website add <package>
# Add dev dependency
bun --filter docs add -D <package>Development
bash
# Start all workspace dev servers
bun run dev
# Run specific workspace
moon run apps-website:dev # Website at :5173
moon run apps-admin:dev # Admin dashboard
moon run docs:dev # Docs at :5174Build and Test
bash
# Build all workspaces
bun run build
# Run tests
bun run test
# Run lint + typecheck + scan
bun run check
# Run verify (check + test + build)
bun run verifynext: Architecture Overview | Features