# ryhem-barhoumy/hello-doc architecture

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

- Interactive diagram: https://gitdiagram.com/ryhem-barhoumy/hello-doc
- Repository: https://github.com/ryhem-barhoumy/hello-doc

## Overview

Hello Doc is a web-based patient and clinician care platform backed by Spring Boot and MySQL; the README also describes a limited Android account milestone. The main web journey runs from registration/sign-in through doctor discovery, availability and appointment booking, then appointment care, clinical records, and follow-up reviews. Doctors and administrators additionally manage profiles, applications, scheduling, and operations; teleconsultation is a separate supported capability. The graph combines documented product scope with sampled routes and services; unsampled subsystem links are omitted rather than inferred.

Main entry points: [`frontend/src/app/app.routes.ts`](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/app.routes.ts) (Angular application), [`frontend/src/app/core/services/api.service.ts`](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/core/services/api.service.ts) (API client), [`frontend/src/app/features/appointments/appointment-detail.component.ts`](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/appointments/appointment-detail.component.ts) (Appointment workspace), [`frontend/src/app/features/patient/booking.component.ts`](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/patient/booking.component.ts) (Booking workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_webapp["Angular application<br/>[app.routes.ts]"]
  node_api["API client<br/>[api.service.ts]"]
  node_authui["Registration and login"]
  node_directory["Doctor directory"]
  node_bookingui["Booking workspace"]
  node_appointmentui["Appointment workspace"]
  node_teleui["Teleconsultation UI"]
  node_adminui["Admin workspace"]
end

subgraph group_identity["Identity and profiles"]
  node_account["Accounts and sessions"]
  node_authcontroller["Authentication API"]
  node_userstore[("User accounts<br/>[UserAccount.java]")]
  node_doctorprofile["Doctor profiles"]
  node_doctorstore[("Doctor and patient records<br/>[Doctor.java]")]
end

subgraph group_care["Scheduling and care"]
  node_discovery["Discovery and availability"]
  node_appointments[("Appointment management<br/>[Appointment.java]")]
  node_appointmentrepo["Appointment queries"]
end

subgraph group_operations["Clinical operations"]
  node_clinical["Clinical records and notes"]
  node_notifications["Notifications"]
  node_reviews["Patient reviews<br/>[ReviewService.java]"]
  node_doctorapproval["Doctor approval"]
  node_adminops["Administrative operations"]
  node_teleconsult["Teleconsultation service"]
end

subgraph group_platform["Backend platform"]
  node_mysql[("MySQL")]
  node_signal["WebSocket signaling"]
end

node_patient(("Patient"))
node_doctor(("Doctor"))
node_admin(("Administrator"))

node_patient -->|"uses"| node_webapp
node_doctor -->|"uses"| node_webapp
node_admin -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_authui
node_webapp -->|"routes to"| node_directory
node_webapp -->|"routes to"| node_bookingui
node_webapp -->|"routes to"| node_appointmentui
node_webapp -->|"routes to"| node_teleui
node_webapp -->|"routes to"| node_adminui
node_authui -.->|"calls"| node_api
node_directory -.->|"calls"| node_api
node_bookingui -.->|"calls"| node_api
node_appointmentui -.->|"calls"| node_api
node_teleui -.->|"calls"| node_api
node_adminui -.->|"calls"| node_api
node_api -.->|"HTTP requests"| node_authcontroller
node_authcontroller -->|"delegates"| node_account
node_account -.->|"reads and writes"| node_userstore
node_authcontroller -->|"uses"| node_userstore
node_doctorprofile -.->|"reads and writes"| node_doctorstore
node_doctorprofile -->|"checks bookings"| node_appointmentrepo
node_directory -.->|"requests search"| node_discovery
node_bookingui -.->|"requests slots"| node_discovery
node_bookingui -.->|"submits booking"| node_appointments
node_appointmentui -.->|"manages status"| node_appointments
node_appointments -.->|"queries"| node_appointmentrepo
node_appointmentui -.->|"opens notes"| node_clinical
node_appointmentui -.->|"submits review"| node_reviews
node_reviews -->|"creates alert"| node_notifications
node_adminui -.->|"reviews application"| node_doctorapproval
node_adminui -.->|"manages operations"| node_adminops
node_teleui -.->|"joins session"| node_teleconsult
node_signal -->|"dispatches signaling"| node_teleconsult
node_userstore -.->|"persists"| node_mysql
node_doctorstore -.->|"persists"| node_mysql
node_appointments -.->|"persists"| node_mysql

click node_webapp "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/app.routes.ts"
click node_api "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/core/services/api.service.ts"
click node_authui "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/auth/registration.component.ts"
click node_directory "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/public/doctor-directory.component.ts"
click node_bookingui "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/patient/booking.component.ts"
click node_appointmentui "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/appointments/appointment-detail.component.ts"
click node_teleui "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/appointments/teleconsultation.component.ts"
click node_adminui "https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/admin/admin-doctor-detail.component.ts"
click node_account "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/AccountService.java"
click node_authcontroller "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/controller/AuthController.java"
click node_userstore "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/entity/UserAccount.java"
click node_doctorprofile "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/DoctorProfileService.java"
click node_doctorstore "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/entity/Doctor.java"
click node_discovery "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/DoctorProfileService.java"
click node_appointments "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/entity/Appointment.java"
click node_appointmentrepo "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/repository/AppointmentRepository.java"
click node_clinical "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/ConsultationService.java"
click node_notifications "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/NotificationService.java"
click node_reviews "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/ReviewService.java"
click node_doctorapproval "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/DoctorApprovalService.java"
click node_adminops "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/AdminOperationsService.java"
click node_teleconsult "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/TeleconsultationService.java"
click node_signal "https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/web/TeleconsultationSignalHandler.java"

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_webapp,node_api,node_authui,node_directory,node_bookingui,node_appointmentui,node_teleui,node_adminui toneBlue
class node_account,node_authcontroller,node_userstore,node_doctorprofile,node_doctorstore toneAmber
class node_discovery,node_appointments,node_appointmentrepo toneMint
class node_clinical,node_notifications,node_reviews,node_doctorapproval,node_adminops,node_teleconsult toneRose
class node_mysql,node_signal,node_patient,node_doctor,node_admin toneIndigo
```

## Components

### Web experience

- [Angular application](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [API client](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/core/services/api.service.ts): `frontend/src/app/core/services/api.service.ts`
- [Registration and login](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/auth/registration.component.ts): `frontend/src/app/features/auth/registration.component.ts`
- [Doctor directory](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/public/doctor-directory.component.ts): `frontend/src/app/features/public/doctor-directory.component.ts`
- [Booking workspace](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/patient/booking.component.ts): `frontend/src/app/features/patient/booking.component.ts`
- [Appointment workspace](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/appointments/appointment-detail.component.ts): `frontend/src/app/features/appointments/appointment-detail.component.ts`
- [Teleconsultation UI](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/appointments/teleconsultation.component.ts): `frontend/src/app/features/appointments/teleconsultation.component.ts`
- [Admin workspace](https://github.com/ryhem-barhoumy/hello-doc/blob/main/frontend/src/app/features/admin/admin-doctor-detail.component.ts): `frontend/src/app/features/admin/admin-doctor-detail.component.ts`

### Identity and profiles

- [Accounts and sessions](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/AccountService.java): `backend/src/main/java/com/hellodoc/service/AccountService.java`
- [Authentication API](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/controller/AuthController.java): `backend/src/main/java/com/hellodoc/controller/AuthController.java`
- [User accounts](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/entity/UserAccount.java): `backend/src/main/java/com/hellodoc/entity/UserAccount.java`
- [Doctor profiles](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/DoctorProfileService.java): `backend/src/main/java/com/hellodoc/service/DoctorProfileService.java`
- [Doctor and patient records](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/entity/Doctor.java): `backend/src/main/java/com/hellodoc/entity/Doctor.java`

### Scheduling and care

- [Discovery and availability](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/DoctorProfileService.java): `backend/src/main/java/com/hellodoc/service/DoctorProfileService.java`
- [Appointment management](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/entity/Appointment.java): `backend/src/main/java/com/hellodoc/entity/Appointment.java`
- [Appointment queries](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/repository/AppointmentRepository.java): `backend/src/main/java/com/hellodoc/repository/AppointmentRepository.java`

### Clinical operations

- [Clinical records and notes](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/ConsultationService.java): `backend/src/main/java/com/hellodoc/service/ConsultationService.java`
- [Notifications](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/NotificationService.java): `backend/src/main/java/com/hellodoc/service/NotificationService.java`
- [Patient reviews](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/ReviewService.java): `backend/src/main/java/com/hellodoc/service/ReviewService.java`
- [Doctor approval](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/DoctorApprovalService.java): `backend/src/main/java/com/hellodoc/service/DoctorApprovalService.java`
- [Administrative operations](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/AdminOperationsService.java): `backend/src/main/java/com/hellodoc/service/AdminOperationsService.java`
- [Teleconsultation service](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/service/TeleconsultationService.java): `backend/src/main/java/com/hellodoc/service/TeleconsultationService.java`

### Backend platform

- **MySQL**
- [WebSocket signaling](https://github.com/ryhem-barhoumy/hello-doc/blob/main/backend/src/main/java/com/hellodoc/web/TeleconsultationSignalHandler.java): `backend/src/main/java/com/hellodoc/web/TeleconsultationSignalHandler.java`

### Other components

- **Patient**
- **Doctor**
- **Administrator**

## Connections

- Patient → Angular application: uses (evidence: `frontend/src/app/app.routes.ts`)
- Doctor → Angular application: uses (evidence: `frontend/src/app/app.routes.ts`)
- Administrator → Angular application: uses (evidence: `frontend/src/app/app.routes.ts`)
- Angular application → Registration and login: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Angular application → Doctor directory: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Angular application → Booking workspace: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Angular application → Appointment workspace: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Angular application → Teleconsultation UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Angular application → Admin workspace: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Registration and login → API client: calls
- Doctor directory → API client: calls
- Booking workspace → API client: calls
- Appointment workspace → API client: calls
- Teleconsultation UI → API client: calls
- Admin workspace → API client: calls
- API client → Authentication API: HTTP requests
- Authentication API → Accounts and sessions: delegates (evidence: `backend/src/main/java/com/hellodoc/controller/AuthController.java`)
- Accounts and sessions → User accounts: reads and writes
- Authentication API → User accounts: uses (evidence: `backend/src/main/java/com/hellodoc/controller/AuthController.java`)
- Doctor profiles → Doctor and patient records: reads and writes (evidence: `backend/src/main/java/com/hellodoc/service/DoctorProfileService.java`)
- Doctor profiles → Appointment queries: checks bookings (evidence: `backend/src/main/java/com/hellodoc/service/DoctorProfileService.java`)
- Doctor directory → Discovery and availability: requests search
- Booking workspace → Discovery and availability: requests slots
- Booking workspace → Appointment management: submits booking
- Appointment workspace → Appointment management: manages status
- Appointment management → Appointment queries: queries (evidence: `backend/src/main/java/com/hellodoc/repository/AppointmentRepository.java`)
- Appointment workspace → Clinical records and notes: opens notes
- Appointment workspace → Patient reviews: submits review
- Patient reviews → Notifications: creates alert (evidence: `backend/src/main/java/com/hellodoc/service/ReviewService.java`)
- Admin workspace → Doctor approval: reviews application
- Admin workspace → Administrative operations: manages operations
- Teleconsultation UI → Teleconsultation service: joins session
- WebSocket signaling → Teleconsultation service: dispatches signaling (evidence: `backend/src/main/java/com/hellodoc/web/TeleconsultationSignalHandler.java`)
- User accounts → MySQL: persists
- Doctor and patient records → MySQL: persists
- Appointment management → MySQL: persists
