# infoserve-services/infoserve architecture

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

- Interactive diagram: https://gitdiagram.com/infoserve-services/infoserve
- Repository: https://github.com/infoserve-services/infoserve

## Overview

InfoServe is a PHP/MySQL barangay-services portal with resident and staff-facing modules. A resident enters the services area, where session and age-based settings govern access to offerings such as DRRM information, health services, and KP services; staff use separate CIMS, BOGS, HCS, and SK work areas. The tree also shows document and ID requests, health consultations and inventory, community-service requests, and SK budgeting. Evidence is limited to the README, file tree, and sampled excerpts, so unsampled module links are omitted rather than inferred.

Main entry points: [`admin/bogs/bogs_services.php`](https://github.com/infoserve-services/infoserve/blob/main/admin/bogs/bogs_services.php) (BOGS portal), [`client/gen_services.php`](https://github.com/infoserve-services/infoserve/blob/main/client/gen_services.php) (Services access), [`admin/cims/cims_services.php`](https://github.com/infoserve-services/infoserve/blob/main/admin/cims/cims_services.php) (CIMS portal), [`admin/hcs/hcs_services.php`](https://github.com/infoserve-services/infoserve/blob/main/admin/hcs/hcs_services.php) (HCS portal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_resident["Resident services"]
  node_resident_services["Services access<br/>[gen_services.php]"]
  node_drrm["DRRM learning"]
  node_resident_health["Health services"]
  node_kp_portal["KP services"]
end

subgraph group_cims["Citizen services"]
  node_cims_services["CIMS portal<br/>[cims_services.php]"]
  node_household["Household registry"]
  node_cims_requests["Document and ID requests"]
end

subgraph group_bogs["Barangay operations"]
  node_bogs_services["BOGS portal<br/>[bogs_services.php]"]
  node_kp_cases["KP case handling"]
  node_drrm_admin["DRRM resources"]
  node_facilities["Facilities and resources"]
  node_announcements["Announcements"]
end

subgraph group_hcs["Health services"]
  node_hcs_services["HCS portal<br/>[hcs_services.php]"]
  node_consultations["Health consultations"]
  node_health_inventory["Medical inventory"]
  node_community_requests["Community requests<br/>[comm_services.php]"]
  node_pio_requests["PIO requests"]
end

subgraph group_sk["SK and shared API"]
  node_sk_budget["SK budget workspace<br/>[sk_budget.php]"]
  node_sk_api["SK budget operations"]
  node_session_manager["Session management<br/>[SessionManager.php]"]
  node_db_config["Database connection<br/>[db.php]"]
  node_database[("MySQL database")]
end

node_resident_actor(("Resident"))
node_admin_actor(("Staff"))

node_resident_actor -.->|"opens"| node_resident_services
node_resident_services -->|"links to"| node_drrm
node_resident_services -->|"links to"| node_resident_health
node_resident_services -->|"links to"| node_kp_portal
node_admin_actor -.->|"opens"| node_cims_services
node_admin_actor -.->|"opens"| node_bogs_services
node_admin_actor -.->|"opens"| node_hcs_services
node_cims_services -->|"links to"| node_cims_requests
node_cims_services -->|"links to"| node_bogs_services
node_cims_services -->|"links to"| node_hcs_services
node_bogs_services -.->|"links to"| node_kp_cases
node_bogs_services -.->|"links to"| node_drrm_admin
node_bogs_services -.->|"links to"| node_facilities
node_hcs_services -.->|"links to"| node_consultations
node_hcs_services -.->|"links to"| node_health_inventory
node_community_requests -->|"queries"| node_db_config
node_pio_requests -->|"queries"| node_db_config
node_household -->|"queries"| node_db_config
node_db_config -->|"connects"| node_database
node_sk_budget -->|"uses"| node_sk_api
node_sk_budget -->|"connects"| node_database

click node_resident_services "https://github.com/infoserve-services/infoserve/blob/main/client/gen_services.php"
click node_drrm "https://github.com/infoserve-services/infoserve/tree/main/client/bogs/drrm"
click node_resident_health "https://github.com/infoserve-services/infoserve/blob/main/client/hcs/hcs_health_services.php"
click node_kp_portal "https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/KP"
click node_cims_services "https://github.com/infoserve-services/infoserve/blob/main/admin/cims/cims_services.php"
click node_household "https://github.com/infoserve-services/infoserve/blob/main/admin/cims/views/add_household_view.php"
click node_cims_requests "https://github.com/infoserve-services/infoserve/tree/main/admin/cims"
click node_bogs_services "https://github.com/infoserve-services/infoserve/blob/main/admin/bogs/bogs_services.php"
click node_kp_cases "https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/KP"
click node_drrm_admin "https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/drrm"
click node_facilities "https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/fr"
click node_announcements "https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/announcement"
click node_hcs_services "https://github.com/infoserve-services/infoserve/blob/main/admin/hcs/hcs_services.php"
click node_consultations "https://github.com/infoserve-services/infoserve/tree/main/admin/hcs/bhw"
click node_health_inventory "https://github.com/infoserve-services/infoserve/tree/main/admin/hcs/bhw"
click node_community_requests "https://github.com/infoserve-services/infoserve/blob/main/client/hcs/comm_services.php"
click node_pio_requests "https://github.com/infoserve-services/infoserve/tree/main/admin/hcs/pio"
click node_sk_budget "https://github.com/infoserve-services/infoserve/blob/main/views/users/sk_budget.php"
click node_sk_api "https://github.com/infoserve-services/infoserve/tree/main/api/functions"
click node_session_manager "https://github.com/infoserve-services/infoserve/blob/main/api/functions/SessionManager.php"
click node_db_config "https://github.com/infoserve-services/infoserve/blob/main/controller/config/db.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_resident_services,node_drrm,node_resident_health,node_kp_portal toneBlue
class node_cims_services,node_household,node_cims_requests toneAmber
class node_bogs_services,node_kp_cases,node_drrm_admin,node_facilities,node_announcements toneMint
class node_hcs_services,node_consultations,node_health_inventory,node_community_requests,node_pio_requests toneRose
class node_sk_budget,node_sk_api,node_session_manager,node_db_config,node_database,node_resident_actor,node_admin_actor toneIndigo
```

## Components

### Resident services

- [Services access](https://github.com/infoserve-services/infoserve/blob/main/client/gen_services.php): `client/gen_services.php`
- [DRRM learning](https://github.com/infoserve-services/infoserve/tree/main/client/bogs/drrm): `client/bogs/drrm`
- [Health services](https://github.com/infoserve-services/infoserve/blob/main/client/hcs/hcs_health_services.php): `client/hcs/hcs_health_services.php`
- [KP services](https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/KP): `admin/bogs/KP`

### Citizen services

- [CIMS portal](https://github.com/infoserve-services/infoserve/blob/main/admin/cims/cims_services.php): `admin/cims/cims_services.php`
- [Household registry](https://github.com/infoserve-services/infoserve/blob/main/admin/cims/views/add_household_view.php): `admin/cims/views/add_household_view.php`
- [Document and ID requests](https://github.com/infoserve-services/infoserve/tree/main/admin/cims): `admin/cims`

### Barangay operations

- [BOGS portal](https://github.com/infoserve-services/infoserve/blob/main/admin/bogs/bogs_services.php): `admin/bogs/bogs_services.php`
- [KP case handling](https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/KP): `admin/bogs/KP`
- [DRRM resources](https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/drrm): `admin/bogs/drrm`
- [Facilities and resources](https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/fr): `admin/bogs/fr`
- [Announcements](https://github.com/infoserve-services/infoserve/tree/main/admin/bogs/announcement): `admin/bogs/announcement`

### Health services

- [HCS portal](https://github.com/infoserve-services/infoserve/blob/main/admin/hcs/hcs_services.php): `admin/hcs/hcs_services.php`
- [Health consultations](https://github.com/infoserve-services/infoserve/tree/main/admin/hcs/bhw): `admin/hcs/bhw`
- [Medical inventory](https://github.com/infoserve-services/infoserve/tree/main/admin/hcs/bhw): `admin/hcs/bhw`
- [Community requests](https://github.com/infoserve-services/infoserve/blob/main/client/hcs/comm_services.php): `client/hcs/comm_services.php`
- [PIO requests](https://github.com/infoserve-services/infoserve/tree/main/admin/hcs/pio): `admin/hcs/pio`

### SK and shared API

- [SK budget workspace](https://github.com/infoserve-services/infoserve/blob/main/views/users/sk_budget.php): `views/users/sk_budget.php`
- [SK budget operations](https://github.com/infoserve-services/infoserve/tree/main/api/functions): `api/functions`
- [Session management](https://github.com/infoserve-services/infoserve/blob/main/api/functions/SessionManager.php): `api/functions/SessionManager.php`
- [Database connection](https://github.com/infoserve-services/infoserve/blob/main/controller/config/db.php): `controller/config/db.php`
- **MySQL database**

### Other components

- **Resident**
- **Staff**

## Connections

- Resident → Services access: opens
- Services access → DRRM learning: links to (evidence: `client/gen_services.php`)
- Services access → Health services: links to (evidence: `client/gen_services.php`)
- Services access → KP services: links to (evidence: `client/gen_services.php`)
- Staff → CIMS portal: opens
- Staff → BOGS portal: opens
- Staff → HCS portal: opens
- CIMS portal → Document and ID requests: links to (evidence: `admin/cims/cims_services.php`)
- CIMS portal → BOGS portal: links to (evidence: `admin/cims/cims_services.php`)
- CIMS portal → HCS portal: links to (evidence: `admin/cims/cims_services.php`)
- BOGS portal → KP case handling: links to
- BOGS portal → DRRM resources: links to
- BOGS portal → Facilities and resources: links to
- HCS portal → Health consultations: links to
- HCS portal → Medical inventory: links to
- Community requests → Database connection: queries (evidence: `client/hcs/comm_services.php`)
- PIO requests → Database connection: queries (evidence: `admin/hcs/pio/fetch_service_request_trends.php`)
- Household registry → Database connection: queries (evidence: `admin/cims/views/add_household_view.php`)
- Database connection → MySQL database: connects (evidence: `controller/config/db.php`)
- SK budget workspace → SK budget operations: uses (evidence: `views/users/sk_budget.php`)
- SK budget workspace → MySQL database: connects (evidence: `views/users/sk_budget.php`)
