# the-smart-booking/thesmartbooking architecture

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

- Interactive diagram: https://gitdiagram.com/the-smart-booking/thesmartbooking
- Repository: https://github.com/the-smart-booking/thesmartbooking

## Overview

Smart Booking is an early-stage multi-tenant appointment-booking product. Its documented target workflow is booking and managing appointments, isolating each organization’s data, and sending Telegram confirmations and reminders; however, the checked-in runtime is still a starter shell: the Go command prints “Hello World,” and the React app renders the Vite template. The README describes planned scheduling, authentication, cancellation, service configuration, and notification capabilities, but their implementation files are not present in the tree. The graph separates implemented behavior from that documented roadmap; roadmap nodes have no source path, and no runtime links to them are inferred.

Main entry points: [`web/src/main.tsx`](https://github.com/the-smart-booking/thesmartbooking/blob/main/web/src/main.tsx) (React entry), [`web/src/App.tsx`](https://github.com/the-smart-booking/thesmartbooking/blob/main/web/src/App.tsx) (Starter screen), [`cmd/api/main.go`](https://github.com/the-smart-booking/thesmartbooking/blob/main/cmd/api/main.go) (Hello World command)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web starter"]
  node_webentry["React entry<br/>[main.tsx]"]
  node_webapp["Starter screen<br/>[App.tsx]"]
end

subgraph group_api["API starter"]
  node_apihello["Hello World command<br/>[main.go]"]
end

subgraph group_data["Tenant data foundation"]
  node_tenantmigration[("Tenant schema")]
end

subgraph group_roadmap["Documented product roadmap"]
  node_scheduling["Appointment booking"]
  node_tenantisolation["Tenant isolation"]
  node_auth["Signup and login"]
  node_services["Services and slots"]
  node_manage["Cancel and reschedule"]
  node_notifications["Telegram notices"]
  node_reminders["Automatic reminders"]
end

node_browser(("Browser user"))
node_apiuser(("API process launcher"))
node_telegram["Telegram Bot API"]

node_browser -->|"opens app"| node_webentry
node_webentry -->|"renders"| node_webapp
node_apiuser -->|"runs command"| node_apihello
node_scheduling -.->|"requires isolation"| node_tenantisolation
node_scheduling -.->|"later adds"| node_auth
node_scheduling -.->|"later configures"| node_services
node_scheduling -.->|"later supports"| node_manage
node_scheduling -.->|"triggers"| node_notifications
node_notifications -.->|"uses"| node_telegram
node_notifications -.->|"later schedules"| node_reminders

click node_webentry "https://github.com/the-smart-booking/thesmartbooking/blob/main/web/src/main.tsx"
click node_webapp "https://github.com/the-smart-booking/thesmartbooking/blob/main/web/src/App.tsx"
click node_apihello "https://github.com/the-smart-booking/thesmartbooking/blob/main/cmd/api/main.go"
click node_tenantmigration "https://github.com/the-smart-booking/thesmartbooking/blob/main/db/migrations/00002_criar_tenants.sql"

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_webentry,node_webapp,node_browser toneBlue
class node_apihello toneAmber
class node_tenantmigration,node_apiuser,node_telegram toneMint
class node_scheduling,node_tenantisolation,node_auth,node_services,node_manage,node_notifications,node_reminders toneRose
```

## Components

### Web starter

- [React entry](https://github.com/the-smart-booking/thesmartbooking/blob/main/web/src/main.tsx): `web/src/main.tsx`
- [Starter screen](https://github.com/the-smart-booking/thesmartbooking/blob/main/web/src/App.tsx): `web/src/App.tsx`

### API starter

- [Hello World command](https://github.com/the-smart-booking/thesmartbooking/blob/main/cmd/api/main.go): `cmd/api/main.go`

### Tenant data foundation

- [Tenant schema](https://github.com/the-smart-booking/thesmartbooking/blob/main/db/migrations/00002_criar_tenants.sql): `db/migrations/00002_criar_tenants.sql`

### Documented product roadmap

- **Appointment booking**
- **Tenant isolation**
- **Signup and login**
- **Services and slots**
- **Cancel and reschedule**
- **Telegram notices**
- **Automatic reminders**

### Other components

- **Browser user**
- **API process launcher**
- **Telegram Bot API**

## Connections

- Browser user → React entry: opens app (evidence: `README.md`)
- React entry → Starter screen: renders (evidence: `web/src/main.tsx`)
- API process launcher → Hello World command: runs command (evidence: `cmd/api/main.go`)
- Appointment booking → Tenant isolation: requires isolation (evidence: `README.md`)
- Appointment booking → Signup and login: later adds (evidence: `README.md`)
- Appointment booking → Services and slots: later configures (evidence: `README.md`)
- Appointment booking → Cancel and reschedule: later supports (evidence: `README.md`)
- Appointment booking → Telegram notices: triggers (evidence: `README.md`)
- Telegram notices → Telegram Bot API: uses (evidence: `README.md`)
- Telegram notices → Automatic reminders: later schedules (evidence: `README.md`)
