# c20240025rayala-max/ccad-26-27 architecture

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

- Interactive diagram: https://gitdiagram.com/c20240025rayala-max/ccad-26-27
- Repository: https://github.com/c20240025rayala-max/ccad-26-27

## Overview

This is a Laravel/Inertia power-management application for maintaining stations and reference data, recording generation readings, and viewing dashboard summaries. The principal workflow is a user submitting a station or reading form, the controller validating input and delegating writes to a service, and the service persisting domain models. Authentication and reference-data administration are separate branches. The README is empty; relationships below rely on shown excerpts and SOURCE INDEX references, so unsampled routes and dashboard wiring are not asserted.

Main entry points: [`app/Models/PowerStation.php`](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/PowerStation.php) (Power station), [`resources/js/app.tsx`](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/resources/js/app.tsx) (Inertia page bootstrap), [`routes/web.php`](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/routes/web.php) (HTTP routes), [`app/Http/Controllers/PowerStationController.php`](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/PowerStationController.php) (Station management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_routes["HTTP routes<br/>[web.php]"]
  node_inertia["Inertia page bootstrap<br/>[app.tsx]"]
  node_stations_page["Station screens"]
  node_readings_page["Reading screens"]
  node_dashboard_page["Dashboard screen<br/>[dashboard.tsx]"]
end

subgraph group_auth["Identity and access"]
  node_auth_routes["Authentication routes<br/>[auth.php]"]
  node_login["Session authentication"]
  node_registration["User registration"]
  node_user_model["User model<br/>[User.php]"]
end

subgraph group_operations["Power operations"]
  node_station_controller["Station management"]
  node_station_service["Station operations"]
  node_station_model["Power station<br/>[PowerStation.php]"]
  node_reading_controller["Reading management"]
  node_reading_service["Reading rules"]
  node_reading_model["Power reading<br/>[PowerReading.php]"]
  node_dashboard_service["Dashboard summaries"]
end

subgraph group_reference["Reference data"]
  node_grid_controller["Grid-zone management"]
  node_grid_service["Grid-zone operations"]
  node_grid_model["Grid zone<br/>[GridZone.php]"]
  node_operator_controller["Operator management"]
  node_operator_service["Operator operations"]
  node_operator_model["Operator<br/>[Operator.php]"]
  node_type_controller["Station-type management"]
  node_type_service["Station-type operations"]
  node_type_model["Station type<br/>[StationType.php]"]
end

node_user(("User"))

node_user -.->|"requests"| node_routes
node_inertia -->|"resolves"| node_stations_page
node_inertia -->|"resolves"| node_readings_page
node_inertia -->|"resolves"| node_dashboard_page
node_auth_routes -->|"routes to"| node_login
node_auth_routes -->|"routes to"| node_registration
node_registration -->|"creates"| node_user_model
node_routes -.->|"dispatches"| node_station_controller
node_routes -.->|"dispatches"| node_reading_controller
node_station_controller -->|"renders"| node_stations_page
node_reading_controller -->|"renders"| node_readings_page
node_station_controller -->|"delegates writes"| node_station_service
node_reading_controller -->|"delegates writes"| node_reading_service
node_station_service -->|"operates on"| node_station_model
node_reading_service -->|"creates and updates"| node_reading_model
node_reading_service -->|"checks capacity"| node_station_model
node_reading_model -->|"belongs to"| node_station_model
node_station_model -->|"belongs to"| node_type_model
node_station_model -->|"belongs to"| node_grid_model
node_station_model -->|"belongs to"| node_operator_model
node_dashboard_service -->|"queries"| node_reading_model
node_dashboard_service -->|"queries"| node_station_model
node_grid_controller -.->|"delegates"| node_grid_service
node_grid_service -.->|"operates on"| node_grid_model
node_operator_controller -.->|"delegates"| node_operator_service
node_operator_service -.->|"operates on"| node_operator_model
node_type_controller -->|"delegates"| node_type_service
node_type_service -.->|"operates on"| node_type_model

click node_routes "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/routes/web.php"
click node_inertia "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/resources/js/app.tsx"
click node_stations_page "https://github.com/c20240025rayala-max/ccad-26-27/tree/main/resources/js/pages/PowerStation"
click node_readings_page "https://github.com/c20240025rayala-max/ccad-26-27/tree/main/resources/js/pages/PowerReading"
click node_dashboard_page "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/resources/js/pages/dashboard.tsx"
click node_auth_routes "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/routes/auth.php"
click node_login "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_user_model "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/User.php"
click node_station_controller "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/PowerStationController.php"
click node_station_service "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/PowerStationService.php"
click node_station_model "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/PowerStation.php"
click node_reading_controller "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/PowerReadingController.php"
click node_reading_service "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/PowerReadingService.php"
click node_reading_model "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/PowerReading.php"
click node_dashboard_service "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/DashboardService.php"
click node_grid_controller "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/GridZoneController.php"
click node_grid_service "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/GridZoneService.php"
click node_grid_model "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/GridZone.php"
click node_operator_controller "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/OperatorController.php"
click node_operator_service "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/OperatorService.php"
click node_operator_model "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/Operator.php"
click node_type_controller "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/StationTypeController.php"
click node_type_service "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/StationTypeService.php"
click node_type_model "https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/StationType.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_routes,node_inertia,node_stations_page,node_readings_page,node_dashboard_page,node_user toneBlue
class node_auth_routes,node_login,node_registration,node_user_model toneAmber
class node_station_controller,node_station_service,node_station_model,node_reading_controller,node_reading_service,node_reading_model,node_dashboard_service toneMint
class node_grid_controller,node_grid_service,node_grid_model,node_operator_controller,node_operator_service,node_operator_model,node_type_controller,node_type_service,node_type_model toneRose
```

## Components

### Web interface

- [HTTP routes](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/routes/web.php): `routes/web.php`
- [Inertia page bootstrap](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/resources/js/app.tsx): `resources/js/app.tsx`
- [Station screens](https://github.com/c20240025rayala-max/ccad-26-27/tree/main/resources/js/pages/PowerStation): `resources/js/pages/PowerStation`
- [Reading screens](https://github.com/c20240025rayala-max/ccad-26-27/tree/main/resources/js/pages/PowerReading): `resources/js/pages/PowerReading`
- [Dashboard screen](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/resources/js/pages/dashboard.tsx): `resources/js/pages/dashboard.tsx`

### Identity and access

- [Authentication routes](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/routes/auth.php): `routes/auth.php`
- [Session authentication](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [User registration](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [User model](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/User.php): `app/Models/User.php`

### Power operations

- [Station management](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/PowerStationController.php): `app/Http/Controllers/PowerStationController.php`
- [Station operations](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/PowerStationService.php): `app/Services/PowerStationService.php`
- [Power station](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/PowerStation.php): `app/Models/PowerStation.php`
- [Reading management](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/PowerReadingController.php): `app/Http/Controllers/PowerReadingController.php`
- [Reading rules](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/PowerReadingService.php): `app/Services/PowerReadingService.php`
- [Power reading](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/PowerReading.php): `app/Models/PowerReading.php`
- [Dashboard summaries](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/DashboardService.php): `app/Services/DashboardService.php`

### Reference data

- [Grid-zone management](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/GridZoneController.php): `app/Http/Controllers/GridZoneController.php`
- [Grid-zone operations](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/GridZoneService.php): `app/Services/GridZoneService.php`
- [Grid zone](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/GridZone.php): `app/Models/GridZone.php`
- [Operator management](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/OperatorController.php): `app/Http/Controllers/OperatorController.php`
- [Operator operations](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/OperatorService.php): `app/Services/OperatorService.php`
- [Operator](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/Operator.php): `app/Models/Operator.php`
- [Station-type management](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Http/Controllers/StationTypeController.php): `app/Http/Controllers/StationTypeController.php`
- [Station-type operations](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Services/StationTypeService.php): `app/Services/StationTypeService.php`
- [Station type](https://github.com/c20240025rayala-max/ccad-26-27/blob/main/app/Models/StationType.php): `app/Models/StationType.php`

### Other components

- **User**

## Connections

- User → HTTP routes: requests
- Inertia page bootstrap → Station screens: resolves (evidence: `resources/js/app.tsx`)
- Inertia page bootstrap → Reading screens: resolves (evidence: `resources/js/app.tsx`)
- Inertia page bootstrap → Dashboard screen: resolves (evidence: `resources/js/app.tsx`)
- Authentication routes → Session authentication: routes to (evidence: `routes/auth.php`)
- Authentication routes → User registration: routes to (evidence: `routes/auth.php`)
- User registration → User model: creates (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- HTTP routes → Station management: dispatches
- HTTP routes → Reading management: dispatches
- Station management → Station screens: renders (evidence: `app/Http/Controllers/PowerStationController.php`)
- Reading management → Reading screens: renders (evidence: `app/Http/Controllers/PowerReadingController.php`)
- Station management → Station operations: delegates writes (evidence: `app/Http/Controllers/PowerStationController.php`)
- Reading management → Reading rules: delegates writes (evidence: `app/Http/Controllers/PowerReadingController.php`)
- Station operations → Power station: operates on (evidence: `app/Services/PowerStationService.php`)
- Reading rules → Power reading: creates and updates (evidence: `app/Services/PowerReadingService.php`)
- Reading rules → Power station: checks capacity (evidence: `app/Services/PowerReadingService.php`)
- Power reading → Power station: belongs to (evidence: `app/Models/PowerReading.php`)
- Power station → Station type: belongs to (evidence: `app/Models/PowerStation.php`)
- Power station → Grid zone: belongs to (evidence: `app/Models/PowerStation.php`)
- Power station → Operator: belongs to (evidence: `app/Models/PowerStation.php`)
- Dashboard summaries → Power reading: queries (evidence: `app/Services/DashboardService.php`)
- Dashboard summaries → Power station: queries (evidence: `app/Services/DashboardService.php`)
- Grid-zone management → Grid-zone operations: delegates
- Grid-zone operations → Grid zone: operates on
- Operator management → Operator operations: delegates
- Operator operations → Operator: operates on
- Station-type management → Station-type operations: delegates (evidence: `app/Http/Controllers/StationTypeController.php`)
- Station-type operations → Station type: operates on
