# glnngeo/ims-indorsement architecture

> Architecture diagram of the GitHub repository glnngeo/ims-indorsement, 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/glnngeo/ims-indorsement
- Repository: https://github.com/glnngeo/ims-indorsement

## Overview

DOH-CARAGA IMS supports the Supply Unit’s inventory workflow: users encode purchase orders, inspect incoming and outgoing materials, record issuances, and monitor stock through reports, stockcards, and archived transactions. The repository separates these business areas into PHP pages and handlers, with shared authentication, database, configuration, and reference-data modules. The README establishes the product capabilities, and sampled pages confirm session-gated dashboard access and the separate property-custodian interface. Most business handlers were not sampled, so their specific calls and data flow are not asserted.

Main entry points: [`login.php`](https://github.com/glnngeo/ims-indorsement/blob/main/login.php) (Sign-in), [`index.php`](https://github.com/glnngeo/ims-indorsement/blob/main/index.php) (Dashboard), [`php/php_db.php`](https://github.com/glnngeo/ims-indorsement/blob/main/php/php_db.php) (Database access), [`po.php`](https://github.com/glnngeo/ims-indorsement/blob/main/po.php) (Purchase orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Administration"]
  node_login["Sign-in<br/>[login.php]"]
  node_dashboard["Dashboard<br/>[index.php]"]
  node_admin["User administration<br/>[index.php]"]
  node_config["Organization settings<br/>[index.php]"]
end

subgraph group_transactions["Supply Transactions"]
  node_po["Purchase orders<br/>[po.php]"]
  node_inspection["Inspection records<br/>[inspectors.php]"]
  node_supply["Supply records<br/>[iar.php]"]
  node_issuance["Issuance records<br/>[ris.php]"]
  node_gatepass["Gate passes<br/>[gatepass.php]"]
end

subgraph group_oversight["Inventory Oversight"]
  node_stockcard["Stockcard<br/>[stockcard.php]"]
  node_reports["Reports<br/>[report_sai.php]"]
  node_archives["Transaction archive<br/>[archives.php]"]
  node_pptctd["Property tracking<br/>[main.php]"]
end

subgraph group_shared["Shared Services"]
  node_references["Reference tables<br/>[item.php]"]
  node_db["Database access<br/>[php_db.php]"]
  node_auth["Authentication handlers<br/>[php_login.php]"]
end

node_staff(("Supply staff"))
node_mysql[("MySQL database")]

node_staff -->|"signs in"| node_login
node_staff -->|"encodes orders"| node_po
node_staff -->|"records inspections"| node_inspection
node_staff -->|"records receipts"| node_supply
node_staff -->|"records issues"| node_issuance
node_staff -->|"checks stock"| node_stockcard
node_staff -->|"reviews reports"| node_reports
node_staff -->|"reviews history"| node_archives
node_staff -->|"tracks property"| node_pptctd
node_dashboard -->|"redirects unauthenticated"| node_login
node_db -->|"database access"| node_mysql

click node_login "https://github.com/glnngeo/ims-indorsement/blob/main/login.php"
click node_dashboard "https://github.com/glnngeo/ims-indorsement/blob/main/index.php"
click node_admin "https://github.com/glnngeo/ims-indorsement/blob/main/the_admin/index.php"
click node_config "https://github.com/glnngeo/ims-indorsement/blob/main/config/index.php"
click node_po "https://github.com/glnngeo/ims-indorsement/blob/main/po.php"
click node_inspection "https://github.com/glnngeo/ims-indorsement/blob/main/inspectors.php"
click node_supply "https://github.com/glnngeo/ims-indorsement/blob/main/supply_records/iar.php"
click node_issuance "https://github.com/glnngeo/ims-indorsement/blob/main/supply_records/ris.php"
click node_gatepass "https://github.com/glnngeo/ims-indorsement/blob/main/supply_records/gatepass.php"
click node_stockcard "https://github.com/glnngeo/ims-indorsement/blob/main/stockcard.php"
click node_reports "https://github.com/glnngeo/ims-indorsement/blob/main/reports/report_sai.php"
click node_archives "https://github.com/glnngeo/ims-indorsement/blob/main/archives.php"
click node_pptctd "https://github.com/glnngeo/ims-indorsement/blob/main/pptctd/main.php"
click node_references "https://github.com/glnngeo/ims-indorsement/blob/main/reference_tables/item.php"
click node_db "https://github.com/glnngeo/ims-indorsement/blob/main/php/php_db.php"
click node_auth "https://github.com/glnngeo/ims-indorsement/blob/main/php/php_login.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_login,node_dashboard,node_admin,node_config toneBlue
class node_po,node_inspection,node_supply,node_issuance,node_gatepass,node_mysql toneAmber
class node_stockcard,node_reports,node_archives,node_pptctd toneMint
class node_references,node_db,node_auth toneRose
class node_staff toneIndigo
```

## Components

### Access and Administration

- [Sign-in](https://github.com/glnngeo/ims-indorsement/blob/main/login.php): `login.php`
- [Dashboard](https://github.com/glnngeo/ims-indorsement/blob/main/index.php): `index.php`
- [User administration](https://github.com/glnngeo/ims-indorsement/blob/main/the_admin/index.php): `the_admin/index.php`
- [Organization settings](https://github.com/glnngeo/ims-indorsement/blob/main/config/index.php): `config/index.php`

### Supply Transactions

- [Purchase orders](https://github.com/glnngeo/ims-indorsement/blob/main/po.php): `po.php`
- [Inspection records](https://github.com/glnngeo/ims-indorsement/blob/main/inspectors.php): `inspectors.php`
- [Supply records](https://github.com/glnngeo/ims-indorsement/blob/main/supply_records/iar.php): `supply_records/iar.php`
- [Issuance records](https://github.com/glnngeo/ims-indorsement/blob/main/supply_records/ris.php): `supply_records/ris.php`
- [Gate passes](https://github.com/glnngeo/ims-indorsement/blob/main/supply_records/gatepass.php): `supply_records/gatepass.php`

### Inventory Oversight

- [Stockcard](https://github.com/glnngeo/ims-indorsement/blob/main/stockcard.php): `stockcard.php`
- [Reports](https://github.com/glnngeo/ims-indorsement/blob/main/reports/report_sai.php): `reports/report_sai.php`
- [Transaction archive](https://github.com/glnngeo/ims-indorsement/blob/main/archives.php): `archives.php`
- [Property tracking](https://github.com/glnngeo/ims-indorsement/blob/main/pptctd/main.php): `pptctd/main.php`

### Shared Services

- [Reference tables](https://github.com/glnngeo/ims-indorsement/blob/main/reference_tables/item.php): `reference_tables/item.php`
- [Database access](https://github.com/glnngeo/ims-indorsement/blob/main/php/php_db.php): `php/php_db.php`
- [Authentication handlers](https://github.com/glnngeo/ims-indorsement/blob/main/php/php_login.php): `php/php_login.php`

### Other components

- **Supply staff**
- **MySQL database**

## Connections

- Supply staff → Sign-in: signs in
- Supply staff → Purchase orders: encodes orders
- Supply staff → Inspection records: records inspections
- Supply staff → Supply records: records receipts
- Supply staff → Issuance records: records issues
- Supply staff → Stockcard: checks stock
- Supply staff → Reports: reviews reports
- Supply staff → Transaction archive: reviews history
- Supply staff → Property tracking: tracks property
- Dashboard → Sign-in: redirects unauthenticated
- Database access → MySQL database: database access
