# jhonleeemboy-ops/ite-18 architecture

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

- Interactive diagram: https://gitdiagram.com/jhonleeemboy-ops/ite-18
- Repository: https://github.com/jhonleeemboy-ops/ite-18

## Overview

Disaster Ready is a barangay disaster-response system with resident and staff portals backed by a Laravel API. Residents register or sign in, then manage household details, view evacuation guidance and advisories, and request assistance. Staff manage household profiles, evacuation-center occupancy, relief distributions, dashboard information, and SMS alerts. The API persists operational records and can send alerts through TextBee. The README documents that all pages are API-connected; several page-level calls and unsampled controller internals are not shown in the excerpts, so those links use README evidence or are omitted.

Main entry points: [`backend/routes/api.php`](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/routes/api.php) (API routing), [`backend/app/Models`](https://github.com/jhonleeemboy-ops/ite-18/tree/main/backend/app/Models) (Operational records), [`frontend/src/router.js`](https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/router.js) (Page routing), [`frontend/src/api.js`](https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Vue portals"]
  node_router["Page routing<br/>[router.js]"]
  node_login["Sign-in and registration<br/>[LoginPage.vue]"]
  node_resident_pages["Resident portal"]
  node_staff_pages["Staff workspace"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API workflows"]
  node_routes["API routing<br/>[api.php]"]
  node_auth["Authentication<br/>[AuthController.php]"]
  node_dashboard["Staff dashboard"]
  node_households["Household profiles"]
  node_family["Household members"]
  node_centers["Evacuation centers"]
  node_incidents["Assistance requests"]
  node_relief["Relief distribution"]
end

subgraph group_domain["Response records"]
  node_records[("Operational records")]
end

subgraph group_messaging["Alert delivery"]
  node_sms["SMS alert management"]
  node_sms_sender["SMS gateway sender<br/>[SmsSender.php]"]
end

node_resident(("Resident"))
node_staff(("Barangay staff"))
node_textbee{{"TextBee gateway"}}

node_resident -->|"opens portal"| node_router
node_staff -->|"opens workspace"| node_router
node_router -->|"routes to"| node_login
node_router -->|"routes to"| node_resident_pages
node_router -->|"routes to"| node_staff_pages
node_login -->|"uses"| node_api_client
node_resident_pages -->|"uses API"| node_api_client
node_staff_pages -->|"uses API"| node_api_client
node_api_client -->|"requests API"| node_routes
node_routes -->|"dispatches"| node_auth
node_routes -->|"dispatches"| node_dashboard
node_routes -->|"dispatches"| node_households
node_routes -->|"dispatches"| node_family
node_routes -->|"dispatches"| node_centers
node_routes -->|"dispatches"| node_incidents
node_routes -->|"dispatches"| node_relief
node_routes -->|"dispatches"| node_sms
node_auth -->|"reads and writes"| node_records
node_households -->|"reads and writes"| node_records
node_family -->|"reads and writes"| node_records
node_centers -->|"reads and writes"| node_records
node_incidents -->|"reads and writes"| node_records
node_relief -->|"reads and writes"| node_records
node_sms -->|"reads and writes"| node_records
node_sms -->|"sends alert"| node_sms_sender
node_sms_sender -.->|"delivers SMS"| node_textbee

click node_router "https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/router.js"
click node_login "https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/pages/LoginPage.vue"
click node_resident_pages "https://github.com/jhonleeemboy-ops/ite-18/tree/main/frontend/src/pages/resident"
click node_staff_pages "https://github.com/jhonleeemboy-ops/ite-18/tree/main/frontend/src/pages/staff"
click node_api_client "https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/api.js"
click node_routes "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/routes/api.php"
click node_auth "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/AuthController.php"
click node_dashboard "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/DashboardController.php"
click node_households "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/HouseholdController.php"
click node_family "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/HouseholdMemberController.php"
click node_centers "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/EvacuationCenterController.php"
click node_incidents "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/IncidentController.php"
click node_relief "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/ReliefController.php"
click node_sms "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/SmsAlertController.php"
click node_records "https://github.com/jhonleeemboy-ops/ite-18/tree/main/backend/app/Models"
click node_sms_sender "https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Services/SmsSender.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_router,node_login,node_resident_pages,node_staff_pages,node_api_client toneBlue
class node_routes,node_auth,node_dashboard,node_households,node_family,node_centers,node_incidents,node_relief toneAmber
class node_records toneMint
class node_sms,node_sms_sender toneRose
class node_resident,node_staff,node_textbee toneIndigo
```

## Components

### Vue portals

- [Page routing](https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/router.js): `frontend/src/router.js`
- [Sign-in and registration](https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/pages/LoginPage.vue): `frontend/src/pages/LoginPage.vue`
- [Resident portal](https://github.com/jhonleeemboy-ops/ite-18/tree/main/frontend/src/pages/resident): `frontend/src/pages/resident`
- [Staff workspace](https://github.com/jhonleeemboy-ops/ite-18/tree/main/frontend/src/pages/staff): `frontend/src/pages/staff`
- [API client](https://github.com/jhonleeemboy-ops/ite-18/blob/main/frontend/src/api.js): `frontend/src/api.js`

### API workflows

- [API routing](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [Authentication](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/AuthController.php): `backend/app/Http/Controllers/AuthController.php`
- [Staff dashboard](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/DashboardController.php): `backend/app/Http/Controllers/DashboardController.php`
- [Household profiles](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/HouseholdController.php): `backend/app/Http/Controllers/HouseholdController.php`
- [Household members](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/HouseholdMemberController.php): `backend/app/Http/Controllers/HouseholdMemberController.php`
- [Evacuation centers](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/EvacuationCenterController.php): `backend/app/Http/Controllers/EvacuationCenterController.php`
- [Assistance requests](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/IncidentController.php): `backend/app/Http/Controllers/IncidentController.php`
- [Relief distribution](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/ReliefController.php): `backend/app/Http/Controllers/ReliefController.php`

### Response records

- [Operational records](https://github.com/jhonleeemboy-ops/ite-18/tree/main/backend/app/Models): `backend/app/Models`

### Alert delivery

- [SMS alert management](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Http/Controllers/SmsAlertController.php): `backend/app/Http/Controllers/SmsAlertController.php`
- [SMS gateway sender](https://github.com/jhonleeemboy-ops/ite-18/blob/main/backend/app/Services/SmsSender.php): `backend/app/Services/SmsSender.php`

### Other components

- **Resident**
- **Barangay staff**
- **TextBee gateway**

## Connections

- Resident → Page routing: opens portal (evidence: `README.md`)
- Barangay staff → Page routing: opens workspace (evidence: `README.md`)
- Page routing → Sign-in and registration: routes to (evidence: `frontend/src/router.js`)
- Page routing → Resident portal: routes to (evidence: `frontend/src/router.js`)
- Page routing → Staff workspace: routes to (evidence: `frontend/src/router.js`)
- Sign-in and registration → API client: uses (evidence: `frontend/src/pages/LoginPage.vue`)
- Resident portal → API client: uses API (evidence: `README.md`)
- Staff workspace → API client: uses API (evidence: `README.md`)
- API client → API routing: requests API (evidence: `README.md`)
- API routing → Authentication: dispatches (evidence: `backend/routes/api.php`)
- API routing → Staff dashboard: dispatches (evidence: `backend/routes/api.php`)
- API routing → Household profiles: dispatches (evidence: `backend/routes/api.php`)
- API routing → Household members: dispatches (evidence: `backend/routes/api.php`)
- API routing → Evacuation centers: dispatches (evidence: `backend/routes/api.php`)
- API routing → Assistance requests: dispatches (evidence: `backend/routes/api.php`)
- API routing → Relief distribution: dispatches (evidence: `backend/routes/api.php`)
- API routing → SMS alert management: dispatches (evidence: `backend/routes/api.php`)
- Authentication → Operational records: reads and writes (evidence: `backend/app/Http/Controllers/AuthController.php`)
- Household profiles → Operational records: reads and writes (evidence: `backend/app/Http/Controllers/HouseholdController.php`)
- Household members → Operational records: reads and writes (evidence: `backend/app/Http/Controllers/HouseholdMemberController.php`)
- Evacuation centers → Operational records: reads and writes (evidence: `backend/app/Http/Controllers/EvacuationCenterController.php`)
- Assistance requests → Operational records: reads and writes (evidence: `backend/app/Http/Controllers/IncidentController.php`)
- Relief distribution → Operational records: reads and writes (evidence: `backend/app/Http/Controllers/ReliefController.php`)
- SMS alert management → Operational records: reads and writes (evidence: `backend/app/Http/Controllers/SmsAlertController.php`)
- SMS alert management → SMS gateway sender: sends alert (evidence: `backend/app/Http/Controllers/SmsAlertController.php`)
- SMS gateway sender → TextBee gateway: delivers SMS (evidence: `README.md`)
