# kishoretamil03579/hospitalmanagementsystem_angular architecture

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

- Interactive diagram: https://gitdiagram.com/kishoretamil03579/hospitalmanagementsystem_angular
- Repository: https://github.com/kishoretamil03579/hospitalmanagementsystem_angular

## Overview

CareFlow is a hospital management system with an Angular client and an ASP.NET Core API backed by SQL Server. The principal workflow runs from a user navigating a role-protected feature, through a frontend service request, API controller, application service, and persistence layer. Major branches cover authentication and staff onboarding, patients, doctors and scheduling, appointments, administration, notifications, the dashboard, and settings. Several backend links are documented architecturally but their implementation files were not sampled; those links cite the README rather than implying source inspection.

Main entry points: [`frontend/src/app/app.routes.ts`](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/app.routes.ts) (Routes and Guards), [`backend/HospitalManagement.Infrastructure/Repositories`](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/tree/main/backend/HospitalManagement.Infrastructure/Repositories) (Data Repositories), [`frontend/src/app/core/services/auth.service.ts`](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/core/services/auth.service.ts) (Auth Client), [`backend/HospitalManagement.Application/Auth/Services/AuthService.cs`](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Auth/Services/AuthService.cs) (Authentication Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Angular Client"]
  node_routes["Routes and Guards<br/>[app.routes.ts]"]
  node_layout["Application Layout"]
end

subgraph group_operations["Clinical Operations"]
  node_patientui["Patient Directory UI"]
  node_doctorui["Doctor Directory UI"]
  node_appointmentui["Appointment UI"]
  node_dashboard["Operations Dashboard"]
  node_notifications["Notification Center"]
  node_settings["System Settings"]
end

subgraph group_identity["Identity and Admin"]
  node_authui["Login and Onboarding UI"]
  node_authclient["Auth Client<br/>[auth.service.ts]"]
  node_adminui["User Administration"]
  node_staffui["Staff Approvals"]
end

subgraph group_api["API and Application"]
  node_patientapi["Patient Endpoints"]
  node_doctorapi["Doctor Endpoints"]
  node_appointmentapi["Appointment Endpoints"]
  node_authapi["Authentication Endpoints<br/>[AuthController.cs]"]
  node_adminapi["Admin User Endpoints"]
  node_staffapi["Staff Registration Endpoints"]
  node_patientsvc["Patient Service<br/>[PatientService.cs]"]
  node_doctorsvc["Doctor and Availability Services<br/>[DoctorService.cs]"]
  node_appointmentsvc["Appointment Service"]
  node_authsvc["Authentication Service<br/>[AuthService.cs]"]
  node_staffsvc["Staff Registration Service"]
  node_adminsvc["Admin User Service"]
end

subgraph group_persistence["Persistence and Integrations"]
  node_repositories["Data Repositories<br/>[Repositories]"]
  node_dbcontext["Hospital Database Context"]
  node_sql[("SQL Server")]
  node_email["Email Delivery<br/>[EmailService.cs]"]
  node_domain["Hospital Domain Model<br/>[Entities]"]
end

node_user(("Hospital User"))

node_user -->|"navigates"| node_routes
node_routes -->|"loads"| node_layout
node_routes -->|"routes to"| node_authui
node_routes -->|"routes to"| node_patientui
node_routes -->|"routes to"| node_doctorui
node_routes -->|"routes to"| node_appointmentui
node_routes -->|"routes to"| node_dashboard
node_routes -->|"routes to"| node_notifications
node_routes -->|"routes to"| node_settings
node_routes -->|"routes to"| node_adminui
node_routes -->|"routes to"| node_staffui
node_authui -.->|"uses"| node_authclient
node_authclient -->|"sends requests"| node_authapi
node_patientui -.->|"requests records"| node_patientapi
node_doctorui -.->|"requests directory"| node_doctorapi
node_appointmentui -.->|"manages bookings"| node_appointmentapi
node_dashboard -.->|"loads metrics"| node_patientapi
node_notifications -.->|"presents alerts"| node_user
node_settings -.->|"applies preferences"| node_user
node_adminui -->|"requests user admin"| node_authclient
node_staffui -->|"requests approvals"| node_authclient
node_authapi -.->|"delegates"| node_authsvc
node_patientapi -.->|"delegates"| node_patientsvc
node_doctorapi -.->|"delegates"| node_doctorsvc
node_appointmentapi -.->|"delegates"| node_appointmentsvc
node_adminapi -.->|"delegates"| node_adminsvc
node_staffapi -->|"delegates"| node_staffsvc
node_authsvc -.->|"accesses data"| node_repositories
node_patientsvc -.->|"accesses data"| node_repositories
node_doctorsvc -.->|"accesses data"| node_repositories
node_appointmentsvc -.->|"accesses data"| node_repositories
node_adminsvc -.->|"accesses data"| node_repositories
node_staffsvc -.->|"accesses data"| node_repositories
node_repositories -.->|"uses"| node_dbcontext
node_dbcontext -->|"reads and writes"| node_sql
node_dbcontext -->|"maps entities"| node_domain
node_authsvc -.->|"sends email"| node_email

click node_routes "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/app.routes.ts"
click node_layout "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/layout/app-layout.component.ts"
click node_authui "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/auth/pages/login-page/login-page.component.ts"
click node_authclient "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/core/services/auth.service.ts"
click node_patientui "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/patients/pages/patient-list-page/patient-list-page.component.ts"
click node_doctorui "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/doctors/pages/doctor-list-page/doctor-list-page.component.ts"
click node_appointmentui "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/appointments/pages/appointment-calendar-page/appointment-calendar-page.component.ts"
click node_dashboard "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/dashboard/pages/dashboard-page/dashboard-page.component.ts"
click node_notifications "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/notifications/pages/notification-page/notification-page.component.ts"
click node_settings "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/settings/pages/settings-page/settings-page.component.ts"
click node_adminui "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/admin/pages/user-management-page/user-management-page.component.ts"
click node_staffui "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/admin/pages/staff-approval-page/staff-approval-page.component.ts"
click node_patientapi "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/PatientsController.cs"
click node_doctorapi "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/DoctorsController.cs"
click node_appointmentapi "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/AppointmentsController.cs"
click node_authapi "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/AuthController.cs"
click node_adminapi "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/AdminUsersController.cs"
click node_staffapi "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/StaffRegistrationController.cs"
click node_patientsvc "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Patients/Services/PatientService.cs"
click node_doctorsvc "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Doctors/Services/DoctorService.cs"
click node_appointmentsvc "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Appointments/Services/AppointmentService.cs"
click node_authsvc "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Auth/Services/AuthService.cs"
click node_staffsvc "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/StaffRegistration/Services/StaffRegistrationService.cs"
click node_adminsvc "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Admin/Services/AdminUserService.cs"
click node_repositories "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/tree/main/backend/HospitalManagement.Infrastructure/Repositories"
click node_dbcontext "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Infrastructure/Persistence/HospitalDbContext.cs"
click node_email "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Infrastructure/Services/EmailService.cs"
click node_domain "https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/tree/main/backend/HospitalManagement.Domain/Entities"

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_routes,node_layout,node_user toneBlue
class node_patientui,node_doctorui,node_appointmentui,node_dashboard,node_notifications,node_settings toneAmber
class node_authui,node_authclient,node_adminui,node_staffui toneMint
class node_patientapi,node_doctorapi,node_appointmentapi,node_authapi,node_adminapi,node_staffapi,node_patientsvc,node_doctorsvc,node_appointmentsvc,node_authsvc,node_staffsvc,node_adminsvc toneRose
class node_repositories,node_dbcontext,node_sql,node_email,node_domain toneIndigo
```

## Components

### Angular Client

- [Routes and Guards](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/app.routes.ts): `frontend/src/app/app.routes.ts`
- [Application Layout](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/layout/app-layout.component.ts): `frontend/src/app/layout/app-layout.component.ts`

### Clinical Operations

- [Patient Directory UI](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/patients/pages/patient-list-page/patient-list-page.component.ts): `frontend/src/app/features/patients/pages/patient-list-page/patient-list-page.component.ts`
- [Doctor Directory UI](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/doctors/pages/doctor-list-page/doctor-list-page.component.ts): `frontend/src/app/features/doctors/pages/doctor-list-page/doctor-list-page.component.ts`
- [Appointment UI](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/appointments/pages/appointment-calendar-page/appointment-calendar-page.component.ts): `frontend/src/app/features/appointments/pages/appointment-calendar-page/appointment-calendar-page.component.ts`
- [Operations Dashboard](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/dashboard/pages/dashboard-page/dashboard-page.component.ts): `frontend/src/app/features/dashboard/pages/dashboard-page/dashboard-page.component.ts`
- [Notification Center](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/notifications/pages/notification-page/notification-page.component.ts): `frontend/src/app/features/notifications/pages/notification-page/notification-page.component.ts`
- [System Settings](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/settings/pages/settings-page/settings-page.component.ts): `frontend/src/app/features/settings/pages/settings-page/settings-page.component.ts`

### Identity and Admin

- [Login and Onboarding UI](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/auth/pages/login-page/login-page.component.ts): `frontend/src/app/features/auth/pages/login-page/login-page.component.ts`
- [Auth Client](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/core/services/auth.service.ts): `frontend/src/app/core/services/auth.service.ts`
- [User Administration](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/admin/pages/user-management-page/user-management-page.component.ts): `frontend/src/app/features/admin/pages/user-management-page/user-management-page.component.ts`
- [Staff Approvals](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/frontend/src/app/features/admin/pages/staff-approval-page/staff-approval-page.component.ts): `frontend/src/app/features/admin/pages/staff-approval-page/staff-approval-page.component.ts`

### API and Application

- [Patient Endpoints](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/PatientsController.cs): `backend/HospitalManagement.Api/Controllers/PatientsController.cs`
- [Doctor Endpoints](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/DoctorsController.cs): `backend/HospitalManagement.Api/Controllers/DoctorsController.cs`
- [Appointment Endpoints](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/AppointmentsController.cs): `backend/HospitalManagement.Api/Controllers/AppointmentsController.cs`
- [Authentication Endpoints](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/AuthController.cs): `backend/HospitalManagement.Api/Controllers/AuthController.cs`
- [Admin User Endpoints](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/AdminUsersController.cs): `backend/HospitalManagement.Api/Controllers/AdminUsersController.cs`
- [Staff Registration Endpoints](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Api/Controllers/StaffRegistrationController.cs): `backend/HospitalManagement.Api/Controllers/StaffRegistrationController.cs`
- [Patient Service](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Patients/Services/PatientService.cs): `backend/HospitalManagement.Application/Patients/Services/PatientService.cs`
- [Doctor and Availability Services](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Doctors/Services/DoctorService.cs): `backend/HospitalManagement.Application/Doctors/Services/DoctorService.cs`
- [Appointment Service](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Appointments/Services/AppointmentService.cs): `backend/HospitalManagement.Application/Appointments/Services/AppointmentService.cs`
- [Authentication Service](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Auth/Services/AuthService.cs): `backend/HospitalManagement.Application/Auth/Services/AuthService.cs`
- [Staff Registration Service](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/StaffRegistration/Services/StaffRegistrationService.cs): `backend/HospitalManagement.Application/StaffRegistration/Services/StaffRegistrationService.cs`
- [Admin User Service](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Application/Admin/Services/AdminUserService.cs): `backend/HospitalManagement.Application/Admin/Services/AdminUserService.cs`

### Persistence and Integrations

- [Data Repositories](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/tree/main/backend/HospitalManagement.Infrastructure/Repositories): `backend/HospitalManagement.Infrastructure/Repositories`
- [Hospital Database Context](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Infrastructure/Persistence/HospitalDbContext.cs): `backend/HospitalManagement.Infrastructure/Persistence/HospitalDbContext.cs`
- **SQL Server**
- [Email Delivery](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/blob/main/backend/HospitalManagement.Infrastructure/Services/EmailService.cs): `backend/HospitalManagement.Infrastructure/Services/EmailService.cs`
- [Hospital Domain Model](https://github.com/kishoretamil03579/hospitalmanagementsystem_angular/tree/main/backend/HospitalManagement.Domain/Entities): `backend/HospitalManagement.Domain/Entities`

### Other components

- **Hospital User**

## Connections

- Hospital User → Routes and Guards: navigates (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Application Layout: loads (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Login and Onboarding UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Patient Directory UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Doctor Directory UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Appointment UI: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Operations Dashboard: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Notification Center: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → System Settings: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → User Administration: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Routes and Guards → Staff Approvals: routes to (evidence: `frontend/src/app/app.routes.ts`)
- Login and Onboarding UI → Auth Client: uses
- Auth Client → Authentication Endpoints: sends requests (evidence: `frontend/src/app/core/services/auth.service.ts`)
- Patient Directory UI → Patient Endpoints: requests records
- Doctor Directory UI → Doctor Endpoints: requests directory
- Appointment UI → Appointment Endpoints: manages bookings
- Operations Dashboard → Patient Endpoints: loads metrics
- Notification Center → Hospital User: presents alerts
- System Settings → Hospital User: applies preferences
- User Administration → Auth Client: requests user admin (evidence: `frontend/src/app/core/services/auth.service.ts`)
- Staff Approvals → Auth Client: requests approvals (evidence: `frontend/src/app/core/services/auth.service.ts`)
- Authentication Endpoints → Authentication Service: delegates
- Patient Endpoints → Patient Service: delegates
- Doctor Endpoints → Doctor and Availability Services: delegates
- Appointment Endpoints → Appointment Service: delegates
- Admin User Endpoints → Admin User Service: delegates
- Staff Registration Endpoints → Staff Registration Service: delegates (evidence: `backend/HospitalManagement.Api/Controllers/StaffRegistrationController.cs`)
- Authentication Service → Data Repositories: accesses data
- Patient Service → Data Repositories: accesses data
- Doctor and Availability Services → Data Repositories: accesses data
- Appointment Service → Data Repositories: accesses data
- Admin User Service → Data Repositories: accesses data
- Staff Registration Service → Data Repositories: accesses data
- Data Repositories → Hospital Database Context: uses
- Hospital Database Context → SQL Server: reads and writes
- Hospital Database Context → Hospital Domain Model: maps entities (evidence: `backend/HospitalManagement.Api/Program.cs`)
- Authentication Service → Email Delivery: sends email
