# aravasamarth-hub/ss-dental-web architecture

> Architecture diagram of the GitHub repository aravasamarth-hub/ss-dental-web, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aravasamarth-hub/ss-dental-web
- Repository: https://github.com/aravasamarth-hub/ss-dental-web

## Overview

SS Dental Care is a clinic website with informational and treatment pages plus appointment booking. Visitors enter through the React app’s routes, browse clinic and service information, or submit a booking; the booking page also triggers notifications and may save booking data. The API handles payment verification and booking endpoints, using Supabase and email notifications, with a watcher for background work. Source excerpts support the app routes and parts of booking and API behavior; many page and API internals were not sampled, so uncertain links are omitted.

Main entry points: [`horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx`](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx) (App router), [`horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/server.js`](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/server.js) (Booking API), [`horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/services`](https://github.com/aravasamarth-hub/ss-dental-web/tree/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/services) (Service pages), [`horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/BookingsPage.jsx`](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/BookingsPage.jsx) (Booking form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Clinic website"]
  node_app["App router<br/>[App.jsx]"]
  node_clinicinfo["Clinic pages"]
  node_services["Service pages"]
  node_servicecatalog["Service catalog<br/>[servicesData.js]"]
  node_service_layout["Service detail layout"]
  node_version["Version checker<br/>[useVersionCheck.js]"]
end

subgraph group_booking["Appointment booking"]
  node_bookings["Booking form<br/>[BookingsPage.jsx]"]
  node_web_notify["Booking notifier"]
end

subgraph group_api["Booking API"]
  node_api_server["Booking API<br/>[server.js]"]
end

subgraph group_ops["Persistence and notifications"]
  node_db["DB helpers<br/>[db.js]"]
  node_email["Email delivery<br/>[notifications.js]"]
  node_watcher["Background watcher<br/>[watcher.js]"]
end

node_visitor(("Visitor"))
node_supabase[("Supabase")]
node_razorpay["Razorpay"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_clinicinfo
node_app -->|"routes to"| node_services
node_app -->|"routes to"| node_bookings
node_app -->|"checks version"| node_version
node_services -.->|"renders"| node_service_layout
node_services -.->|"uses data"| node_servicecatalog
node_bookings -->|"sends notice"| node_web_notify
node_web_notify -.->|"submits notice"| node_api_server
node_bookings -.->|"writes booking"| node_supabase
node_api_server -->|"uses helpers"| node_db
node_api_server -->|"sends notice"| node_email
node_api_server -.->|"creates orders"| node_razorpay
node_db -.->|"reads and writes"| node_supabase
node_watcher -->|"uses helpers"| node_db
node_watcher -->|"uses notifications"| node_email

click node_app "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx"
click node_clinicinfo "https://github.com/aravasamarth-hub/ss-dental-web/tree/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages"
click node_services "https://github.com/aravasamarth-hub/ss-dental-web/tree/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/services"
click node_servicecatalog "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/data/servicesData.js"
click node_service_layout "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/components/ServiceDetailLayout.jsx"
click node_bookings "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/BookingsPage.jsx"
click node_web_notify "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/lib/sendNotification.js"
click node_api_server "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/server.js"
click node_db "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/db.js"
click node_email "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/notifications.js"
click node_watcher "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/watcher.js"
click node_version "https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/hooks/useVersionCheck.js"

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_clinicinfo,node_services,node_servicecatalog,node_service_layout,node_version toneBlue
class node_bookings,node_web_notify,node_supabase toneAmber
class node_api_server toneMint
class node_db,node_email,node_watcher toneRose
class node_visitor,node_razorpay toneIndigo
```

## Components

### Clinic website

- [App router](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx`
- [Clinic pages](https://github.com/aravasamarth-hub/ss-dental-web/tree/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages`
- [Service pages](https://github.com/aravasamarth-hub/ss-dental-web/tree/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/services): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/services`
- [Service catalog](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/data/servicesData.js): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/data/servicesData.js`
- [Service detail layout](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/components/ServiceDetailLayout.jsx): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/components/ServiceDetailLayout.jsx`
- [Version checker](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/hooks/useVersionCheck.js): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/hooks/useVersionCheck.js`

### Appointment booking

- [Booking form](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/BookingsPage.jsx): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/BookingsPage.jsx`
- [Booking notifier](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/lib/sendNotification.js): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/lib/sendNotification.js`

### Booking API

- [Booking API](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/server.js): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/server.js`

### Persistence and notifications

- [DB helpers](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/db.js): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/db.js`
- [Email delivery](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/notifications.js): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/notifications.js`
- [Background watcher](https://github.com/aravasamarth-hub/ss-dental-web/blob/main/horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/watcher.js): `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/watcher.js`

### Other components

- **Visitor**
- **Supabase**
- **Razorpay**

## Connections

- Visitor → App router: opens (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx`)
- App router → Clinic pages: routes to (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx`)
- App router → Service pages: routes to (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx`)
- App router → Booking form: routes to (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx`)
- App router → Version checker: checks version (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/App.jsx`)
- Service pages → Service detail layout: renders
- Service pages → Service catalog: uses data
- Booking form → Booking notifier: sends notice (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/web/src/pages/BookingsPage.jsx`)
- Booking notifier → Booking API: submits notice
- Booking form → Supabase: writes booking
- Booking API → DB helpers: uses helpers (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/server.js`)
- Booking API → Email delivery: sends notice (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/server.js`)
- Booking API → Razorpay: creates orders
- DB helpers → Supabase: reads and writes
- Background watcher → DB helpers: uses helpers (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/watcher.js`)
- Background watcher → Email delivery: uses notifications (evidence: `horizons-export-dc22980f-a9df-4839-96b8-627d622e799c/apps/api/watcher.js`)
