# igguimaraes/projet-control architecture

> Architecture diagram of the GitHub repository igguimaraes/projet-control, 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/igguimaraes/projet-control
- Repository: https://github.com/igguimaraes/projet-control

## Overview

This is a React frontend for managing company fuel operations and a platform-level company administration mode. The principal workflow enters through the app shell, selects a company or platform session, and presents operational screens for fuel transactions, stock intake, history, and consumption; administrative screens manage locations, users, permissions, tanks, and vehicles. The app and screens call a shared API client, which sends HTTP requests to an external backend. Source excerpts establish the entry point and several calls; some screen-to-API links are supported by the SOURCE INDEX rather than full implementation excerpts.

Main entry points: [`src/services/api.js`](https://github.com/igguimaraes/projet-control/blob/main/src/services/api.js) (API client), [`src/App.jsx`](https://github.com/igguimaraes/projet-control/blob/main/src/App.jsx) (App shell), [`src/screens/Admin/Admin.jsx`](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/Admin.jsx) (Company admin), [`src/screens/Consumption.jsx`](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Consumption.jsx) (Consumption analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application shell"]
  node_main["React entry<br/>[main.jsx]"]
  node_app["App shell<br/>[App.jsx]"]
end

subgraph group_operations["Fuel operations"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_fuel["Fuel entry<br/>[Fuel.jsx]"]
  node_stockin["Stock intake<br/>[StockIn.jsx]"]
  node_history["Transaction history<br/>[History.jsx]"]
  node_consumption["Consumption analysis<br/>[Consumption.jsx]"]
  node_vehiclecombo["Vehicle selector<br/>[VehicleCombo.jsx]"]
end

subgraph group_admin["Administration"]
  node_platform["Platform admin<br/>[Platform.jsx]"]
  node_admin["Company admin<br/>[Admin.jsx]"]
  node_locations["Location management<br/>[AdminLocations.jsx]"]
  node_permissions["Access management"]
  node_adminstock["Admin stock intake<br/>[AdminStockIn.jsx]"]
  node_tanks["Tank management<br/>[AdminTanks.jsx]"]
  node_users["User management<br/>[AdminUsers.jsx]"]
  node_vehicles["Vehicle management<br/>[AdminVehicles.jsx]"]
end

subgraph group_transport["API transport"]
  node_api["API client<br/>[api.js]"]
end

node_user(("User"))
node_backend[("Backend API")]

node_main -->|"renders"| node_app
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_fuel
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_stockin
node_app -->|"routes to"| node_consumption
node_app -->|"routes to"| node_platform
node_app -->|"requests"| node_api
node_fuel -->|"uses"| node_vehiclecombo
node_consumption -->|"uses"| node_vehiclecombo
node_consumption -->|"requests"| node_api
node_history -->|"requests"| node_api
node_stockin -->|"requests"| node_api
node_platform -->|"requests"| node_api
node_admin -->|"renders"| node_locations
node_admin -->|"renders"| node_permissions
node_admin -->|"renders"| node_adminstock
node_admin -->|"renders"| node_tanks
node_admin -->|"renders"| node_users
node_admin -->|"renders"| node_vehicles
node_admin -->|"requests"| node_api
node_locations -->|"requests"| node_api
node_permissions -->|"requests"| node_api
node_adminstock -->|"requests"| node_api
node_tanks -->|"requests"| node_api
node_users -->|"requests"| node_api
node_vehicles -->|"requests"| node_api
node_api -->|"sends HTTP"| node_backend

click node_main "https://github.com/igguimaraes/projet-control/blob/main/src/main.jsx"
click node_app "https://github.com/igguimaraes/projet-control/blob/main/src/App.jsx"
click node_dashboard "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Dashboard.jsx"
click node_fuel "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Fuel.jsx"
click node_stockin "https://github.com/igguimaraes/projet-control/blob/main/src/screens/StockIn.jsx"
click node_history "https://github.com/igguimaraes/projet-control/blob/main/src/screens/History.jsx"
click node_consumption "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Consumption.jsx"
click node_vehiclecombo "https://github.com/igguimaraes/projet-control/blob/main/src/components/VehicleCombo.jsx"
click node_platform "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Platform.jsx"
click node_admin "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/Admin.jsx"
click node_locations "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminLocations.jsx"
click node_permissions "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminPermissions.jsx"
click node_adminstock "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminStockIn.jsx"
click node_tanks "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminTanks.jsx"
click node_users "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminUsers.jsx"
click node_vehicles "https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminVehicles.jsx"
click node_api "https://github.com/igguimaraes/projet-control/blob/main/src/services/api.js"

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_main,node_app,node_user toneBlue
class node_dashboard,node_fuel,node_stockin,node_history,node_consumption,node_vehiclecombo,node_backend toneAmber
class node_platform,node_admin,node_locations,node_permissions,node_adminstock,node_tanks,node_users,node_vehicles toneMint
class node_api toneRose
```

## Components

### Application shell

- [React entry](https://github.com/igguimaraes/projet-control/blob/main/src/main.jsx): `src/main.jsx`
- [App shell](https://github.com/igguimaraes/projet-control/blob/main/src/App.jsx): `src/App.jsx`

### Fuel operations

- [Dashboard](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Dashboard.jsx): `src/screens/Dashboard.jsx`
- [Fuel entry](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Fuel.jsx): `src/screens/Fuel.jsx`
- [Stock intake](https://github.com/igguimaraes/projet-control/blob/main/src/screens/StockIn.jsx): `src/screens/StockIn.jsx`
- [Transaction history](https://github.com/igguimaraes/projet-control/blob/main/src/screens/History.jsx): `src/screens/History.jsx`
- [Consumption analysis](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Consumption.jsx): `src/screens/Consumption.jsx`
- [Vehicle selector](https://github.com/igguimaraes/projet-control/blob/main/src/components/VehicleCombo.jsx): `src/components/VehicleCombo.jsx`

### Administration

- [Platform admin](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Platform.jsx): `src/screens/Platform.jsx`
- [Company admin](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/Admin.jsx): `src/screens/Admin/Admin.jsx`
- [Location management](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminLocations.jsx): `src/screens/Admin/AdminLocations.jsx`
- [Access management](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminPermissions.jsx): `src/screens/Admin/AdminPermissions.jsx`
- [Admin stock intake](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminStockIn.jsx): `src/screens/Admin/AdminStockIn.jsx`
- [Tank management](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminTanks.jsx): `src/screens/Admin/AdminTanks.jsx`
- [User management](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminUsers.jsx): `src/screens/Admin/AdminUsers.jsx`
- [Vehicle management](https://github.com/igguimaraes/projet-control/blob/main/src/screens/Admin/AdminVehicles.jsx): `src/screens/Admin/AdminVehicles.jsx`

### API transport

- [API client](https://github.com/igguimaraes/projet-control/blob/main/src/services/api.js): `src/services/api.js`

### Other components

- **User**
- **Backend API**

## Connections

- React entry → App shell: renders (evidence: `src/main.jsx`)
- App shell → Dashboard: renders (evidence: `src/App.jsx`)
- App shell → Fuel entry: renders (evidence: `src/App.jsx`)
- App shell → Transaction history: routes to (evidence: `src/App.jsx`)
- App shell → Company admin: routes to (evidence: `src/App.jsx`)
- App shell → Stock intake: routes to (evidence: `src/App.jsx`)
- App shell → Consumption analysis: routes to (evidence: `src/App.jsx`)
- App shell → Platform admin: routes to (evidence: `src/App.jsx`)
- App shell → API client: requests (evidence: `src/App.jsx`)
- Fuel entry → Vehicle selector: uses (evidence: `src/components/VehicleCombo.jsx`)
- Consumption analysis → Vehicle selector: uses (evidence: `src/screens/Consumption.jsx`)
- Consumption analysis → API client: requests (evidence: `src/screens/Consumption.jsx`)
- Transaction history → API client: requests (evidence: `src/screens/History.jsx`)
- Stock intake → API client: requests (evidence: `src/screens/StockIn.jsx`)
- Platform admin → API client: requests (evidence: `src/screens/Platform.jsx`)
- Company admin → Location management: renders (evidence: `src/screens/Admin/Admin.jsx`)
- Company admin → Access management: renders (evidence: `src/screens/Admin/Admin.jsx`)
- Company admin → Admin stock intake: renders (evidence: `src/screens/Admin/Admin.jsx`)
- Company admin → Tank management: renders (evidence: `src/screens/Admin/Admin.jsx`)
- Company admin → User management: renders (evidence: `src/screens/Admin/Admin.jsx`)
- Company admin → Vehicle management: renders (evidence: `src/screens/Admin/Admin.jsx`)
- Company admin → API client: requests (evidence: `src/screens/Admin/Admin.jsx`)
- Location management → API client: requests (evidence: `src/screens/Admin/AdminLocations.jsx`)
- Access management → API client: requests (evidence: `src/screens/Admin/AdminPermissions.jsx`)
- Admin stock intake → API client: requests (evidence: `src/screens/Admin/AdminStockIn.jsx`)
- Tank management → API client: requests (evidence: `src/screens/Admin/AdminTanks.jsx`)
- User management → API client: requests (evidence: `src/screens/Admin/AdminUsers.jsx`)
- Vehicle management → API client: requests (evidence: `src/screens/Admin/AdminVehicles.jsx`)
- API client → Backend API: sends HTTP (evidence: `src/services/api.js`)
