# juliabonetto/pag-tachos architecture

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

- Interactive diagram: https://gitdiagram.com/juliabonetto/pag-tachos
- Repository: https://github.com/juliabonetto/pag-tachos

## Overview

This is a CodeIgniter 4 PHP framework distribution with a small application layered on it. The app workflow is: a browser requests a tacho page or endpoint, routing dispatches to TachoController, which looks up a device and either renders a view or forwards status/manual-selection requests to FastAPI. The framework also supplies database, REST, filtering, session, cache, and CLI capabilities. App routing, controller behavior, and core module paths are supported by the tree and excerpts; links among unsampled framework services are omitted.

Main entry points: [`app/Controllers/TachoController.php`](https://github.com/juliabonetto/pag-tachos/blob/main/app/Controllers/TachoController.php) (Tacho controller), [`system/Router/Router.php`](https://github.com/juliabonetto/pag-tachos/blob/main/system/Router/Router.php) (Route dispatch), [`public/index.php`](https://github.com/juliabonetto/pag-tachos/blob/main/public/index.php) (Web entry), [`system/Boot.php`](https://github.com/juliabonetto/pag-tachos/blob/main/system/Boot.php) (Framework boot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["Request runtime"]
  node_entry["Web entry<br/>[index.php]"]
  node_boot["Framework boot<br/>[Boot.php]"]
  node_router["Route dispatch<br/>[Router.php]"]
  node_response["HTTP response<br/>[Response.php]"]
end

subgraph group_app["Tacho application"]
  node_routes["App routes<br/>[Routes.php]"]
  node_controller["Tacho controller"]
  node_view["Tacho page<br/>[tacho.php]"]
end

subgraph group_integrations["Data and integrations"]
  node_dbapi["Database API<br/>[Database.php]"]
  node_database[("Configured database")]
  node_fastapi["FastAPI service"]
end

subgraph group_framework["Framework capabilities"]
  node_filters["Request filters<br/>[Filters.php]"]
  node_rest["REST resources"]
  node_cache["Caching<br/>[CacheFactory.php]"]
  node_session["Sessions<br/>[Session.php]"]
  node_email["Email<br/>[Email.php]"]
  node_files["File handling<br/>[File.php]"]
  node_cli["CLI commands<br/>[Commands.php]"]
end

node_browser(("Browser"))

node_browser -->|"requests"| node_entry
node_entry -->|"starts"| node_boot
node_boot -->|"boots"| node_router
node_router -->|"loads routes"| node_routes
node_router -->|"dispatches"| node_controller
node_routes -->|"maps paths"| node_controller
node_controller -->|"queries device"| node_dbapi
node_dbapi -->|"reads"| node_database
node_controller -->|"renders page"| node_view
node_controller -->|"forwards requests"| node_fastapi
node_controller -->|"returns response"| node_response
node_response -->|"sends result"| node_browser

click node_entry "https://github.com/juliabonetto/pag-tachos/blob/main/public/index.php"
click node_boot "https://github.com/juliabonetto/pag-tachos/blob/main/system/Boot.php"
click node_router "https://github.com/juliabonetto/pag-tachos/blob/main/system/Router/Router.php"
click node_routes "https://github.com/juliabonetto/pag-tachos/blob/main/app/Config/Routes.php"
click node_controller "https://github.com/juliabonetto/pag-tachos/blob/main/app/Controllers/TachoController.php"
click node_view "https://github.com/juliabonetto/pag-tachos/blob/main/app/Views/tacho.php"
click node_response "https://github.com/juliabonetto/pag-tachos/blob/main/system/HTTP/Response.php"
click node_dbapi "https://github.com/juliabonetto/pag-tachos/blob/main/system/Database/Database.php"
click node_filters "https://github.com/juliabonetto/pag-tachos/blob/main/system/Filters/Filters.php"
click node_rest "https://github.com/juliabonetto/pag-tachos/blob/main/system/RESTful/ResourceController.php"
click node_cache "https://github.com/juliabonetto/pag-tachos/blob/main/system/Cache/CacheFactory.php"
click node_session "https://github.com/juliabonetto/pag-tachos/blob/main/system/Session/Session.php"
click node_email "https://github.com/juliabonetto/pag-tachos/blob/main/system/Email/Email.php"
click node_files "https://github.com/juliabonetto/pag-tachos/blob/main/system/Files/File.php"
click node_cli "https://github.com/juliabonetto/pag-tachos/blob/main/system/CLI/Commands.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_entry,node_boot,node_router,node_response,node_browser toneBlue
class node_routes,node_controller,node_view toneAmber
class node_dbapi,node_database,node_fastapi toneMint
class node_filters,node_rest,node_cache,node_session,node_email,node_files,node_cli toneRose
```

## Components

### Request runtime

- [Web entry](https://github.com/juliabonetto/pag-tachos/blob/main/public/index.php): `public/index.php`
- [Framework boot](https://github.com/juliabonetto/pag-tachos/blob/main/system/Boot.php): `system/Boot.php`
- [Route dispatch](https://github.com/juliabonetto/pag-tachos/blob/main/system/Router/Router.php): `system/Router/Router.php`
- [HTTP response](https://github.com/juliabonetto/pag-tachos/blob/main/system/HTTP/Response.php): `system/HTTP/Response.php`

### Tacho application

- [App routes](https://github.com/juliabonetto/pag-tachos/blob/main/app/Config/Routes.php): `app/Config/Routes.php`
- [Tacho controller](https://github.com/juliabonetto/pag-tachos/blob/main/app/Controllers/TachoController.php): `app/Controllers/TachoController.php`
- [Tacho page](https://github.com/juliabonetto/pag-tachos/blob/main/app/Views/tacho.php): `app/Views/tacho.php`

### Data and integrations

- [Database API](https://github.com/juliabonetto/pag-tachos/blob/main/system/Database/Database.php): `system/Database/Database.php`
- **Configured database**
- **FastAPI service**

### Framework capabilities

- [Request filters](https://github.com/juliabonetto/pag-tachos/blob/main/system/Filters/Filters.php): `system/Filters/Filters.php`
- [REST resources](https://github.com/juliabonetto/pag-tachos/blob/main/system/RESTful/ResourceController.php): `system/RESTful/ResourceController.php`
- [Caching](https://github.com/juliabonetto/pag-tachos/blob/main/system/Cache/CacheFactory.php): `system/Cache/CacheFactory.php`
- [Sessions](https://github.com/juliabonetto/pag-tachos/blob/main/system/Session/Session.php): `system/Session/Session.php`
- [Email](https://github.com/juliabonetto/pag-tachos/blob/main/system/Email/Email.php): `system/Email/Email.php`
- [File handling](https://github.com/juliabonetto/pag-tachos/blob/main/system/Files/File.php): `system/Files/File.php`
- [CLI commands](https://github.com/juliabonetto/pag-tachos/blob/main/system/CLI/Commands.php): `system/CLI/Commands.php`

### Other components

- **Browser**

## Connections

- Browser → Web entry: requests
- Web entry → Framework boot: starts
- Framework boot → Route dispatch: boots
- Route dispatch → App routes: loads routes
- Route dispatch → Tacho controller: dispatches
- App routes → Tacho controller: maps paths
- Tacho controller → Database API: queries device
- Database API → Configured database: reads
- Tacho controller → Tacho page: renders page
- Tacho controller → FastAPI service: forwards requests
- Tacho controller → HTTP response: returns response
- HTTP response → Browser: sends result
