# caesarmaulana01/hostyking architecture

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

- Interactive diagram: https://gitdiagram.com/caesarmaulana01/hostyking
- Repository: https://github.com/caesarmaulana01/hostyking

## Overview

HOSTYKING is a PHP/MySQL hospital-facility booking and care-management application for patients, doctors, and administrators. The patient workflow covers account access, booking a doctor and schedule, and viewing examination history and medical images. Doctors record examination results and treatments; administrators manage hospital staff, patients, rooms, medicines, and related records. The excerpts confirm booking, authentication, and examination database operations; links among unsampled pages are limited to the capabilities indicated by the README and filenames.

Main entry points: [`auth/login.php`](https://github.com/caesarmaulana01/hostyking/blob/Master/auth/login.php) (Sign-in and registration), [`data_booking_pasien.php`](https://github.com/caesarmaulana01/hostyking/blob/Master/data_booking_pasien.php) (Facility booking), [`dash_pasien.php`](https://github.com/caesarmaulana01/hostyking/blob/Master/dash_pasien.php) (Patient dashboard), [`hasil_pemeriksaan_dokter.php`](https://github.com/caesarmaulana01/hostyking/blob/Master/hasil_pemeriksaan_dokter.php) (Examination and treatment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Dashboards"]
  node_auth["Sign-in and registration<br/>[login.php]"]
  node_patient_dash["Patient dashboard<br/>[dash_pasien.php]"]
  node_doctor_dash["Doctor dashboard<br/>[dash_dokter.php]"]
  node_admin_dash["Admin dashboard<br/>[dash_admin.php]"]
  node_db_connection["Database connection<br/>[connect.php]"]
end

subgraph group_booking["Booking and Scheduling"]
  node_patient_booking["Facility booking"]
  node_doctor_schedule["Doctor schedules<br/>[jadwal_dokter.php]"]
  node_booking_admin["Booking oversight"]
  node_booking_doctor["Doctor bookings"]
end

subgraph group_care["Clinical Care"]
  node_exam_results["Examination and treatment"]
  node_patient_history["Examination history"]
  node_medical_images["Medical images"]
  node_outpatient["Outpatient care<br/>[rawat_jalan.php]"]
end

subgraph group_admin["Hospital Administration"]
  node_patient_admin["Patient records<br/>[pasien_admin.php]"]
  node_doctor_admin["Doctor management"]
  node_rooms["Rooms and inpatient care"]
  node_medicines["Medicine management<br/>[obat_admin.php]"]
  node_imaging_admin["Imaging administration<br/>[rontgen_admin.php]"]
end

node_patient(("Patient"))
node_doctor(("Doctor"))
node_administrator(("Administrator"))
node_mysql[("MySQL database")]

node_patient -->|"signs in"| node_auth
node_doctor -->|"signs in"| node_auth
node_administrator -->|"signs in"| node_auth
node_auth -->|"queries"| node_db_connection
node_auth -->|"checks credentials"| node_mysql
node_auth -->|"routes patient"| node_patient_dash
node_auth -->|"routes doctor"| node_doctor_dash
node_auth -->|"routes admin"| node_admin_dash
node_patient -->|"opens"| node_patient_dash
node_doctor -->|"opens"| node_doctor_dash
node_administrator -->|"opens"| node_admin_dash
node_patient_dash -->|"opens booking"| node_patient_booking
node_patient -->|"submits booking"| node_patient_booking
node_patient_booking -->|"writes booking and schedule"| node_mysql
node_patient_booking -->|"selects schedule"| node_doctor_schedule
node_doctor -->|"reviews bookings"| node_booking_doctor
node_administrator -->|"reviews bookings"| node_booking_admin
node_doctor -->|"records care"| node_exam_results
node_exam_results -->|"reads and writes records"| node_mysql
node_patient -->|"views history"| node_patient_history
node_patient -->|"views images"| node_medical_images
node_administrator -->|"manages patients"| node_patient_admin
node_administrator -->|"manages doctors"| node_doctor_admin
node_administrator -->|"manages rooms"| node_rooms
node_administrator -->|"manages medicines"| node_medicines
node_administrator -->|"manages imaging"| node_imaging_admin
node_doctor -->|"handles outpatient care"| node_outpatient

click node_auth "https://github.com/caesarmaulana01/hostyking/blob/Master/auth/login.php"
click node_patient_dash "https://github.com/caesarmaulana01/hostyking/blob/Master/dash_pasien.php"
click node_doctor_dash "https://github.com/caesarmaulana01/hostyking/blob/Master/dash_dokter.php"
click node_admin_dash "https://github.com/caesarmaulana01/hostyking/blob/Master/dash_admin.php"
click node_db_connection "https://github.com/caesarmaulana01/hostyking/blob/Master/auth/connect.php"
click node_patient_booking "https://github.com/caesarmaulana01/hostyking/blob/Master/data_booking_pasien.php"
click node_doctor_schedule "https://github.com/caesarmaulana01/hostyking/blob/Master/jadwal_dokter.php"
click node_booking_admin "https://github.com/caesarmaulana01/hostyking/blob/Master/data_booking_admin.php"
click node_booking_doctor "https://github.com/caesarmaulana01/hostyking/blob/Master/data_booking_dokter.php"
click node_exam_results "https://github.com/caesarmaulana01/hostyking/blob/Master/hasil_pemeriksaan_dokter.php"
click node_patient_history "https://github.com/caesarmaulana01/hostyking/blob/Master/detail_riwayat_pasien.php"
click node_medical_images "https://github.com/caesarmaulana01/hostyking/blob/Master/foto_medis_pasien.php"
click node_outpatient "https://github.com/caesarmaulana01/hostyking/blob/Master/rawat_jalan.php"
click node_patient_admin "https://github.com/caesarmaulana01/hostyking/blob/Master/pasien_admin.php"
click node_doctor_admin "https://github.com/caesarmaulana01/hostyking/blob/Master/data_dokter_admin.php"
click node_rooms "https://github.com/caesarmaulana01/hostyking/blob/Master/ruang_inap_admin.php"
click node_medicines "https://github.com/caesarmaulana01/hostyking/blob/Master/obat_admin.php"
click node_imaging_admin "https://github.com/caesarmaulana01/hostyking/blob/Master/rontgen_admin.php"

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_auth,node_patient_dash,node_doctor_dash,node_admin_dash,node_db_connection toneBlue
class node_patient_booking,node_doctor_schedule,node_booking_admin,node_booking_doctor,node_mysql toneAmber
class node_exam_results,node_patient_history,node_medical_images,node_outpatient toneMint
class node_patient_admin,node_doctor_admin,node_rooms,node_medicines,node_imaging_admin toneRose
class node_patient,node_doctor,node_administrator toneIndigo
```

## Components

### Access and Dashboards

- [Sign-in and registration](https://github.com/caesarmaulana01/hostyking/blob/Master/auth/login.php): `auth/login.php`
- [Patient dashboard](https://github.com/caesarmaulana01/hostyking/blob/Master/dash_pasien.php): `dash_pasien.php`
- [Doctor dashboard](https://github.com/caesarmaulana01/hostyking/blob/Master/dash_dokter.php): `dash_dokter.php`
- [Admin dashboard](https://github.com/caesarmaulana01/hostyking/blob/Master/dash_admin.php): `dash_admin.php`
- [Database connection](https://github.com/caesarmaulana01/hostyking/blob/Master/auth/connect.php): `auth/connect.php`

### Booking and Scheduling

- [Facility booking](https://github.com/caesarmaulana01/hostyking/blob/Master/data_booking_pasien.php): `data_booking_pasien.php`
- [Doctor schedules](https://github.com/caesarmaulana01/hostyking/blob/Master/jadwal_dokter.php): `jadwal_dokter.php`
- [Booking oversight](https://github.com/caesarmaulana01/hostyking/blob/Master/data_booking_admin.php): `data_booking_admin.php`
- [Doctor bookings](https://github.com/caesarmaulana01/hostyking/blob/Master/data_booking_dokter.php): `data_booking_dokter.php`

### Clinical Care

- [Examination and treatment](https://github.com/caesarmaulana01/hostyking/blob/Master/hasil_pemeriksaan_dokter.php): `hasil_pemeriksaan_dokter.php`
- [Examination history](https://github.com/caesarmaulana01/hostyking/blob/Master/detail_riwayat_pasien.php): `detail_riwayat_pasien.php`
- [Medical images](https://github.com/caesarmaulana01/hostyking/blob/Master/foto_medis_pasien.php): `foto_medis_pasien.php`
- [Outpatient care](https://github.com/caesarmaulana01/hostyking/blob/Master/rawat_jalan.php): `rawat_jalan.php`

### Hospital Administration

- [Patient records](https://github.com/caesarmaulana01/hostyking/blob/Master/pasien_admin.php): `pasien_admin.php`
- [Doctor management](https://github.com/caesarmaulana01/hostyking/blob/Master/data_dokter_admin.php): `data_dokter_admin.php`
- [Rooms and inpatient care](https://github.com/caesarmaulana01/hostyking/blob/Master/ruang_inap_admin.php): `ruang_inap_admin.php`
- [Medicine management](https://github.com/caesarmaulana01/hostyking/blob/Master/obat_admin.php): `obat_admin.php`
- [Imaging administration](https://github.com/caesarmaulana01/hostyking/blob/Master/rontgen_admin.php): `rontgen_admin.php`

### Other components

- **Patient**
- **Doctor**
- **Administrator**
- **MySQL database**

## Connections

- Patient → Sign-in and registration: signs in
- Doctor → Sign-in and registration: signs in
- Administrator → Sign-in and registration: signs in
- Sign-in and registration → Database connection: queries
- Sign-in and registration → MySQL database: checks credentials
- Sign-in and registration → Patient dashboard: routes patient
- Sign-in and registration → Doctor dashboard: routes doctor
- Sign-in and registration → Admin dashboard: routes admin
- Patient → Patient dashboard: opens
- Doctor → Doctor dashboard: opens
- Administrator → Admin dashboard: opens
- Patient dashboard → Facility booking: opens booking
- Patient → Facility booking: submits booking
- Facility booking → MySQL database: writes booking and schedule
- Facility booking → Doctor schedules: selects schedule
- Doctor → Doctor bookings: reviews bookings
- Administrator → Booking oversight: reviews bookings
- Doctor → Examination and treatment: records care
- Examination and treatment → MySQL database: reads and writes records
- Patient → Examination history: views history
- Patient → Medical images: views images
- Administrator → Patient records: manages patients
- Administrator → Doctor management: manages doctors
- Administrator → Rooms and inpatient care: manages rooms
- Administrator → Medicine management: manages medicines
- Administrator → Imaging administration: manages imaging
- Doctor → Outpatient care: handles outpatient care
