# joshuakibwage/booking-platform architecture

> Architecture diagram of the GitHub repository joshuakibwage/booking-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/joshuakibwage/booking-platform
- Repository: https://github.com/joshuakibwage/booking-platform

## Overview

Booking Platform is a full-stack marketplace and appointment-management application: customers discover professionals and services, check availability, and create or manage bookings; professionals configure profiles, services, and working hours. The README describes the frontend/API split, while sampled API code shows booking, availability, and profile persistence paths. Authentication, email delivery, and image hosting are represented as distinct capabilities, but unsampled implementations and integrations are not inferred beyond documented or indexed relationships.

Main entry points: [`apps/web/lib/axios.ts`](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/lib/axios.ts) (API client), [`apps/api/src/services/booking.service.ts`](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/booking.service.ts) (Booking rules), [`apps/api/src/routes/availability.routes.ts`](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/routes/availability.routes.ts) (Professional routes), [`apps/api/src/app.ts`](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/app.ts) (Express application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Customer and professional web"]
  node_web_discovery["Service discovery<br/>[page.tsx]"]
  node_web_profile["Professional profiles<br/>[page.tsx]"]
  node_web_booking["Booking scheduler"]
  node_web_customer_bookings["Customer bookings<br/>[page.tsx]"]
  node_web_dashboard["Professional dashboard<br/>[page.tsx]"]
  node_web_services["Service management"]
  node_web_availability["Availability management"]
  node_web_api["API client<br/>[axios.ts]"]
end

subgraph group_api["API and domain services"]
  node_api_app["Express application<br/>[app.ts]"]
  node_booking_routes["Booking routes<br/>[booking.routes.ts]"]
  node_availability_routes["Professional routes"]
  node_booking_controller["Booking handlers"]
  node_availability_controller["Availability handler"]
  node_profile_controller["Profile handlers"]
  node_booking_service["Booking rules<br/>[booking.service.ts]"]
  node_availability_service["Availability calculation"]
  node_service_controller["Service handlers"]
end

subgraph group_data["Persistence and integrations"]
  node_availability_repo["Availability data"]
  node_booking_repo["Booking data"]
  node_service_repo["Service data"]
  node_profile_repo["Professional data"]
  node_customer_repo["Customer data"]
  node_postgres[("PostgreSQL")]
end

subgraph group_ops["Identity and notifications"]
  node_auth["Authentication<br/>[auth.service.ts]"]
  node_notification["Booking notifications"]
  node_email["Email service<br/>[email.service.ts]"]
  node_image_service["Profile image hosting"]
end

node_customer(("Customer"))
node_professional(("Professional"))

node_customer -->|"browses"| node_web_discovery
node_customer -->|"books through"| node_web_booking
node_professional -->|"manages business"| node_web_dashboard
node_web_discovery -.->|"requests discovery"| node_web_api
node_web_profile -.->|"requests profile"| node_web_api
node_web_booking -.->|"submits booking"| node_web_api
node_web_customer_bookings -.->|"manages bookings"| node_web_api
node_web_services -.->|"updates services"| node_web_api
node_web_availability -.->|"updates hours"| node_web_api
node_web_api -->|"calls API"| node_api_app
node_api_app -->|"mounts routes"| node_booking_routes
node_api_app -->|"mounts routes"| node_availability_routes
node_booking_routes -->|"dispatches"| node_booking_controller
node_availability_routes -->|"dispatches"| node_availability_controller
node_availability_routes -->|"dispatches"| node_profile_controller
node_availability_routes -->|"dispatches"| node_service_controller
node_booking_controller -->|"invokes"| node_booking_service
node_availability_controller -->|"invokes"| node_availability_service
node_booking_service -->|"checks slots"| node_availability_service
node_booking_service -->|"persists booking"| node_booking_repo
node_booking_service -->|"loads service"| node_service_repo
node_booking_service -->|"checks customer"| node_customer_repo
node_booking_service -->|"notifies participants"| node_notification
node_availability_service -->|"reads hours"| node_availability_repo
node_availability_service -->|"reads service"| node_service_repo
node_profile_controller -->|"reads and writes"| node_profile_repo
node_profile_controller -->|"uploads image"| node_image_service
node_service_controller -->|"manages services"| node_service_repo
node_availability_routes -.->|"manages schedules"| node_availability_repo
node_availability_repo -->|"queries"| node_postgres
node_booking_repo -->|"queries"| node_postgres
node_service_repo -->|"queries"| node_postgres
node_profile_repo -->|"queries"| node_postgres
node_customer_repo -->|"queries"| node_postgres
node_notification -.->|"sends email"| node_email
node_api_app -.->|"registers auth routes"| node_auth

click node_web_discovery "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(marketing)/explore/page.tsx"
click node_web_profile "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(marketing)/professionals/%5BprofessionalId%5D/page.tsx"
click node_web_booking "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/components/booking/booking-scheduler.tsx"
click node_web_customer_bookings "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(customer)/customer/bookings/page.tsx"
click node_web_dashboard "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(professional)/professional/dashboard/page.tsx"
click node_web_services "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/components/professional/services/professional-services-manager.tsx"
click node_web_availability "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/components/professional/availability/weekly-availability-manager.tsx"
click node_web_api "https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/lib/axios.ts"
click node_api_app "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/app.ts"
click node_booking_routes "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/routes/booking.routes.ts"
click node_availability_routes "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/routes/availability.routes.ts"
click node_booking_controller "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/booking.controller.ts"
click node_availability_controller "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/availability.controller.ts"
click node_profile_controller "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/professional-profile.controller.ts"
click node_booking_service "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/booking.service.ts"
click node_availability_service "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/availability.service.ts"
click node_service_controller "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/service.controller.ts"
click node_availability_repo "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/availability.repository.ts"
click node_booking_repo "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/booking.repository.ts"
click node_service_repo "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/service.repository.ts"
click node_profile_repo "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/professional-profile.repository.ts"
click node_customer_repo "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/customer.repository.ts"
click node_auth "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/auth.service.ts"
click node_notification "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/booking-notification.service.ts"
click node_email "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/email.service.ts"
click node_image_service "https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/cloudinary.service.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web_discovery,node_web_profile,node_web_booking,node_web_customer_bookings,node_web_dashboard,node_web_services,node_web_availability,node_web_api toneBlue
class node_api_app,node_booking_routes,node_availability_routes,node_booking_controller,node_availability_controller,node_profile_controller,node_booking_service,node_availability_service,node_service_controller toneAmber
class node_availability_repo,node_booking_repo,node_service_repo,node_profile_repo,node_customer_repo,node_postgres toneMint
class node_auth,node_notification,node_email,node_image_service toneRose
class node_customer,node_professional toneIndigo
```

## Components

### Customer and professional web

- [Service discovery](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(marketing)/explore/page.tsx): `apps/web/app/(marketing)/explore/page.tsx`
- [Professional profiles](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(marketing)/professionals/%5BprofessionalId%5D/page.tsx): `apps/web/app/(marketing)/professionals/[professionalId]/page.tsx`
- [Booking scheduler](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/components/booking/booking-scheduler.tsx): `apps/web/components/booking/booking-scheduler.tsx`
- [Customer bookings](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(customer)/customer/bookings/page.tsx): `apps/web/app/(customer)/customer/bookings/page.tsx`
- [Professional dashboard](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/app/(professional)/professional/dashboard/page.tsx): `apps/web/app/(professional)/professional/dashboard/page.tsx`
- [Service management](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/components/professional/services/professional-services-manager.tsx): `apps/web/components/professional/services/professional-services-manager.tsx`
- [Availability management](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/components/professional/availability/weekly-availability-manager.tsx): `apps/web/components/professional/availability/weekly-availability-manager.tsx`
- [API client](https://github.com/joshuakibwage/booking-platform/blob/main/apps/web/lib/axios.ts): `apps/web/lib/axios.ts`

### API and domain services

- [Express application](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/app.ts): `apps/api/src/app.ts`
- [Booking routes](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/routes/booking.routes.ts): `apps/api/src/routes/booking.routes.ts`
- [Professional routes](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/routes/availability.routes.ts): `apps/api/src/routes/availability.routes.ts`
- [Booking handlers](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/booking.controller.ts): `apps/api/src/controllers/booking.controller.ts`
- [Availability handler](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/availability.controller.ts): `apps/api/src/controllers/availability.controller.ts`
- [Profile handlers](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/professional-profile.controller.ts): `apps/api/src/controllers/professional-profile.controller.ts`
- [Booking rules](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/booking.service.ts): `apps/api/src/services/booking.service.ts`
- [Availability calculation](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/availability.service.ts): `apps/api/src/services/availability.service.ts`
- [Service handlers](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/controllers/service.controller.ts): `apps/api/src/controllers/service.controller.ts`

### Persistence and integrations

- [Availability data](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/availability.repository.ts): `apps/api/src/repositories/availability.repository.ts`
- [Booking data](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/booking.repository.ts): `apps/api/src/repositories/booking.repository.ts`
- [Service data](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/service.repository.ts): `apps/api/src/repositories/service.repository.ts`
- [Professional data](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/professional-profile.repository.ts): `apps/api/src/repositories/professional-profile.repository.ts`
- [Customer data](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/repositories/customer.repository.ts): `apps/api/src/repositories/customer.repository.ts`
- **PostgreSQL**

### Identity and notifications

- [Authentication](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/auth.service.ts): `apps/api/src/services/auth.service.ts`
- [Booking notifications](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/booking-notification.service.ts): `apps/api/src/services/booking-notification.service.ts`
- [Email service](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/email.service.ts): `apps/api/src/services/email.service.ts`
- [Profile image hosting](https://github.com/joshuakibwage/booking-platform/blob/main/apps/api/src/services/cloudinary.service.ts): `apps/api/src/services/cloudinary.service.ts`

### Other components

- **Customer**
- **Professional**

## Connections

- Customer → Service discovery: browses (evidence: `README.md`)
- Customer → Booking scheduler: books through (evidence: `README.md`)
- Professional → Professional dashboard: manages business (evidence: `README.md`)
- Service discovery → API client: requests discovery
- Professional profiles → API client: requests profile
- Booking scheduler → API client: submits booking
- Customer bookings → API client: manages bookings
- Service management → API client: updates services
- Availability management → API client: updates hours
- API client → Express application: calls API (evidence: `README.md`)
- Express application → Booking routes: mounts routes (evidence: `apps/api/src/app.ts`)
- Express application → Professional routes: mounts routes (evidence: `apps/api/src/app.ts`)
- Booking routes → Booking handlers: dispatches (evidence: `apps/api/src/routes/booking.routes.ts`)
- Professional routes → Availability handler: dispatches (evidence: `apps/api/src/routes/availability.routes.ts`)
- Professional routes → Profile handlers: dispatches (evidence: `apps/api/src/routes/availability.routes.ts`)
- Professional routes → Service handlers: dispatches (evidence: `apps/api/src/routes/availability.routes.ts`)
- Booking handlers → Booking rules: invokes (evidence: `apps/api/src/controllers/booking.controller.ts`)
- Availability handler → Availability calculation: invokes (evidence: `apps/api/src/controllers/availability.controller.ts`)
- Booking rules → Availability calculation: checks slots (evidence: `apps/api/src/services/booking.service.ts`)
- Booking rules → Booking data: persists booking (evidence: `apps/api/src/services/booking.service.ts`)
- Booking rules → Service data: loads service (evidence: `apps/api/src/services/booking.service.ts`)
- Booking rules → Customer data: checks customer (evidence: `apps/api/src/services/booking.service.ts`)
- Booking rules → Booking notifications: notifies participants (evidence: `apps/api/src/services/booking.service.ts`)
- Availability calculation → Availability data: reads hours (evidence: `apps/api/src/services/availability.service.ts`)
- Availability calculation → Service data: reads service (evidence: `apps/api/src/services/availability.service.ts`)
- Profile handlers → Professional data: reads and writes (evidence: `apps/api/src/controllers/professional-profile.controller.ts`)
- Profile handlers → Profile image hosting: uploads image (evidence: `apps/api/src/controllers/professional-profile.controller.ts`)
- Service handlers → Service data: manages services (evidence: `apps/api/src/controllers/service.controller.ts`)
- Professional routes → Availability data: manages schedules
- Availability data → PostgreSQL: queries (evidence: `apps/api/src/repositories/availability.repository.ts`)
- Booking data → PostgreSQL: queries (evidence: `apps/api/src/repositories/booking.repository.ts`)
- Service data → PostgreSQL: queries (evidence: `apps/api/src/repositories/service.repository.ts`)
- Professional data → PostgreSQL: queries (evidence: `apps/api/src/repositories/professional-profile.repository.ts`)
- Customer data → PostgreSQL: queries (evidence: `apps/api/src/repositories/customer.repository.ts`)
- Booking notifications → Email service: sends email
- Express application → Authentication: registers auth routes
