# bojcpu/sanfran-healthsystem.com architecture

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

- Interactive diagram: https://gitdiagram.com/bojcpu/sanfran-healthsystem.com
- Repository: https://github.com/bojcpu/sanfran-healthsystem.com

## Overview

This is a Laravel community-health application for staff managing patients and their care records. The main workflow is staff entering a patient and recording checkups, immunizations, or maternal care, then reviewing those records and scheduled follow-ups. The tree also shows announcements, SMS, reports, archives, notifications, activity logs, and role-based user administration. Only selected controllers and services were excerpted; other capabilities are represented at their exact tree paths, and their internal connections are omitted where evidence was unavailable.

Main entry points: [`routes/web.php`](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/SearchSuggestionController.php`](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/SearchSuggestionController.php) (Record search), [`app/Http/Controllers/MaternalCareRecordController.php`](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/MaternalCareRecordController.php) (Maternal care), [`app/Models/Patient.php`](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/Patient.php) (Patient records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_care["Patient care"]
  node_patients["Patient registry"]
  node_patientmodel[("Patient records<br/>[Patient.php]")]
  node_checkups["Checkup records"]
  node_checkupmodel[("Checkup data<br/>[CheckupRecord.php]")]
  node_immun["Immunization records"]
  node_immunmodel[("Immunization data")]
  node_maternal["Maternal care"]
  node_maternalmodel[("Maternal care data")]
  node_reminders["Care reminders"]
  node_carealerts["Follow-up notifications"]
end

subgraph group_comms["Outreach"]
  node_announcements["Announcements"]
  node_push["Announcement push"]
  node_sms["SMS messaging<br/>[SmsService.php]"]
  node_smscontroller["SMS management"]
  node_notifications["Notifications"]
end

subgraph group_ops["Administration"]
  node_reports["Healthcare reports"]
  node_archive["Record archive"]
  node_activity["Activity logging"]
  node_users[("User and roles<br/>[User.php]")]
  node_search["Record search"]
  node_dashboard["Dashboard"]
end

subgraph group_platform["Application core"]
  node_routes["Web routes<br/>[web.php]"]
  node_auth["Staff sign-in"]
end

node_staff(("Health staff"))
node_external{{"SMS provider"}}

node_staff -->|"uses"| node_routes
node_routes -->|"routes to"| node_patients
node_routes -->|"routes to"| node_checkups
node_routes -->|"routes to"| node_immun
node_routes -->|"routes to"| node_maternal
node_routes -->|"routes to"| node_announcements
node_routes -->|"routes to"| node_smscontroller
node_routes -->|"routes to"| node_reports
node_routes -->|"routes to"| node_archive
node_routes -->|"routes to"| node_search
node_routes -->|"routes to"| node_auth
node_patients -.->|"reads and writes"| node_patientmodel
node_checkups -->|"creates records"| node_checkupmodel
node_checkups -->|"selects patients"| node_patientmodel
node_immun -->|"manages records"| node_immunmodel
node_immun -->|"selects patients"| node_patientmodel
node_maternal -->|"creates records"| node_maternalmodel
node_maternal -->|"selects patients"| node_patientmodel
node_maternal -->|"notifies midwives"| node_users
node_maternal -->|"logs changes"| node_activity
node_reminders -->|"checks schedules"| node_checkupmodel
node_reminders -->|"checks schedules"| node_immunmodel
node_reminders -->|"checks schedules"| node_maternalmodel
node_reminders -->|"dispatches"| node_carealerts
node_checkups -->|"logs changes"| node_activity
node_immun -->|"logs changes"| node_activity
node_smscontroller -.->|"sends messages"| node_sms
node_sms -.->|"submits SMS"| node_external
node_announcements -.->|"publishes push"| node_push
node_push -.->|"delivers push"| node_external
node_search -->|"queries records"| node_patientmodel
node_search -->|"queries records"| node_checkupmodel
node_search -->|"queries records"| node_immunmodel
node_search -->|"queries records"| node_maternalmodel
node_search -->|"queries users"| node_users
node_auth -->|"logs sign-in"| node_activity

click node_routes "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/routes/web.php"
click node_patients "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/PatientController.php"
click node_patientmodel "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/Patient.php"
click node_checkups "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/CheckupRecordController.php"
click node_checkupmodel "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/CheckupRecord.php"
click node_immun "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/ImmunizationRecordController.php"
click node_immunmodel "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/ImmunizationRecord.php"
click node_maternal "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/MaternalCareRecordController.php"
click node_maternalmodel "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/MaternalCareRecord.php"
click node_reminders "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Console/Commands/SendScheduledCareReminders.php"
click node_carealerts "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Notifications/CheckupFollowUpScheduled.php"
click node_announcements "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/AnnouncementController.php"
click node_push "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/AnnouncementPushService.php"
click node_sms "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/SmsService.php"
click node_smscontroller "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/SmsNotificationController.php"
click node_reports "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/ReportGeneratorService.php"
click node_archive "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/ArchiveController.php"
click node_activity "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/ActivityLogService.php"
click node_users "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/User.php"
click node_search "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/SearchSuggestionController.php"
click node_dashboard "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/DashboardController.php"
click node_notifications "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/NotificationController.php"
click node_auth "https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/Auth/LoginController.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_patients,node_patientmodel,node_checkups,node_checkupmodel,node_immun,node_immunmodel,node_maternal,node_maternalmodel,node_reminders,node_carealerts toneBlue
class node_announcements,node_push,node_sms,node_smscontroller,node_notifications toneAmber
class node_reports,node_archive,node_activity,node_users,node_search,node_dashboard toneMint
class node_routes,node_auth toneRose
class node_staff,node_external toneIndigo
```

## Components

### Patient care

- [Patient registry](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/PatientController.php): `app/Http/Controllers/PatientController.php`
- [Patient records](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/Patient.php): `app/Models/Patient.php`
- [Checkup records](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/CheckupRecordController.php): `app/Http/Controllers/CheckupRecordController.php`
- [Checkup data](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/CheckupRecord.php): `app/Models/CheckupRecord.php`
- [Immunization records](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/ImmunizationRecordController.php): `app/Http/Controllers/ImmunizationRecordController.php`
- [Immunization data](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/ImmunizationRecord.php): `app/Models/ImmunizationRecord.php`
- [Maternal care](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/MaternalCareRecordController.php): `app/Http/Controllers/MaternalCareRecordController.php`
- [Maternal care data](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/MaternalCareRecord.php): `app/Models/MaternalCareRecord.php`
- [Care reminders](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Console/Commands/SendScheduledCareReminders.php): `app/Console/Commands/SendScheduledCareReminders.php`
- [Follow-up notifications](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Notifications/CheckupFollowUpScheduled.php): `app/Notifications/CheckupFollowUpScheduled.php`

### Outreach

- [Announcements](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/AnnouncementController.php): `app/Http/Controllers/AnnouncementController.php`
- [Announcement push](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/AnnouncementPushService.php): `app/Services/AnnouncementPushService.php`
- [SMS messaging](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/SmsService.php): `app/Services/SmsService.php`
- [SMS management](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/SmsNotificationController.php): `app/Http/Controllers/SmsNotificationController.php`
- [Notifications](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/NotificationController.php): `app/Http/Controllers/NotificationController.php`

### Administration

- [Healthcare reports](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/ReportGeneratorService.php): `app/Services/ReportGeneratorService.php`
- [Record archive](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/ArchiveController.php): `app/Http/Controllers/ArchiveController.php`
- [Activity logging](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Services/ActivityLogService.php): `app/Services/ActivityLogService.php`
- [User and roles](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Models/User.php): `app/Models/User.php`
- [Record search](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/SearchSuggestionController.php): `app/Http/Controllers/SearchSuggestionController.php`
- [Dashboard](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/DashboardController.php): `app/Http/Controllers/DashboardController.php`

### Application core

- [Web routes](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/routes/web.php): `routes/web.php`
- [Staff sign-in](https://github.com/bojcpu/sanfran-healthsystem.com/blob/main/app/Http/Controllers/Auth/LoginController.php): `app/Http/Controllers/Auth/LoginController.php`

### Other components

- **Health staff**
- **SMS provider**

## Connections

- Health staff → Web routes: uses (evidence: `routes/web.php`)
- Web routes → Patient registry: routes to (evidence: `routes/web.php`)
- Web routes → Checkup records: routes to (evidence: `routes/web.php`)
- Web routes → Immunization records: routes to (evidence: `routes/web.php`)
- Web routes → Maternal care: routes to (evidence: `routes/web.php`)
- Web routes → Announcements: routes to (evidence: `routes/web.php`)
- Web routes → SMS management: routes to (evidence: `routes/web.php`)
- Web routes → Healthcare reports: routes to (evidence: `routes/web.php`)
- Web routes → Record archive: routes to (evidence: `routes/web.php`)
- Web routes → Record search: routes to (evidence: `routes/web.php`)
- Web routes → Staff sign-in: routes to (evidence: `routes/web.php`)
- Patient registry → Patient records: reads and writes
- Checkup records → Checkup data: creates records (evidence: `app/Http/Controllers/CheckupRecordController.php`)
- Checkup records → Patient records: selects patients (evidence: `app/Http/Controllers/CheckupRecordController.php`)
- Immunization records → Immunization data: manages records (evidence: `app/Http/Controllers/ImmunizationRecordController.php`)
- Immunization records → Patient records: selects patients (evidence: `app/Http/Controllers/ImmunizationRecordController.php`)
- Maternal care → Maternal care data: creates records (evidence: `app/Http/Controllers/MaternalCareRecordController.php`)
- Maternal care → Patient records: selects patients (evidence: `app/Http/Controllers/MaternalCareRecordController.php`)
- Maternal care → User and roles: notifies midwives (evidence: `app/Http/Controllers/MaternalCareRecordController.php`)
- Maternal care → Activity logging: logs changes (evidence: `app/Http/Controllers/MaternalCareRecordController.php`)
- Care reminders → Checkup data: checks schedules (evidence: `app/Console/Commands/SendScheduledCareReminders.php`)
- Care reminders → Immunization data: checks schedules (evidence: `app/Console/Commands/SendScheduledCareReminders.php`)
- Care reminders → Maternal care data: checks schedules (evidence: `app/Console/Commands/SendScheduledCareReminders.php`)
- Care reminders → Follow-up notifications: dispatches (evidence: `app/Console/Commands/SendScheduledCareReminders.php`)
- Checkup records → Activity logging: logs changes (evidence: `app/Http/Controllers/CheckupRecordController.php`)
- Immunization records → Activity logging: logs changes (evidence: `app/Http/Controllers/ImmunizationRecordController.php`)
- SMS management → SMS messaging: sends messages
- SMS messaging → SMS provider: submits SMS
- Announcements → Announcement push: publishes push
- Announcement push → SMS provider: delivers push
- Record search → Patient records: queries records (evidence: `app/Http/Controllers/SearchSuggestionController.php`)
- Record search → Checkup data: queries records (evidence: `app/Http/Controllers/SearchSuggestionController.php`)
- Record search → Immunization data: queries records (evidence: `app/Http/Controllers/SearchSuggestionController.php`)
- Record search → Maternal care data: queries records (evidence: `app/Http/Controllers/SearchSuggestionController.php`)
- Record search → User and roles: queries users (evidence: `app/Http/Controllers/SearchSuggestionController.php`)
- Staff sign-in → Activity logging: logs sign-in (evidence: `app/Http/Controllers/Auth/LoginController.php`)
