Skip to content

Packages (packages/*)

The packages/ directory contains 24 shared packages that provide domain logic, infrastructure, and UI components consumed by the apps.

Overview

Each package is a self-contained workspace with its own package.json, moon.yml, and tsconfig.json. Packages follow the same Clean Architecture principles as the rest of the monorepo, with pure domain logic separated from infrastructure concerns.

Package List

PackagePathDescription
@booking/aipackages/aiAI integration utilities and OpenAI helpers
@booking/authpackages/authAuthentication, session management, and Supabase integration
@booking/billingpackages/billingBilling and subscription domain logic
@booking/bookingspackages/bookingsBooking domain logic and types
@booking/chatpackages/chatReal-time chat domain logic
@booking/communicationpackages/communicationEmail, SMS, and notification dispatch
@booking/configpackages/configApp configuration and environment management
@booking/databasepackages/databaseDrizzle ORM schema, migrations, and queries
@booking/devtoolspackages/devtoolsDeveloper tools and debugging utilities
@booking/feature-flagspackages/feature-flagsFeature flag management and evaluation
@booking/infrastructurepackages/infrastructureServer infrastructure, middleware, and oRPC setup
@booking/layoutpackages/layoutApp layout components (header, footer, navigation, sidebar)
@booking/notificationspackages/notificationsNotification system and preferences
@booking/paymentspackages/paymentsPayment processing and Stripe integration
@booking/providerpackages/providerProvider domain logic and types
@booking/rbacpackages/rbacRole-based access control (5 roles, 30+ permissions)
@booking/reviewspackages/reviewsReview and rating domain logic
@booking/searchpackages/searchSearch and filtering domain logic
@booking/settingspackages/settingsUser and provider settings domain logic
@booking/sharedpackages/sharedShared utilities, types, and common helpers
@booking/supportpackages/supportSupport ticket domain logic
@booking/uipackages/uiShared UI component library
@booking/userpackages/userUser profile, verification, and management

Usage

Packages are consumed by apps via workspace references:

typescript
import { authMiddleware } from "@booking/auth";
import { db } from "@booking/database";
import { checkPermission } from "@booking/rbac";
import { Button } from "@booking/ui";

Key Scripts

Each package follows the standard monorepo task set:

bash
# Run tasks for a specific package
moon run packages-auth:lint
moon run packages-database:typecheck
moon run packages-rbac:test

# Run tasks for all packages
moon run :lint --query 'stack == "frontend" || stack == "backend"'

Architecture

Most packages follow a Clean Architecture layout:

packages/<name>/
├── src/
│   ├── index.ts          # Package entry point (barrel export)
│   ├── domain/            # Pure business logic (no side effects)
│   ├── application/       # Orchestration layer
│   └── adapters/          # I/O layer (side effects only)
├── biome.jsonc            # Workspace-specific lint config
├── moon.yml               # Moonrepo task config
├── tsconfig.json          # TypeScript config
└── package.json           # Package manifest

Released under the MIT License.