# senoukomigodwin/patria architecture

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

- Interactive diagram: https://gitdiagram.com/senoukomigodwin/patria
- Repository: https://github.com/senoukomigodwin/patria

## Overview

PATRIA is a public-asset management platform: users enter through a Laravel frontend, and the Nginx gateway routes API requests to six independently scoped services. The documented domain stages are authentication, asset management, movement tracking, inventory campaigns, maintenance, and reporting/exports. Each service has an isolated PostgreSQL database; the README describes UUID/REST communication and locally validated shared JWTs. The supplied tree contains Laravel skeletons and API route files, but not the gateway configuration or domain implementations, so service behavior and persistence links are documented rather than source-verified.

Main entry points: [`frontend/resources/views/welcome.blade.php`](https://github.com/senoukomigodwin/patria/blob/main/frontend/resources/views/welcome.blade.php) (Laravel frontend), [`services/asset-service/routes/api.php`](https://github.com/senoukomigodwin/patria/blob/main/services/asset-service/routes/api.php) (Asset catalog), [`services/movement-service/routes/api.php`](https://github.com/senoukomigodwin/patria/blob/main/services/movement-service/routes/api.php) (Movement tracking), [`services/inventory-service/routes/api.php`](https://github.com/senoukomigodwin/patria/blob/main/services/inventory-service/routes/api.php) (Inventory campaigns)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["User interface"]
  node_frontend["Laravel frontend<br/>[welcome.blade.php]"]
  node_gateway["Nginx gateway"]
end

subgraph group_operations["Asset operations"]
  node_assets["Asset catalog<br/>[api.php]"]
  node_movement["Movement tracking<br/>[api.php]"]
  node_inventory["Inventory campaigns<br/>[api.php]"]
  node_maintenance["Maintenance<br/>[api.php]"]
end

subgraph group_identity_reporting["Identity and reporting"]
  node_auth["Authentication<br/>[api.php]"]
  node_reporting["Reports and exports<br/>[api.php]"]
end

subgraph group_data["Service data"]
  node_postgres[("PostgreSQL databases")]
end

node_user(("User"))

node_user -->|"uses"| node_frontend
node_frontend -->|"sends requests"| node_gateway
node_gateway -->|"routes auth"| node_auth
node_gateway -->|"routes assets"| node_assets
node_gateway -->|"routes movements"| node_movement
node_gateway -->|"routes campaigns"| node_inventory
node_gateway -->|"routes interventions"| node_maintenance
node_gateway -->|"routes reports"| node_reporting
node_auth -.->|"stores data"| node_postgres
node_assets -.->|"stores data"| node_postgres
node_movement -.->|"stores data"| node_postgres
node_inventory -.->|"stores data"| node_postgres
node_maintenance -.->|"stores data"| node_postgres
node_reporting -.->|"stores data"| node_postgres

click node_frontend "https://github.com/senoukomigodwin/patria/blob/main/frontend/resources/views/welcome.blade.php"
click node_auth "https://github.com/senoukomigodwin/patria/blob/main/services/auth-service/routes/api.php"
click node_assets "https://github.com/senoukomigodwin/patria/blob/main/services/asset-service/routes/api.php"
click node_movement "https://github.com/senoukomigodwin/patria/blob/main/services/movement-service/routes/api.php"
click node_inventory "https://github.com/senoukomigodwin/patria/blob/main/services/inventory-service/routes/api.php"
click node_maintenance "https://github.com/senoukomigodwin/patria/blob/main/services/maintenance-service/routes/api.php"
click node_reporting "https://github.com/senoukomigodwin/patria/blob/main/services/reporting-service/routes/api.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_frontend,node_gateway,node_user toneBlue
class node_assets,node_movement,node_inventory,node_maintenance toneAmber
class node_auth,node_reporting toneMint
class node_postgres toneRose
```

## Components

### User interface

- [Laravel frontend](https://github.com/senoukomigodwin/patria/blob/main/frontend/resources/views/welcome.blade.php): `frontend/resources/views/welcome.blade.php`
- **Nginx gateway**

### Asset operations

- [Asset catalog](https://github.com/senoukomigodwin/patria/blob/main/services/asset-service/routes/api.php): `services/asset-service/routes/api.php`
- [Movement tracking](https://github.com/senoukomigodwin/patria/blob/main/services/movement-service/routes/api.php): `services/movement-service/routes/api.php`
- [Inventory campaigns](https://github.com/senoukomigodwin/patria/blob/main/services/inventory-service/routes/api.php): `services/inventory-service/routes/api.php`
- [Maintenance](https://github.com/senoukomigodwin/patria/blob/main/services/maintenance-service/routes/api.php): `services/maintenance-service/routes/api.php`

### Identity and reporting

- [Authentication](https://github.com/senoukomigodwin/patria/blob/main/services/auth-service/routes/api.php): `services/auth-service/routes/api.php`
- [Reports and exports](https://github.com/senoukomigodwin/patria/blob/main/services/reporting-service/routes/api.php): `services/reporting-service/routes/api.php`

### Service data

- **PostgreSQL databases**

### Other components

- **User**

## Connections

- User → Laravel frontend: uses (evidence: `README.md`)
- Laravel frontend → Nginx gateway: sends requests (evidence: `README.md`)
- Nginx gateway → Authentication: routes auth (evidence: `README.md`)
- Nginx gateway → Asset catalog: routes assets (evidence: `README.md`)
- Nginx gateway → Movement tracking: routes movements (evidence: `README.md`)
- Nginx gateway → Inventory campaigns: routes campaigns (evidence: `README.md`)
- Nginx gateway → Maintenance: routes interventions (evidence: `README.md`)
- Nginx gateway → Reports and exports: routes reports (evidence: `README.md`)
- Authentication → PostgreSQL databases: stores data
- Asset catalog → PostgreSQL databases: stores data
- Movement tracking → PostgreSQL databases: stores data
- Inventory campaigns → PostgreSQL databases: stores data
- Maintenance → PostgreSQL databases: stores data
- Reports and exports → PostgreSQL databases: stores data
