# juanlotero2552/booking-therapy architecture

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

- Interactive diagram: https://gitdiagram.com/juanlotero2552/booking-therapy
- Repository: https://github.com/juanlotero2552/booking-therapy

## Overview

Vis Vitalis connects therapy clients with independent therapists through discovery, appointment scheduling and booking, while supporting therapist profile and schedule management. The React app routes clients and therapists into these journeys; Django provides the principal API domains, with separate Flask agenda and payment services also present. The booking-to-payment call is directly evidenced in the agenda service. The README documents therapist, appointment and product APIs; product handling is represented by the available booking adapter, but its runtime wiring is not established by the sampled source.

Main entry points: [`frontend/src/app/routes.tsx`](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/routes.tsx) (Page routing), [`frontend/src/app/App.tsx`](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/App.tsx) (React app), [`payments-service/application/services.py`](https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/application/services.py) (Order processing), [`backend/src/auth_supabase/api/views.py`](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/auth_supabase/api/views.py) (Auth API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["React app<br/>[App.tsx]"]
  node_router["Page routing<br/>[routes.tsx]"]
  node_discovery["Therapist discovery"]
  node_profile["Therapist profile"]
  node_booking["Booking flow<br/>[BookingFlow.tsx]"]
  node_client_dashboard["Client dashboard"]
  node_therapist_schedule["Therapist schedule"]
  node_therapist_sessions["Therapist sessions"]
end

subgraph group_identity["Identity"]
  node_frontend_auth["Frontend auth<br/>[AuthContext.tsx]"]
  node_supabase["Supabase auth<br/>[supabase_client.py]"]
  node_auth_api["Auth API<br/>[views.py]"]
  node_profile_store[("Profile persistence")]
end

subgraph group_therapy["Therapy operations"]
  node_agenda_api["Agenda API<br/>[views.py]"]
  node_agenda_service["Booking services<br/>[services.py]"]
  node_agenda_store[("Agenda persistence<br/>[repositories.py]")]
  node_agenda_flask["Agenda service<br/>[routes.py]"]
  node_agenda_flask_booking["Slot and booking logic<br/>[services.py]"]
end

subgraph group_commerce["Payments and products"]
  node_payment_api["Payment API<br/>[routes.py]"]
  node_payment_service["Order processing<br/>[services.py]"]
  node_payment_processor["Payment processor<br/>[processors.py]"]
  node_order_store[("Order persistence<br/>[repositories.py]")]
  node_django_payments["Django payments<br/>[services.py]"]
  node_product_adapter["Product adapter<br/>[product_adapter.py]"]
end

node_client(("Client"))
node_therapist(("Therapist"))

node_client -->|"uses"| node_app
node_therapist -->|"uses"| node_app
node_app -->|"renders"| node_router
node_router -->|"routes to"| node_discovery
node_router -->|"routes to"| node_profile
node_router -->|"routes to"| node_booking
node_router -->|"routes to"| node_client_dashboard
node_router -->|"routes to"| node_therapist_schedule
node_router -->|"routes to"| node_therapist_sessions
node_app -->|"provides auth"| node_frontend_auth
node_frontend_auth -.->|"authenticates via"| node_supabase
node_auth_api -->|"uses provider"| node_supabase
node_auth_api -->|"reads and writes"| node_profile_store
node_agenda_api -->|"invokes"| node_agenda_service
node_agenda_service -->|"persists appointments"| node_agenda_store
node_agenda_api -->|"queries agenda"| node_agenda_store
node_agenda_flask -->|"invokes booking"| node_agenda_flask_booking
node_agenda_flask_booking -->|"posts payment"| node_payment_api
node_payment_api -->|"invokes"| node_payment_service
node_payment_service -->|"charges through"| node_payment_processor
node_payment_service -->|"saves orders"| node_order_store
node_django_payments -.->|"uses adapter"| node_product_adapter

click node_app "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/App.tsx"
click node_router "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/routes.tsx"
click node_discovery "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistSearch.tsx"
click node_profile "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistProfile.tsx"
click node_booking "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/BookingFlow.tsx"
click node_client_dashboard "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/ClientDashboard.tsx"
click node_therapist_schedule "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistSchedule.tsx"
click node_therapist_sessions "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistSessions.tsx"
click node_frontend_auth "https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/context/AuthContext.tsx"
click node_supabase "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/auth_supabase/infrastructure/supabase_client.py"
click node_auth_api "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/auth_supabase/api/views.py"
click node_profile_store "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/auth_supabase/infrastructure/django_repositories.py"
click node_agenda_api "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/agenda/api/views.py"
click node_agenda_service "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/agenda/application/services.py"
click node_agenda_store "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/agenda/infrastructure/repositories.py"
click node_agenda_flask "https://github.com/juanlotero2552/booking-therapy/blob/main/agenda-service/api/routes.py"
click node_agenda_flask_booking "https://github.com/juanlotero2552/booking-therapy/blob/main/agenda-service/application/services.py"
click node_payment_api "https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/api/routes.py"
click node_payment_service "https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/application/services.py"
click node_payment_processor "https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/infrastructure/processors.py"
click node_order_store "https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/infrastructure/persistence/repositories.py"
click node_django_payments "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/payments/application/services.py"
click node_product_adapter "https://github.com/juanlotero2552/booking-therapy/blob/main/backend/booking/adapters/product_adapter.py"

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_app,node_router,node_discovery,node_profile,node_booking,node_client_dashboard,node_therapist_schedule,node_therapist_sessions,node_client toneBlue
class node_frontend_auth,node_supabase,node_auth_api,node_profile_store toneAmber
class node_agenda_api,node_agenda_service,node_agenda_store,node_agenda_flask,node_agenda_flask_booking,node_therapist toneMint
class node_payment_api,node_payment_service,node_payment_processor,node_order_store,node_django_payments,node_product_adapter toneRose
```

## Components

### Web experience

- [React app](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Page routing](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/routes.tsx): `frontend/src/app/routes.tsx`
- [Therapist discovery](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistSearch.tsx): `frontend/src/app/pages/TherapistSearch.tsx`
- [Therapist profile](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistProfile.tsx): `frontend/src/app/pages/TherapistProfile.tsx`
- [Booking flow](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/BookingFlow.tsx): `frontend/src/app/pages/BookingFlow.tsx`
- [Client dashboard](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/ClientDashboard.tsx): `frontend/src/app/pages/ClientDashboard.tsx`
- [Therapist schedule](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistSchedule.tsx): `frontend/src/app/pages/TherapistSchedule.tsx`
- [Therapist sessions](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/pages/TherapistSessions.tsx): `frontend/src/app/pages/TherapistSessions.tsx`

### Identity

- [Frontend auth](https://github.com/juanlotero2552/booking-therapy/blob/main/frontend/src/app/context/AuthContext.tsx): `frontend/src/app/context/AuthContext.tsx`
- [Supabase auth](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/auth_supabase/infrastructure/supabase_client.py): `backend/src/auth_supabase/infrastructure/supabase_client.py`
- [Auth API](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/auth_supabase/api/views.py): `backend/src/auth_supabase/api/views.py`
- [Profile persistence](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/auth_supabase/infrastructure/django_repositories.py): `backend/src/auth_supabase/infrastructure/django_repositories.py`

### Therapy operations

- [Agenda API](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/agenda/api/views.py): `backend/src/agenda/api/views.py`
- [Booking services](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/agenda/application/services.py): `backend/src/agenda/application/services.py`
- [Agenda persistence](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/agenda/infrastructure/repositories.py): `backend/src/agenda/infrastructure/repositories.py`
- [Agenda service](https://github.com/juanlotero2552/booking-therapy/blob/main/agenda-service/api/routes.py): `agenda-service/api/routes.py`
- [Slot and booking logic](https://github.com/juanlotero2552/booking-therapy/blob/main/agenda-service/application/services.py): `agenda-service/application/services.py`

### Payments and products

- [Payment API](https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/api/routes.py): `payments-service/api/routes.py`
- [Order processing](https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/application/services.py): `payments-service/application/services.py`
- [Payment processor](https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/infrastructure/processors.py): `payments-service/infrastructure/processors.py`
- [Order persistence](https://github.com/juanlotero2552/booking-therapy/blob/main/payments-service/infrastructure/persistence/repositories.py): `payments-service/infrastructure/persistence/repositories.py`
- [Django payments](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/src/payments/application/services.py): `backend/src/payments/application/services.py`
- [Product adapter](https://github.com/juanlotero2552/booking-therapy/blob/main/backend/booking/adapters/product_adapter.py): `backend/booking/adapters/product_adapter.py`

### Other components

- **Client**
- **Therapist**

## Connections

- Client → React app: uses
- Therapist → React app: uses
- React app → Page routing: renders
- Page routing → Therapist discovery: routes to
- Page routing → Therapist profile: routes to
- Page routing → Booking flow: routes to
- Page routing → Client dashboard: routes to
- Page routing → Therapist schedule: routes to
- Page routing → Therapist sessions: routes to
- React app → Frontend auth: provides auth
- Frontend auth → Supabase auth: authenticates via
- Auth API → Supabase auth: uses provider
- Auth API → Profile persistence: reads and writes
- Agenda API → Booking services: invokes
- Booking services → Agenda persistence: persists appointments
- Agenda API → Agenda persistence: queries agenda
- Agenda service → Slot and booking logic: invokes booking
- Slot and booking logic → Payment API: posts payment
- Payment API → Order processing: invokes
- Order processing → Payment processor: charges through
- Order processing → Order persistence: saves orders
- Django payments → Product adapter: uses adapter
