# navya-1803/hospital-management-system architecture

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

- Interactive diagram: https://gitdiagram.com/navya-1803/hospital-management-system
- Repository: https://github.com/navya-1803/hospital-management-system

## Overview

This repository is documented as a Spring Boot REST API for user registration/login and authenticated patient-record management. Clients call the auth and patient endpoints; JWTs secure patient requests, and the documented JPA/MySQL stack provides persistence. The README describes controller, service, DTO, entity, repository, and configuration layers, but no source excerpts or file tree are available to verify their call relationships. Paths below are documented directories, and the graph avoids guessing at internal calls.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["REST API"]
  node_controllers["REST controllers"]
  node_dtos["Request and response DTOs"]
end

subgraph group_identity["Identity and Security"]
  node_auth["Registration and login"]
  node_jwt["JWT and security"]
end

subgraph group_patient["Patient Records"]
  node_patient["Patient management"]
end

subgraph group_persistence["Persistence"]
  node_entities["User and patient entities"]
  node_repositories["JPA repositories"]
  node_mysql[("MySQL database")]
end

node_client(("API client"))

node_client -->|"calls REST API"| node_controllers
node_client -->|"sends bearer token"| node_jwt
node_controllers -.->|"handles auth APIs"| node_auth
node_controllers -.->|"handles patient APIs"| node_patient
node_repositories -.->|"persists records"| node_mysql

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_controllers,node_dtos,node_client toneBlue
class node_auth,node_jwt toneAmber
class node_patient toneMint
class node_entities,node_repositories,node_mysql toneRose
```

## Components

### REST API

- **REST controllers**
- **Request and response DTOs**

### Identity and Security

- **Registration and login**
- **JWT and security**

### Patient Records

- **Patient management**

### Persistence

- **User and patient entities**
- **JPA repositories**
- **MySQL database**

### Other components

- **API client**

## Connections

- API client → REST controllers: calls REST API (evidence: `README.md`)
- API client → JWT and security: sends bearer token (evidence: `README.md`)
- REST controllers → Registration and login: handles auth APIs
- REST controllers → Patient management: handles patient APIs
- JPA repositories → MySQL database: persists records
