# rhon-dev/clinisend-ph architecture

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

- Interactive diagram: https://gitdiagram.com/rhon-dev/clinisend-ph
- Repository: https://github.com/rhon-dev/clinisend-ph

## Overview

CliniSend PH is a planned, multi-tenant clinic appointment-reminder platform; the repository contains planning documents, not application code. The documented workflow is clinic staff managing appointments, scheduled or manual SMS reminders reaching patients, and patient replies updating appointment status. The graph also preserves the planned clinic approval, staff and patient access, reporting, audit, and platform oversight capabilities. Relationships reflect README statements only; no source excerpts were available, so this describes intended architecture rather than verified runtime behavior.

Main entry points: [`README.md`](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md) (Semaphore SMS)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Tenancy"]
  node_registration["Clinic registration<br/>[README.md]"]
  node_staff_access["Staff login<br/>[README.md]"]
  node_tenant_data[("Tenant database<br/>[README.md]")]
  node_patient_otp["Patient OTP access<br/>[README.md]"]
end

subgraph group_clinic["Clinic Operations"]
  node_appointments["Appointments<br/>[README.md]"]
  node_patient_records["Patient records<br/>[README.md]"]
  node_staff_management["Staff management<br/>[README.md]"]
  node_templates["Message templates<br/>[README.md]"]
  node_clinic_reports["Clinic reports<br/>[README.md]"]
end

subgraph group_messaging["SMS and Patient Portal"]
  node_reminder_scheduler["Reminder scheduler<br/>[README.md]"]
  node_sms_service["Semaphore SMS<br/>[README.md]"]
  node_reply_handler["Inbound reply handling<br/>[README.md]"]
  node_delivery_log[("Delivery and cost log<br/>[README.md]")]
  node_patient_portal["Patient appointment portal<br/>[README.md]"]
end

subgraph group_platform["Platform Oversight"]
  node_clinic_approval["Clinic approval<br/>[README.md]"]
  node_platform_dashboard["Platform dashboard<br/>[README.md]"]
  node_audit_log[("Audit log<br/>[README.md]")]
end

node_clinic_owner(("Clinic staff"))
node_patient(("Patient"))
node_owner(("Platform owner"))

node_clinic_owner -->|"registers clinic"| node_registration
node_registration -->|"awaits approval"| node_clinic_approval
node_owner -->|"approves clinics"| node_clinic_approval
node_clinic_owner -->|"signs in"| node_staff_access
node_staff_access -->|"authenticates through"| node_tenant_data
node_clinic_owner -->|"manages"| node_appointments
node_clinic_owner -->|"manages"| node_patient_records
node_clinic_owner -->|"manages"| node_staff_management
node_clinic_owner -->|"manages"| node_templates
node_clinic_owner -->|"views"| node_clinic_reports
node_appointments -->|"schedules reminders"| node_reminder_scheduler
node_reminder_scheduler -->|"sends reminders"| node_sms_service
node_clinic_owner -->|"sends manual SMS"| node_sms_service
node_sms_service -->|"delivers SMS"| node_patient
node_patient -->|"replies by SMS"| node_sms_service
node_sms_service -->|"forwards replies"| node_reply_handler
node_reply_handler -->|"updates status"| node_appointments
node_sms_service -->|"logs delivery and cost"| node_delivery_log
node_patient -->|"requests OTP"| node_patient_otp
node_patient_otp -->|"sends OTP"| node_sms_service
node_patient_otp -->|"grants portal access"| node_patient_portal
node_patient_portal -->|"views or confirms"| node_appointments
node_owner -->|"monitors platform"| node_platform_dashboard
node_platform_dashboard -->|"manages decisions"| node_clinic_approval
node_platform_dashboard -->|"views platform usage"| node_delivery_log
node_clinic_owner -->|"actions recorded"| node_audit_log
node_owner -->|"views platform audit"| node_audit_log
node_appointments -->|"isolated by tenant"| node_tenant_data
node_patient_records -->|"isolated by tenant"| node_tenant_data

