# tejaswii27/medicore architecture

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

- Interactive diagram: https://gitdiagram.com/tejaswii27/medicore
- Repository: https://github.com/tejaswii27/medicore

## Overview

Medicore is a Java Swing medical appointment application. Users register or log in, then use role-specific dashboards: patients find doctors, book appointments, and manage reports; doctors manage availability, appointments, and patient reports; admins have a separate dashboard. The application persists records in MySQL and stores uploaded report files locally. Geolocation supports doctor discovery and location entry. Some relationships below rely on the SOURCE INDEX or README because the corresponding source was not excerpted; those citations identify the documented or indexed relationship.

Main entry points: [`src/com/medical/ui/LoginFrame.java`](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/LoginFrame.java) (Login), [`src/com/medical/ui/PatientDashboard.java`](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/PatientDashboard.java) (Patient dashboard), [`src/com/medical/db/DatabaseConnection.java`](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/db/DatabaseConnection.java) (Database connection), [`src/com/medical/ui/DoctorDashboard.java`](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/DoctorDashboard.java) (Doctor dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and accounts"]
  node_main["Application entry<br/>[Main.java]"]
  node_login["Login<br/>[LoginFrame.java]"]
  node_registration["Registration"]
  node_admin_dashboard["Admin dashboard"]
end

subgraph group_care["Care workflows"]
  node_patient_dashboard["Patient dashboard"]
  node_doctor_dashboard["Doctor dashboard"]
  node_map_picker["Location picker"]
end

subgraph group_persistence["Persistence"]
  node_appointment_dao["Appointment records"]
  node_doctor_dao["Doctor records<br/>[DoctorDao.java]"]
  node_user_dao["User records<br/>[UserDao.java]"]
  node_report_dao["Report records<br/>[ReportDao.java]"]
  node_database_connection["Database connection"]
end

subgraph group_shared["Shared services"]
  node_doctor_model["Doctor model<br/>[Doctor.java]"]
  node_patient_model["Patient model<br/>[Patient.java]"]
  node_report_model["Report model<br/>[Report.java]"]
  node_appointment_model["Appointment model<br/>[Appointment.java]"]
  node_user_model["User model<br/>[User.java]"]
  node_geo_utils["Geolocation utilities"]
  node_ui_utils["UI utilities<br/>[UIUtils.java]"]
  node_security_utils["Security utilities<br/>[SecurityUtils.java]"]
end

node_patient_actor(("Patient"))
node_doctor_actor(("Doctor"))
node_admin_actor(("Admin"))
node_mysql[("MySQL database")]
node_report_files["Report files"]
node_ipinfo{{"IP location service"}}
node_geoapify{{"Geocoding service"}}

node_main -->|"opens"| node_login
node_patient_actor -.->|"signs in"| node_login
node_doctor_actor -.->|"signs in"| node_login
node_admin_actor -.->|"signs in"| node_login
node_login -->|"authenticates"| node_user_dao
node_login -->|"opens"| node_registration
node_login -->|"opens"| node_patient_dashboard
node_login -->|"opens"| node_doctor_dashboard
node_login -->|"opens"| node_admin_dashboard
node_registration -->|"registers doctors"| node_doctor_dao
node_registration -->|"uses"| node_database_connection
node_patient_dashboard -->|"finds doctors"| node_doctor_dao
node_patient_dashboard -->|"manages bookings"| node_appointment_dao
node_patient_dashboard -->|"lists reports"| node_report_dao
node_patient_dashboard -->|"gets location"| node_geo_utils
node_patient_dashboard -->|"renders cards"| node_ui_utils
node_doctor_dashboard -->|"manages schedules"| node_appointment_dao
node_doctor_dashboard -->|"manages reports"| node_report_dao
node_doctor_dashboard -->|"uses controls"| node_ui_utils
node_map_picker -->|"geocodes locations"| node_geo_utils
node_admin_dashboard -->|"uses"| node_database_connection
node_user_dao -->|"queries"| node_database_connection
node_doctor_dao -->|"queries"| node_database_connection
node_appointment_dao -->|"queries"| node_database_connection
node_report_dao -->|"queries"| node_database_connection
node_database_connection -->|"connects"| node_mysql
node_doctor_dao -->|"maps records"| node_doctor_model
node_user_dao -->|"returns"| node_patient_model
node_user_dao -->|"returns"| node_doctor_model
node_report_dao -->|"builds results"| node_report_model
node_doctor_model -->|"extends"| node_user_model
node_patient_model -->|"extends"| node_user_model
node_doctor_dao -->|"calculates distance"| node_geo_utils
node_geo_utils -->|"requests IP location"| node_ipinfo
node_geo_utils -->|"geocodes address"| node_geoapify
node_doctor_dashboard -->|"saves uploads"| node_report_files
node_patient_dashboard -.->|"opens files"| node_report_files
node_security_utils -.->|"hashing optional"| node_user_dao

click node_main "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/main/Main.java"
click node_login "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/LoginFrame.java"
click node_registration "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/RegistrationFrame.java"
click node_admin_dashboard "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/AdminDashboard.java"
click node_patient_dashboard "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/PatientDashboard.java"
click node_doctor_dashboard "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/DoctorDashboard.java"
click node_map_picker "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/MapPickerDialog.java"
click node_appointment_dao "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/AppointmentDao.java"
click node_doctor_dao "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/DoctorDao.java"
click node_user_dao "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/UserDao.java"
click node_report_dao "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/ReportDao.java"
click node_database_connection "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/db/DatabaseConnection.java"
click node_doctor_model "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Doctor.java"
click node_patient_model "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Patient.java"
click node_report_model "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Report.java"
click node_appointment_model "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Appointment.java"
click node_user_model "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/User.java"
click node_geo_utils "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/util/GeolocationUtils.java"
click node_ui_utils "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/util/UIUtils.java"
click node_security_utils "https://github.com/tejaswii27/medicore/blob/main/src/com/medical/util/SecurityUtils.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_main,node_login,node_registration,node_admin_dashboard toneBlue
class node_patient_dashboard,node_doctor_dashboard,node_map_picker,node_mysql toneAmber
class node_appointment_dao,node_doctor_dao,node_user_dao,node_report_dao,node_database_connection toneMint
class node_doctor_model,node_patient_model,node_report_model,node_appointment_model,node_user_model,node_geo_utils,node_ui_utils,node_security_utils toneRose
class node_patient_actor,node_doctor_actor,node_admin_actor,node_report_files,node_ipinfo,node_geoapify toneIndigo
```

## Components

### Access and accounts

- [Application entry](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/main/Main.java): `src/com/medical/main/Main.java`
- [Login](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/LoginFrame.java): `src/com/medical/ui/LoginFrame.java`
- [Registration](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/RegistrationFrame.java): `src/com/medical/ui/RegistrationFrame.java`
- [Admin dashboard](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/AdminDashboard.java): `src/com/medical/ui/AdminDashboard.java`

### Care workflows

- [Patient dashboard](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/PatientDashboard.java): `src/com/medical/ui/PatientDashboard.java`
- [Doctor dashboard](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/DoctorDashboard.java): `src/com/medical/ui/DoctorDashboard.java`
- [Location picker](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/ui/MapPickerDialog.java): `src/com/medical/ui/MapPickerDialog.java`

### Persistence

- [Appointment records](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/AppointmentDao.java): `src/com/medical/dao/AppointmentDao.java`
- [Doctor records](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/DoctorDao.java): `src/com/medical/dao/DoctorDao.java`
- [User records](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/UserDao.java): `src/com/medical/dao/UserDao.java`
- [Report records](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/dao/ReportDao.java): `src/com/medical/dao/ReportDao.java`
- [Database connection](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/db/DatabaseConnection.java): `src/com/medical/db/DatabaseConnection.java`

### Shared services

- [Doctor model](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Doctor.java): `src/com/medical/model/Doctor.java`
- [Patient model](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Patient.java): `src/com/medical/model/Patient.java`
- [Report model](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Report.java): `src/com/medical/model/Report.java`
- [Appointment model](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/Appointment.java): `src/com/medical/model/Appointment.java`
- [User model](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/model/User.java): `src/com/medical/model/User.java`
- [Geolocation utilities](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/util/GeolocationUtils.java): `src/com/medical/util/GeolocationUtils.java`
- [UI utilities](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/util/UIUtils.java): `src/com/medical/util/UIUtils.java`
- [Security utilities](https://github.com/tejaswii27/medicore/blob/main/src/com/medical/util/SecurityUtils.java): `src/com/medical/util/SecurityUtils.java`

### Other components

- **Patient**
- **Doctor**
- **Admin**
- **MySQL database**
- **Report files**
- **IP location service**
- **Geocoding service**

## Connections

- Application entry → Login: opens (evidence: `src/com/medical/main/Main.java`)
- Patient → Login: signs in
- Doctor → Login: signs in
- Admin → Login: signs in
- Login → User records: authenticates (evidence: `src/com/medical/ui/LoginFrame.java`)
- Login → Registration: opens (evidence: `src/com/medical/ui/LoginFrame.java`)
- Login → Patient dashboard: opens (evidence: `src/com/medical/ui/LoginFrame.java`)
- Login → Doctor dashboard: opens (evidence: `src/com/medical/ui/LoginFrame.java`)
- Login → Admin dashboard: opens (evidence: `src/com/medical/ui/LoginFrame.java`)
- Registration → Doctor records: registers doctors (evidence: `src/com/medical/ui/RegistrationFrame.java`)
- Registration → Database connection: uses (evidence: `src/com/medical/ui/RegistrationFrame.java`)
- Patient dashboard → Doctor records: finds doctors (evidence: `src/com/medical/ui/PatientDashboard.java`)
- Patient dashboard → Appointment records: manages bookings (evidence: `src/com/medical/ui/PatientDashboard.java`)
- Patient dashboard → Report records: lists reports (evidence: `src/com/medical/ui/PatientDashboard.java`)
- Patient dashboard → Geolocation utilities: gets location (evidence: `src/com/medical/ui/PatientDashboard.java`)
- Patient dashboard → UI utilities: renders cards (evidence: `src/com/medical/ui/PatientDashboard.java`)
- Doctor dashboard → Appointment records: manages schedules (evidence: `src/com/medical/ui/DoctorDashboard.java`)
- Doctor dashboard → Report records: manages reports (evidence: `src/com/medical/ui/DoctorDashboard.java`)
- Doctor dashboard → UI utilities: uses controls (evidence: `src/com/medical/ui/DoctorDashboard.java`)
- Location picker → Geolocation utilities: geocodes locations (evidence: `src/com/medical/ui/MapPickerDialog.java`)
- Admin dashboard → Database connection: uses (evidence: `src/com/medical/ui/AdminDashboard.java`)
- User records → Database connection: queries (evidence: `src/com/medical/dao/UserDao.java`)
- Doctor records → Database connection: queries (evidence: `src/com/medical/dao/DoctorDao.java`)
- Appointment records → Database connection: queries (evidence: `src/com/medical/dao/AppointmentDao.java`)
- Report records → Database connection: queries (evidence: `src/com/medical/dao/ReportDao.java`)
- Database connection → MySQL database: connects (evidence: `src/com/medical/db/DatabaseConnection.java`)
- Doctor records → Doctor model: maps records (evidence: `src/com/medical/dao/DoctorDao.java`)
- User records → Patient model: returns (evidence: `src/com/medical/dao/UserDao.java`)
- User records → Doctor model: returns (evidence: `src/com/medical/dao/UserDao.java`)
- Report records → Report model: builds results (evidence: `src/com/medical/dao/ReportDao.java`)
- Doctor model → User model: extends (evidence: `src/com/medical/model/Doctor.java`)
- Patient model → User model: extends (evidence: `src/com/medical/model/Patient.java`)
- Doctor records → Geolocation utilities: calculates distance (evidence: `src/com/medical/dao/DoctorDao.java`)
- Geolocation utilities → IP location service: requests IP location (evidence: `src/com/medical/util/GeolocationUtils.java`)
- Geolocation utilities → Geocoding service: geocodes address (evidence: `src/com/medical/util/GeolocationUtils.java`)
- Doctor dashboard → Report files: saves uploads (evidence: `src/com/medical/ui/DoctorDashboard.java`)
- Patient dashboard → Report files: opens files
- Security utilities → User records: hashing optional
