How nicasiomarques/booking-host works
Booking Service provides a multi-tenant booking API and an establishment-management backoffice. Staff use the backoffice to manage establishments, services, availability, and bookings; the UI calls the API, whose feature services enforce domain rules and persist data. The graph preserves the documented hotel-room, extra-item, booking-status, authentication, and access-control capabilities. Source excerpts are selective, so links between unsampled API layers rely on the README’s architecture description; UI-to-API links are shown only where supported by sampled service code.
Main entry points: endpoints.ts Feature endpoints · repository.ts Feature repositories · routes.tsx Backoffice routes · server.ts HTTP API
Components 20
Backoffice
- Backoffice app
packages/backoffice/src/App.tsx - Backoffice routes
packages/backoffice/src/routes.tsx - Management pages
packages/backoffice/src/pages/Services.tsx - Booking management UI
packages/backoffice/src/pages/Bookings.tsx - Service API client
packages/backoffice/src/features/services/services/service.service.ts - Booking API client
packages/backoffice/src/features/bookings/services/booking.service.ts
API entry
- HTTP API
packages/backend/src/server.ts - Feature endpoints
packages/backend/src/features/booking/adapters/endpoints.ts
Booking capabilities
- Authentication and ACL
packages/backend/src/features/auth/application/auth.service.ts - Establishment management
packages/backend/src/features/establishment/application/establishment.service.ts - Bookable services
packages/backend/src/features/service/application/service.service.ts - Availability scheduling
packages/backend/src/features/availability/application/availability.service.ts - Optional extra items
packages/backend/src/features/extra-item/application/extra-item.service.ts - Booking lifecycle
packages/backend/src/features/booking/application/booking.service.ts - Hotel room management
packages/backend/src/features/room/application/room.service.ts
Application and domain
- Booking access queries
packages/backend/src/features/booking/application/booking-query.service.ts - Booking rules and types
packages/backend/src/features/booking/domain/booking.ts
Persistence
- Feature repositories
packages/backend/src/features/booking/adapters/repository.ts - PostgreSQL
Other components
- Establishment staff
Connections 23
- Establishment staff → Backoffice app: uses
README.md - Backoffice app → Backoffice routes: renders
packages/backoffice/src/App.tsx - Backoffice routes → Management pages: routes to
packages/backoffice/src/routes.tsx - Backoffice routes → Booking management UI: routes to
packages/backoffice/src/routes.tsx - Management pages → Service API client: uses
packages/backoffice/src/pages/Services.tsx - Booking management UI → Booking API client: uses
- Service API client → HTTP API: HTTP requests
packages/backoffice/src/features/services/services/service.service.ts - Booking API client → HTTP API: HTTP requests
packages/backoffice/src/features/bookings/services/booking.service.ts - HTTP API → Feature endpoints: routes requests
- Feature endpoints → Authentication and ACL: dispatches
- Feature endpoints → Establishment management: dispatches
- Feature endpoints → Bookable services: dispatches
- Feature endpoints → Availability scheduling: dispatches
- Feature endpoints → Optional extra items: dispatches
- Feature endpoints → Booking lifecycle: dispatches
- Feature endpoints → Hotel room management: dispatches
- Booking access queries → Booking rules and types: checks ownership
packages/backend/src/features/booking/application/booking-query.service.ts - Booking lifecycle → Feature repositories: uses repositories
- Bookable services → Feature repositories: uses repositories
- Availability scheduling → Feature repositories: uses repositories
- Optional extra items → Feature repositories: uses repositories
- Hotel room management → Feature repositories: uses repositories
- Feature repositories → PostgreSQL: reads and writes
packages/backend/src/features/booking/adapters/repository.ts