click node_registration "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_staff_access "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_tenant_data "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_patient_otp "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_appointments "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_patient_records "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_staff_management "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_templates "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_clinic_reports "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_reminder_scheduler "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_sms_service "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_reply_handler "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_delivery_log "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_patient_portal "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_clinic_approval "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_platform_dashboard "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"
click node_audit_log "https://github.com/rhon-dev/clinisend-ph/blob/main/README.md"

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_registration,node_staff_access,node_tenant_data,node_patient_otp toneBlue
class node_appointments,node_patient_records,node_staff_management,node_templates,node_clinic_reports toneAmber
class node_reminder_scheduler,node_sms_service,node_reply_handler,node_delivery_log,node_patient_portal toneMint
class node_clinic_approval,node_platform_dashboard,node_audit_log toneRose
class node_clinic_owner,node_patient,node_owner toneIndigo
```

## Components

### Access and Tenancy

- [Clinic registration](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Staff login](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Tenant database](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Patient OTP access](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`

### Clinic Operations

- [Appointments](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Patient records](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Staff management](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Message templates](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Clinic reports](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`

### SMS and Patient Portal

- [Reminder scheduler](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Semaphore SMS](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Inbound reply handling](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Delivery and cost log](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Patient appointment portal](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`

### Platform Oversight

- [Clinic approval](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Platform dashboard](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`
- [Audit log](https://github.com/rhon-dev/clinisend-ph/blob/main/README.md): `README.md`

### Other components

- **Clinic staff**
- **Patient**
- **Platform owner**

## Connections

- Clinic staff → Clinic registration: registers clinic (evidence: `README.md`)
- Clinic registration → Clinic approval: awaits approval (evidence: `README.md`)
- Platform owner → Clinic approval: approves clinics (evidence: `README.md`)
- Clinic staff → Staff login: signs in (evidence: `README.md`)
- Staff login → Tenant database: authenticates through (evidence: `README.md`)
- Clinic staff → Appointments: manages (evidence: `README.md`)
- Clinic staff → Patient records: manages (evidence: `README.md`)
- Clinic staff → Staff management: manages (evidence: `README.md`)
- Clinic staff → Message templates: manages (evidence: `README.md`)
- Clinic staff → Clinic reports: views (evidence: `README.md`)
- Appointments → Reminder scheduler: schedules reminders (evidence: `README.md`)
- Reminder scheduler → Semaphore SMS: sends reminders (evidence: `README.md`)
- Clinic staff → Semaphore SMS: sends manual SMS (evidence: `README.md`)
- Semaphore SMS → Patient: delivers SMS (evidence: `README.md`)
- Patient → Semaphore SMS: replies by SMS (evidence: `README.md`)
- Semaphore SMS → Inbound reply handling: forwards replies (evidence: `README.md`)
- Inbound reply handling → Appointments: updates status (evidence: `README.md`)
- Semaphore SMS → Delivery and cost log: logs delivery and cost (evidence: `README.md`)
- Patient → Patient OTP access: requests OTP (evidence: `README.md`)
- Patient OTP access → Semaphore SMS: sends OTP (evidence: `README.md`)
- Patient OTP access → Patient appointment portal: grants portal access (evidence: `README.md`)
- Patient appointment portal → Appointments: views or confirms (evidence: `README.md`)
- Platform owner → Platform dashboard: monitors platform (evidence: `README.md`)
- Platform dashboard → Clinic approval: manages decisions (evidence: `README.md`)
- Platform dashboard → Delivery and cost log: views platform usage (evidence: `README.md`)
- Clinic staff → Audit log: actions recorded (evidence: `README.md`)
- Platform owner → Audit log: views platform audit (evidence: `README.md`)
- Appointments → Tenant database: isolated by tenant (evidence: `README.md`)
- Patient records → Tenant database: isolated by tenant (evidence: `README.md`)
