# arthurprost/assetflow_php architecture

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

- Interactive diagram: https://gitdiagram.com/arthurprost/assetflow_php
- Repository: https://github.com/arthurprost/assetflow_php

## Overview

AssetFlow is a vanilla PHP asset-management portal. The visible workflow is a user request routed through the front controller to a controller, which loads asset data and renders a view within the shared layout. The README describes broader lifecycle, maintenance, reporting, overdue-alert and access-control modules, but the sampled runtime only exposes the dashboard, inventory listing and assignment form. Those broader capabilities are shown as documented scope, not as verified implemented flows; the schema and database wiring are documented and partly visible.

Main entry points: [`public/index.php`](https://github.com/arthurprost/assetflow_php/blob/main/public/index.php) (Front controller), [`app/Controllers/HomeController.php`](https://github.com/arthurprost/assetflow_php/blob/main/app/Controllers/HomeController.php) (Home controller), [`app/Controllers/BaseController.php`](https://github.com/arthurprost/assetflow_php/blob/main/app/Controllers/BaseController.php) (View renderer), [`app/Models/Asset.php`](https://github.com/arthurprost/assetflow_php/blob/main/app/Models/Asset.php) (Asset queries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and presentation"]
  node_front["Front controller<br/>[index.php]"]
  node_home["Home controller<br/>[HomeController.php]"]
  node_render["View renderer<br/>[BaseController.php]"]
  node_dashboard["Module dashboard<br/>[index.php]"]
  node_inventory["Inventory view<br/>[index.php]"]
  node_assignment["Assignment form<br/>[index.php]"]
  node_header["Page header<br/>[header.php]"]
  node_footer["Page footer<br/>[footer.php]"]
end

subgraph group_domain["Asset operations"]
  node_assetmodel["Asset queries<br/>[Asset.php]"]
  node_basemodel["Model base<br/>[BaseModel.php]"]
end

subgraph group_infrastructure["Configuration and persistence"]
  node_config["App configuration<br/>[config.php]"]
  node_dbconn["PDO connection<br/>[database.php]"]
  node_mysql[("MySQL database")]
  node_schema["Relational schema<br/>[00_init_schema.sql]"]
end

subgraph group_scope["Documented capabilities"]
  node_catalog["Catalog and search"]
  node_lifecycle["Assignments and returns"]
  node_maintenance["Maintenance and repairs"]
  node_reporting["Dashboard and audit"]
  node_alerts["Overdue alerts"]
  node_access["Profiles and rights"]
end

node_user(("DSI user"))

node_user -->|"requests page"| node_front
node_front -->|"routes request"| node_home
node_home -->|"loads assets"| node_assetmodel
node_home -->|"renders views"| node_render
node_assetmodel -->|"inherits"| node_basemodel
node_basemodel -->|"gets PDO"| node_dbconn
node_assetmodel -->|"queries"| node_mysql
node_dbconn -->|"connects"| node_mysql
node_front -->|"loads settings"| node_config
node_front -->|"loads connection"| node_dbconn
node_home -->|"renders"| node_dashboard
node_home -->|"renders"| node_inventory
node_home -->|"renders"| node_assignment
node_render -->|"includes"| node_header
node_render -->|"includes"| node_footer
node_front -->|"includes errors"| node_header
node_front -->|"includes errors"| node_footer
node_schema -->|"defines tables"| node_mysql
node_user -->|"uses modules"| node_catalog
node_user -->|"uses modules"| node_lifecycle
node_user -->|"uses modules"| node_maintenance
node_user -->|"uses modules"| node_reporting
node_user -->|"uses modules"| node_alerts
node_user -->|"uses modules"| node_access

click node_front "https://github.com/arthurprost/assetflow_php/blob/main/public/index.php"
click node_home "https://github.com/arthurprost/assetflow_php/blob/main/app/Controllers/HomeController.php"
click node_render "https://github.com/arthurprost/assetflow_php/blob/main/app/Controllers/BaseController.php"
click node_dashboard "https://github.com/arthurprost/assetflow_php/blob/main/app/Views/home/index.php"
click node_inventory "https://github.com/arthurprost/assetflow_php/blob/main/app/Views/assets/index.php"
click node_assignment "https://github.com/arthurprost/assetflow_php/blob/main/app/Views/formAddAssignment/index.php"
click node_header "https://github.com/arthurprost/assetflow_php/blob/main/app/Views/layouts/header.php"
click node_footer "https://github.com/arthurprost/assetflow_php/blob/main/app/Views/layouts/footer.php"
click node_assetmodel "https://github.com/arthurprost/assetflow_php/blob/main/app/Models/Asset.php"
click node_basemodel "https://github.com/arthurprost/assetflow_php/blob/main/app/Models/BaseModel.php"
click node_config "https://github.com/arthurprost/assetflow_php/blob/main/config/config.php"
click node_dbconn "https://github.com/arthurprost/assetflow_php/blob/main/config/database.php"
click node_schema "https://github.com/arthurprost/assetflow_php/blob/main/sql/00_init_schema.sql"
click node_catalog "https://github.com/arthurprost/assetflow_php/tree/main/app"
click node_lifecycle "https://github.com/arthurprost/assetflow_php/tree/main/app"
click node_maintenance "https://github.com/arthurprost/assetflow_php/tree/main/app"
click node_reporting "https://github.com/arthurprost/assetflow_php/tree/main/app"
click node_alerts "https://github.com/arthurprost/assetflow_php/tree/main/app"
click node_access "https://github.com/arthurprost/assetflow_php/tree/main/app"

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_front,node_home,node_render,node_dashboard,node_inventory,node_assignment,node_header,node_footer,node_user toneBlue
class node_assetmodel,node_basemodel toneAmber
class node_config,node_dbconn,node_mysql,node_schema toneMint
class node_catalog,node_lifecycle,node_maintenance,node_reporting,node_alerts,node_access toneRose
```

## Components

### Web entry and presentation

- [Front controller](https://github.com/arthurprost/assetflow_php/blob/main/public/index.php): `public/index.php`
- [Home controller](https://github.com/arthurprost/assetflow_php/blob/main/app/Controllers/HomeController.php): `app/Controllers/HomeController.php`
- [View renderer](https://github.com/arthurprost/assetflow_php/blob/main/app/Controllers/BaseController.php): `app/Controllers/BaseController.php`
- [Module dashboard](https://github.com/arthurprost/assetflow_php/blob/main/app/Views/home/index.php): `app/Views/home/index.php`
- [Inventory view](https://github.com/arthurprost/assetflow_php/blob/main/app/Views/assets/index.php): `app/Views/assets/index.php`
- [Assignment form](https://github.com/arthurprost/assetflow_php/blob/main/app/Views/formAddAssignment/index.php): `app/Views/formAddAssignment/index.php`
- [Page header](https://github.com/arthurprost/assetflow_php/blob/main/app/Views/layouts/header.php): `app/Views/layouts/header.php`
- [Page footer](https://github.com/arthurprost/assetflow_php/blob/main/app/Views/layouts/footer.php): `app/Views/layouts/footer.php`

### Asset operations

- [Asset queries](https://github.com/arthurprost/assetflow_php/blob/main/app/Models/Asset.php): `app/Models/Asset.php`
- [Model base](https://github.com/arthurprost/assetflow_php/blob/main/app/Models/BaseModel.php): `app/Models/BaseModel.php`

### Configuration and persistence

- [App configuration](https://github.com/arthurprost/assetflow_php/blob/main/config/config.php): `config/config.php`
- [PDO connection](https://github.com/arthurprost/assetflow_php/blob/main/config/database.php): `config/database.php`
- **MySQL database**
- [Relational schema](https://github.com/arthurprost/assetflow_php/blob/main/sql/00_init_schema.sql): `sql/00_init_schema.sql`

### Documented capabilities

- [Catalog and search](https://github.com/arthurprost/assetflow_php/tree/main/app): `app`
- [Assignments and returns](https://github.com/arthurprost/assetflow_php/tree/main/app): `app`
- [Maintenance and repairs](https://github.com/arthurprost/assetflow_php/tree/main/app): `app`
- [Dashboard and audit](https://github.com/arthurprost/assetflow_php/tree/main/app): `app`
- [Overdue alerts](https://github.com/arthurprost/assetflow_php/tree/main/app): `app`
- [Profiles and rights](https://github.com/arthurprost/assetflow_php/tree/main/app): `app`

### Other components

- **DSI user**

## Connections

- DSI user → Front controller: requests page (evidence: `public/index.php`)
- Front controller → Home controller: routes request (evidence: `public/index.php`)
- Home controller → Asset queries: loads assets (evidence: `app/Controllers/HomeController.php`)
- Home controller → View renderer: renders views (evidence: `app/Controllers/HomeController.php`)
- Asset queries → Model base: inherits (evidence: `app/Models/Asset.php`)
- Model base → PDO connection: gets PDO (evidence: `app/Models/BaseModel.php`)
- Asset queries → MySQL database: queries (evidence: `app/Models/Asset.php`)
- PDO connection → MySQL database: connects (evidence: `config/database.php`)
- Front controller → App configuration: loads settings (evidence: `public/index.php`)
- Front controller → PDO connection: loads connection (evidence: `public/index.php`)
- Home controller → Module dashboard: renders (evidence: `app/Controllers/HomeController.php`)
- Home controller → Inventory view: renders (evidence: `app/Controllers/HomeController.php`)
- Home controller → Assignment form: renders (evidence: `app/Controllers/HomeController.php`)
- View renderer → Page header: includes (evidence: `app/Controllers/BaseController.php`)
- View renderer → Page footer: includes (evidence: `app/Controllers/BaseController.php`)
- Front controller → Page header: includes errors (evidence: `public/index.php`)
- Front controller → Page footer: includes errors (evidence: `public/index.php`)
- Relational schema → MySQL database: defines tables (evidence: `README.md`)
- DSI user → Catalog and search: uses modules (evidence: `README.md`)
- DSI user → Assignments and returns: uses modules (evidence: `README.md`)
- DSI user → Maintenance and repairs: uses modules (evidence: `README.md`)
- DSI user → Dashboard and audit: uses modules (evidence: `README.md`)
- DSI user → Overdue alerts: uses modules (evidence: `README.md`)
- DSI user → Profiles and rights: uses modules (evidence: `README.md`)
