# bevvee/shifatech architecture

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

- Interactive diagram: https://gitdiagram.com/bevvee/shifatech
- Repository: https://github.com/bevvee/shifatech

## Overview

ShifaTech is a healthcare-management platform: staff and patients use an Angular portal for identity, patient records, appointments, staffing and clinical workflows. Its backend separates authentication, patient care, doctors, nurses and appointments into services; additional body-map and wound-image services support clinical assessment. The README documents Nginx routing and per-service MySQL databases. Source excerpts show selected service calls and wound-analysis internals; other service relationships are not inferred where implementation was unsampled.

Main entry points: [`Backend/wound-image-service/app/main.py`](https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/main.py) (Wound analysis API), [`Backend/patient-service/src/main/java/com/shifatech/patient_service/service/PatientService.java`](https://github.com/bevvee/shifatech/blob/main/Backend/patient-service/src/main/java/com/shifatech/patient_service/service/PatientService.java) (Patient management), [`Backend/auth-service/src/main/java/com/shifatech/authservice/controller/AuthController.java`](https://github.com/bevvee/shifatech/blob/main/Backend/auth-service/src/main/java/com/shifatech/authservice/controller/AuthController.java) (Authentication API), [`Frontend/Web/src/app/app.routes.ts`](https://github.com/bevvee/shifatech/blob/main/Frontend/Web/src/app/app.routes.ts) (Angular application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Web portal"]
  node_web["Angular application<br/>[app.routes.ts]"]
end

subgraph group_identity["Identity"]
  node_auth["Authentication API"]
  node_auth_logic["Auth service logic<br/>[AuthService.java]"]
  node_user_store[("User records<br/>[User.java]")]
end

subgraph group_care["Patient care"]
  node_patient["Patient management"]
  node_visit["Visits and records<br/>[VisiteService.java]"]
end

subgraph group_operations["Clinical operations"]
  node_doctor["Doctor management<br/>[DoctorService.java]"]
  node_planning["Doctor planning"]
  node_nurse["Nurse management"]
  node_appointments["Appointments"]
end

subgraph group_assessment["Clinical assessment"]
  node_bodymap["Body map"]
  node_bodymap_logic["Body map service<br/>[BodyMapService.php]"]
  node_wound_api["Wound analysis API<br/>[main.py]"]
  node_inference["Image inference<br/>[inference.py]"]
  node_diagnostic["Medical diagnostic"]
  node_object_store[("Image object storage<br/>[minio_client.py]")]
end

node_user(("Patient or staff"))
node_service_databases[("Service MySQL databases")]
node_gateway["Nginx API gateway"]

node_user -->|"uses"| node_web
node_web -.->|"requests APIs"| node_gateway
node_gateway -->|"routes /auth"| node_auth
node_gateway -->|"routes /patient"| node_patient
node_gateway -->|"routes /doctor"| node_doctor
node_gateway -->|"routes /infirmier"| node_nurse
node_gateway -->|"routes /rdv"| node_appointments
node_auth -->|"delegates to"| node_auth_logic
node_auth_logic -->|"manages users"| node_user_store
node_patient -->|"registers users"| node_auth
node_patient -.->|"persists patient data"| node_service_databases
node_visit -.->|"persists visit data"| node_service_databases
node_doctor -.->|"persists doctor data"| node_service_databases
node_planning -.->|"persists planning"| node_service_databases
node_nurse -.->|"persists nurse data"| node_service_databases
node_appointments -.->|"persists appointments"| node_service_databases
node_bodymap -->|"delegates to"| node_bodymap_logic
node_wound_api -->|"runs analysis"| node_inference
node_wound_api -->|"uses diagnostics"| node_diagnostic
node_wound_api -->|"downloads and uploads"| node_object_store

click node_web "https://github.com/bevvee/shifatech/blob/main/Frontend/Web/src/app/app.routes.ts"
click node_auth "https://github.com/bevvee/shifatech/blob/main/Backend/auth-service/src/main/java/com/shifatech/authservice/controller/AuthController.java"
click node_auth_logic "https://github.com/bevvee/shifatech/blob/main/Backend/auth-service/src/main/java/com/shifatech/authservice/service/AuthService.java"
click node_user_store "https://github.com/bevvee/shifatech/blob/main/Backend/auth-service/src/main/java/com/shifatech/authservice/entity/User.java"
click node_patient "https://github.com/bevvee/shifatech/blob/main/Backend/patient-service/src/main/java/com/shifatech/patient_service/service/PatientService.java"
click node_visit "https://github.com/bevvee/shifatech/blob/main/Backend/patient-service/src/main/java/com/shifatech/patient_service/service/VisiteService.java"
click node_doctor "https://github.com/bevvee/shifatech/blob/main/Backend/doctor-service/src/main/java/com/ShifaTech/DoctorService/service/DoctorService.java"
click node_planning "https://github.com/bevvee/shifatech/blob/main/Backend/doctor-service/src/main/java/com/ShifaTech/DoctorService/service/PlanningService.java"
click node_nurse "https://github.com/bevvee/shifatech/blob/main/Backend/infirmier-service/src/Service/InfirmierService.php"
click node_appointments "https://github.com/bevvee/shifatech/blob/main/Backend/rdv-service/src/Controller/Api/RendezVousController.php"
click node_bodymap "https://github.com/bevvee/shifatech/blob/main/Backend/body-service/src/Controller/BodyMapController.php"
click node_bodymap_logic "https://github.com/bevvee/shifatech/blob/main/Backend/body-service/src/Service/BodyMapService.php"
click node_wound_api "https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/main.py"
click node_inference "https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/inference.py"
click node_diagnostic "https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/medical_diagnostic.py"
click node_object_store "https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/minio_client.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_web toneBlue
class node_auth,node_auth_logic,node_user_store,node_service_databases toneAmber
class node_patient,node_visit,node_gateway toneMint
class node_doctor,node_planning,node_nurse,node_appointments toneRose
class node_bodymap,node_bodymap_logic,node_wound_api,node_inference,node_diagnostic,node_object_store,node_user toneIndigo
```

## Components

### Web portal

- [Angular application](https://github.com/bevvee/shifatech/blob/main/Frontend/Web/src/app/app.routes.ts): `Frontend/Web/src/app/app.routes.ts`

### Identity

- [Authentication API](https://github.com/bevvee/shifatech/blob/main/Backend/auth-service/src/main/java/com/shifatech/authservice/controller/AuthController.java): `Backend/auth-service/src/main/java/com/shifatech/authservice/controller/AuthController.java`
- [Auth service logic](https://github.com/bevvee/shifatech/blob/main/Backend/auth-service/src/main/java/com/shifatech/authservice/service/AuthService.java): `Backend/auth-service/src/main/java/com/shifatech/authservice/service/AuthService.java`
- [User records](https://github.com/bevvee/shifatech/blob/main/Backend/auth-service/src/main/java/com/shifatech/authservice/entity/User.java): `Backend/auth-service/src/main/java/com/shifatech/authservice/entity/User.java`

### Patient care

- [Patient management](https://github.com/bevvee/shifatech/blob/main/Backend/patient-service/src/main/java/com/shifatech/patient_service/service/PatientService.java): `Backend/patient-service/src/main/java/com/shifatech/patient_service/service/PatientService.java`
- [Visits and records](https://github.com/bevvee/shifatech/blob/main/Backend/patient-service/src/main/java/com/shifatech/patient_service/service/VisiteService.java): `Backend/patient-service/src/main/java/com/shifatech/patient_service/service/VisiteService.java`

### Clinical operations

- [Doctor management](https://github.com/bevvee/shifatech/blob/main/Backend/doctor-service/src/main/java/com/ShifaTech/DoctorService/service/DoctorService.java): `Backend/doctor-service/src/main/java/com/ShifaTech/DoctorService/service/DoctorService.java`
- [Doctor planning](https://github.com/bevvee/shifatech/blob/main/Backend/doctor-service/src/main/java/com/ShifaTech/DoctorService/service/PlanningService.java): `Backend/doctor-service/src/main/java/com/ShifaTech/DoctorService/service/PlanningService.java`
- [Nurse management](https://github.com/bevvee/shifatech/blob/main/Backend/infirmier-service/src/Service/InfirmierService.php): `Backend/infirmier-service/src/Service/InfirmierService.php`
- [Appointments](https://github.com/bevvee/shifatech/blob/main/Backend/rdv-service/src/Controller/Api/RendezVousController.php): `Backend/rdv-service/src/Controller/Api/RendezVousController.php`

### Clinical assessment

- [Body map](https://github.com/bevvee/shifatech/blob/main/Backend/body-service/src/Controller/BodyMapController.php): `Backend/body-service/src/Controller/BodyMapController.php`
- [Body map service](https://github.com/bevvee/shifatech/blob/main/Backend/body-service/src/Service/BodyMapService.php): `Backend/body-service/src/Service/BodyMapService.php`
- [Wound analysis API](https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/main.py): `Backend/wound-image-service/app/main.py`
- [Image inference](https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/inference.py): `Backend/wound-image-service/app/inference.py`
- [Medical diagnostic](https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/medical_diagnostic.py): `Backend/wound-image-service/app/medical_diagnostic.py`
- [Image object storage](https://github.com/bevvee/shifatech/blob/main/Backend/wound-image-service/app/minio_client.py): `Backend/wound-image-service/app/minio_client.py`

### Other components

- **Patient or staff**
- **Service MySQL databases**
- **Nginx API gateway**

## Connections

- Patient or staff → Angular application: uses (evidence: `README.md`)
- Angular application → Nginx API gateway: requests APIs
- Nginx API gateway → Authentication API: routes /auth (evidence: `README.md`)
- Nginx API gateway → Patient management: routes /patient (evidence: `README.md`)
- Nginx API gateway → Doctor management: routes /doctor (evidence: `README.md`)
- Nginx API gateway → Nurse management: routes /infirmier (evidence: `README.md`)
- Nginx API gateway → Appointments: routes /rdv (evidence: `README.md`)
- Authentication API → Auth service logic: delegates to (evidence: `Backend/auth-service/src/main/java/com/shifatech/authservice/controller/AuthController.java`)
- Auth service logic → User records: manages users (evidence: `Backend/auth-service/src/main/java/com/shifatech/authservice/service/AuthService.java`)
- Patient management → Authentication API: registers users (evidence: `Backend/patient-service/src/main/java/com/shifatech/patient_service/service/PatientService.java`)
- Patient management → Service MySQL databases: persists patient data (evidence: `README.md`)
- Visits and records → Service MySQL databases: persists visit data (evidence: `README.md`)
- Doctor management → Service MySQL databases: persists doctor data (evidence: `README.md`)
- Doctor planning → Service MySQL databases: persists planning (evidence: `README.md`)
- Nurse management → Service MySQL databases: persists nurse data (evidence: `README.md`)
- Appointments → Service MySQL databases: persists appointments (evidence: `README.md`)
- Body map → Body map service: delegates to (evidence: `Backend/body-service/src/Controller/BodyMapController.php`)
- Wound analysis API → Image inference: runs analysis (evidence: `Backend/wound-image-service/app/main.py`)
- Wound analysis API → Medical diagnostic: uses diagnostics (evidence: `Backend/wound-image-service/app/main.py`)
- Wound analysis API → Image object storage: downloads and uploads (evidence: `Backend/wound-image-service/app/main.py`)
