# asquare-developer/van-project architecture

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

- Interactive diagram: https://gitdiagram.com/asquare-developer/van-project
- Repository: https://github.com/asquare-developer/van-project

## Overview

Van Project is a Laravel administration panel for managing accounts and coordinating van-shift inspections. Admins configure templates and assign shifts; workers submit checklist photos, whose analysis is queued and reviewed through shift decisions. Separate capabilities cover session authentication, role-based administration, audit history, and vision-model configuration. The graph reflects documented features and sampled controller/model relationships; several service and route details are supported only by the SOURCE INDEX, so uncertain runtime links are omitted.

Main entry points: [`routes/web.php`](https://github.com/asquare-developer/van-project/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Admin/ShiftController.php`](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/ShiftController.php) (Shift administration), [`app/Http/Controllers/InspectionPhotoController.php`](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/InspectionPhotoController.php) (Photo submission), [`app/Http/Controllers/Admin/UserController.php`](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/UserController.php) (Account management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and administration"]
  node_routes["Web routes<br/>[web.php]"]
  node_sessions["Session authentication"]
  node_accounts["Account management<br/>[UserController.php]"]
  node_user_manager["User manager<br/>[UserManager.php]"]
  node_audit["Audit logging<br/>[AuditLogger.php]"]
end

subgraph group_shifts["Shift operations"]
  node_admin_shifts["Shift administration"]
  node_assigner["Shift assignment<br/>[ShiftAssigner.php]"]
  node_worker_shifts["Worker shifts"]
  node_workflow["Shift workflow<br/>[ShiftWorkflow.php]"]
end

subgraph group_inspection["Inspection analysis"]
  node_photo_controller["Photo submission"]
  node_photo_submission["Photo intake"]
  node_analysis["Inspection analysis"]
  node_analysis_job["Analysis job"]
  node_photo_store["Photo storage"]
  node_templates["Template management"]
end

subgraph group_vision["Vision configuration"]
  node_vision_admin["Vision model admin"]
  node_vision_catalog["Vision catalog<br/>[VisionCatalog.php]"]
  node_vision_client["Vision client<br/>[VisionClient.php]"]
  node_roboflow["Roboflow integration"]
end

subgraph group_data["Domain data"]
  node_domain["Inspection and shift records<br/>[Shift.php]"]
  node_activity_log["Activity log records<br/>[ActivityLog.php]"]
end

node_admin(("Admin"))
node_worker(("Worker"))
node_mysql[("MySQL database")]
node_vision_service{{"Roboflow service"}}

node_admin -->|"uses"| node_routes
node_worker -->|"uses"| node_routes
node_routes -->|"routes to"| node_sessions
node_routes -->|"routes to"| node_accounts
node_routes -->|"routes to"| node_admin_shifts
node_routes -->|"routes to"| node_worker_shifts
node_routes -->|"routes to"| node_photo_controller
node_routes -->|"routes to"| node_templates
node_routes -->|"routes to"| node_vision_admin
node_accounts -.->|"manages"| node_user_manager
node_user_manager -->|"records events"| node_audit
node_admin_shifts -->|"assigns shifts"| node_assigner
node_admin_shifts -->|"assesses"| node_workflow
node_worker_shifts -->|"assesses"| node_workflow
node_photo_controller -->|"submits photo"| node_photo_submission
node_photo_controller -->|"enqueues analysis"| node_analysis
node_photo_submission -.->|"stores photo"| node_photo_store
node_analysis -.->|"queues job"| node_analysis_job
node_templates -->|"uses catalog"| node_vision_catalog
node_vision_admin -->|"uses catalog"| node_vision_catalog
node_vision_client -->|"delegates to"| node_roboflow
node_roboflow -.->|"calls"| node_vision_service
node_domain -.->|"persists records"| node_mysql
node_audit -->|"records"| node_activity_log
node_activity_log -.->|"persists records"| node_mysql

click node_routes "https://github.com/asquare-developer/van-project/blob/main/routes/web.php"
click node_sessions "https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Auth/SessionController.php"
click node_accounts "https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/UserController.php"
click node_user_manager "https://github.com/asquare-developer/van-project/blob/main/app/Services/UserManager.php"
click node_audit "https://github.com/asquare-developer/van-project/blob/main/app/Services/AuditLogger.php"
click node_admin_shifts "https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/ShiftController.php"
click node_assigner "https://github.com/asquare-developer/van-project/blob/main/app/Services/ShiftAssigner.php"
click node_worker_shifts "https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/WorkerShiftController.php"
click node_workflow "https://github.com/asquare-developer/van-project/blob/main/app/Services/ShiftWorkflow.php"
click node_photo_controller "https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/InspectionPhotoController.php"
click node_photo_submission "https://github.com/asquare-developer/van-project/blob/main/app/Services/InspectionPhotoSubmission.php"
click node_analysis "https://github.com/asquare-developer/van-project/blob/main/app/Services/InspectionAnalysis.php"
click node_analysis_job "https://github.com/asquare-developer/van-project/blob/main/app/Jobs/AnalyseInspectionAttempt.php"
click node_photo_store "https://github.com/asquare-developer/van-project/blob/main/app/Services/InspectionPhotoStore.php"
click node_templates "https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/InspectionTemplateController.php"
click node_vision_admin "https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/VisionModelController.php"
click node_vision_catalog "https://github.com/asquare-developer/van-project/blob/main/app/Services/VisionCatalog.php"
click node_vision_client "https://github.com/asquare-developer/van-project/blob/main/app/Services/VisionClient.php"
click node_roboflow "https://github.com/asquare-developer/van-project/blob/main/app/Services/RoboflowVisionClient.php"
click node_domain "https://github.com/asquare-developer/van-project/blob/main/app/Models/Shift.php"
click node_activity_log "https://github.com/asquare-developer/van-project/blob/main/app/Models/ActivityLog.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_sessions,node_accounts,node_user_manager,node_audit toneBlue
class node_admin_shifts,node_assigner,node_worker_shifts,node_workflow,node_mysql toneAmber
class node_photo_controller,node_photo_submission,node_analysis,node_analysis_job,node_photo_store,node_templates toneMint
class node_vision_admin,node_vision_catalog,node_vision_client,node_roboflow,node_worker toneRose
class node_domain,node_activity_log,node_admin,node_vision_service toneIndigo
```

## Components

### Access and administration

- [Web routes](https://github.com/asquare-developer/van-project/blob/main/routes/web.php): `routes/web.php`
- [Session authentication](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Auth/SessionController.php): `app/Http/Controllers/Auth/SessionController.php`
- [Account management](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/UserController.php): `app/Http/Controllers/Admin/UserController.php`
- [User manager](https://github.com/asquare-developer/van-project/blob/main/app/Services/UserManager.php): `app/Services/UserManager.php`
- [Audit logging](https://github.com/asquare-developer/van-project/blob/main/app/Services/AuditLogger.php): `app/Services/AuditLogger.php`

### Shift operations

- [Shift administration](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/ShiftController.php): `app/Http/Controllers/Admin/ShiftController.php`
- [Shift assignment](https://github.com/asquare-developer/van-project/blob/main/app/Services/ShiftAssigner.php): `app/Services/ShiftAssigner.php`
- [Worker shifts](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/WorkerShiftController.php): `app/Http/Controllers/WorkerShiftController.php`
- [Shift workflow](https://github.com/asquare-developer/van-project/blob/main/app/Services/ShiftWorkflow.php): `app/Services/ShiftWorkflow.php`

### Inspection analysis

- [Photo submission](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/InspectionPhotoController.php): `app/Http/Controllers/InspectionPhotoController.php`
- [Photo intake](https://github.com/asquare-developer/van-project/blob/main/app/Services/InspectionPhotoSubmission.php): `app/Services/InspectionPhotoSubmission.php`
- [Inspection analysis](https://github.com/asquare-developer/van-project/blob/main/app/Services/InspectionAnalysis.php): `app/Services/InspectionAnalysis.php`
- [Analysis job](https://github.com/asquare-developer/van-project/blob/main/app/Jobs/AnalyseInspectionAttempt.php): `app/Jobs/AnalyseInspectionAttempt.php`
- [Photo storage](https://github.com/asquare-developer/van-project/blob/main/app/Services/InspectionPhotoStore.php): `app/Services/InspectionPhotoStore.php`
- [Template management](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/InspectionTemplateController.php): `app/Http/Controllers/Admin/InspectionTemplateController.php`

### Vision configuration

- [Vision model admin](https://github.com/asquare-developer/van-project/blob/main/app/Http/Controllers/Admin/VisionModelController.php): `app/Http/Controllers/Admin/VisionModelController.php`
- [Vision catalog](https://github.com/asquare-developer/van-project/blob/main/app/Services/VisionCatalog.php): `app/Services/VisionCatalog.php`
- [Vision client](https://github.com/asquare-developer/van-project/blob/main/app/Services/VisionClient.php): `app/Services/VisionClient.php`
- [Roboflow integration](https://github.com/asquare-developer/van-project/blob/main/app/Services/RoboflowVisionClient.php): `app/Services/RoboflowVisionClient.php`

### Domain data

- [Inspection and shift records](https://github.com/asquare-developer/van-project/blob/main/app/Models/Shift.php): `app/Models/Shift.php`
- [Activity log records](https://github.com/asquare-developer/van-project/blob/main/app/Models/ActivityLog.php): `app/Models/ActivityLog.php`

### Other components

- **Admin**
- **Worker**
- **MySQL database**
- **Roboflow service**

## Connections

- Admin → Web routes: uses (evidence: `routes/web.php`)
- Worker → Web routes: uses (evidence: `routes/web.php`)
- Web routes → Session authentication: routes to (evidence: `routes/web.php`)
- Web routes → Account management: routes to (evidence: `routes/web.php`)
- Web routes → Shift administration: routes to (evidence: `routes/web.php`)
- Web routes → Worker shifts: routes to (evidence: `routes/web.php`)
- Web routes → Photo submission: routes to (evidence: `routes/web.php`)
- Web routes → Template management: routes to (evidence: `routes/web.php`)
- Web routes → Vision model admin: routes to (evidence: `routes/web.php`)
- Account management → User manager: manages
- User manager → Audit logging: records events (evidence: `app/Services/UserManager.php`)
- Shift administration → Shift assignment: assigns shifts (evidence: `app/Http/Controllers/Admin/ShiftController.php`)
- Shift administration → Shift workflow: assesses (evidence: `app/Http/Controllers/Admin/ShiftController.php`)
- Worker shifts → Shift workflow: assesses (evidence: `app/Http/Controllers/WorkerShiftController.php`)
- Photo submission → Photo intake: submits photo (evidence: `app/Http/Controllers/InspectionPhotoController.php`)
- Photo submission → Inspection analysis: enqueues analysis (evidence: `app/Http/Controllers/InspectionPhotoController.php`)
- Photo intake → Photo storage: stores photo
- Inspection analysis → Analysis job: queues job
- Template management → Vision catalog: uses catalog (evidence: `app/Http/Controllers/Admin/InspectionTemplateController.php`)
- Vision model admin → Vision catalog: uses catalog (evidence: `app/Http/Controllers/Admin/VisionModelController.php`)
- Vision client → Roboflow integration: delegates to (evidence: `app/Services/VisionClient.php`)
- Roboflow integration → Roboflow service: calls
- Inspection and shift records → MySQL database: persists records
- Audit logging → Activity log records: records (evidence: `app/Services/AuditLogger.php`)
- Activity log records → MySQL database: persists records
