# jayrookneel/pdrrmo_palawanfms architecture

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

## Overview

This Django fleet-management application supports logistics and maintenance work across land vehicles and seacraft. Users enter through the fleet web pages or Django admin; the views enforce role and operator qualifications, validate forms and locations, then update fleet records or present dashboards and reports. Distinct operational areas include asset and operator registration, deployment and dispatch, maintenance, incidents, and activity reporting. Local document OCR assists registration, while the database-backed models provide shared state. README-described PWA support is represented, but its exact template-to-worker wiring was not excerpted.

Main entry points: [`fleet/views.py`](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py) (Fleet workflows), [`fleet/admin.py`](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/admin.py) (Admin console), [`fleet/models.py`](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/models.py) (Asset registry), [`db.sqlite3`](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/db.sqlite3) (SQLite database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and operations"]
  node_routes["Route dispatch<br/>[urls.py]"]
  node_views["Fleet workflows<br/>[views.py]"]
  node_admin["Admin console<br/>[admin.py]"]
  node_pwa["Installable PWA<br/>[service-worker.js]"]
end

subgraph group_domain["Fleet records"]
  node_asset[("Asset registry<br/>[models.py]")]
  node_operators[("Driver records<br/>[models.py]")]
  node_deploy["Deployment and dispatch<br/>[views.py]"]
  node_maintenance["Maintenance workflow<br/>[views.py]"]
  node_incidents[("Incident records<br/>[models.py]")]
  node_reports["Reports and activity<br/>[views.py]"]
end

subgraph group_support["Registration support"]
  node_forms["Input validation<br/>[forms.py]"]
  node_location["Location validation"]
  node_ocr["Document OCR"]
end

subgraph group_platform["Persistence and access"]
  node_auth["Django auth"]
  node_db[("SQLite database<br/>[db.sqlite3]")]
end

node_user(("Fleet user"))

node_user -->|"requests pages"| node_routes
node_routes -->|"dispatches to"| node_views
node_user -->|"uses admin"| node_admin
node_views -->|"validates with"| node_forms
node_views -->|"checks locations"| node_location
node_views -->|"extracts suggestions"| node_ocr
node_views -->|"reads and writes"| node_asset
node_views -->|"assigns operators"| node_operators
node_views -->|"handles dispatch"| node_deploy
node_views -->|"handles repairs"| node_maintenance
node_views -.->|"handles incidents"| node_incidents
node_views -->|"builds reports"| node_reports
node_admin -->|"administers records"| node_asset
node_views -.->|"checks permissions"| node_auth
node_admin -->|"uses accounts"| node_auth
node_asset -->|"persists in"| node_db
node_operators -->|"persists in"| node_db
node_incidents -.->|"persists in"| node_db
node_user -.->|"installs app"| node_pwa

click node_routes "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/urls.py"
click node_views "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py"
click node_admin "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/admin.py"
click node_forms "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/forms.py"
click node_location "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/deployment_locations.py"
click node_ocr "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/vehicle_document_ocr.py"
click node_asset "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/models.py"
click node_operators "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/models.py"
click node_deploy "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py"
click node_maintenance "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py"
click node_incidents "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/models.py"
click node_reports "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py"
click node_db "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/db.sqlite3"
click node_pwa "https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/static/fleet/js/service-worker.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_routes,node_views,node_admin,node_pwa,node_user toneBlue
class node_asset,node_operators,node_deploy,node_maintenance,node_incidents,node_reports toneAmber
class node_forms,node_location,node_ocr toneMint
class node_auth,node_db toneRose
```

## Components

### Web entry and operations

- [Route dispatch](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/urls.py): `fleet/urls.py`
- [Fleet workflows](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py): `fleet/views.py`
- [Admin console](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/admin.py): `fleet/admin.py`
- [Installable PWA](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/static/fleet/js/service-worker.js): `fleet/static/fleet/js/service-worker.js`

### Fleet records

- [Asset registry](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/models.py): `fleet/models.py`
- [Driver records](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/models.py): `fleet/models.py`
- [Deployment and dispatch](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py): `fleet/views.py`
- [Maintenance workflow](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py): `fleet/views.py`
- [Incident records](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/models.py): `fleet/models.py`
- [Reports and activity](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/views.py): `fleet/views.py`

### Registration support

- [Input validation](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/forms.py): `fleet/forms.py`
- [Location validation](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/deployment_locations.py): `fleet/deployment_locations.py`
- [Document OCR](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/fleet/vehicle_document_ocr.py): `fleet/vehicle_document_ocr.py`

### Persistence and access

- **Django auth**
- [SQLite database](https://github.com/jayrookneel/pdrrmo_palawanfms/blob/main/db.sqlite3): `db.sqlite3`

### Other components

- **Fleet user**

## Connections

- Fleet user → Route dispatch: requests pages
- Route dispatch → Fleet workflows: dispatches to (evidence: `fleet/urls.py`)
- Fleet user → Admin console: uses admin
- Fleet workflows → Input validation: validates with (evidence: `fleet/views.py`)
- Fleet workflows → Location validation: checks locations (evidence: `fleet/views.py`)
- Fleet workflows → Document OCR: extracts suggestions (evidence: `fleet/views.py`)
- Fleet workflows → Asset registry: reads and writes (evidence: `fleet/views.py`)
- Fleet workflows → Driver records: assigns operators (evidence: `fleet/views.py`)
- Fleet workflows → Deployment and dispatch: handles dispatch (evidence: `fleet/views.py`)
- Fleet workflows → Maintenance workflow: handles repairs (evidence: `fleet/views.py`)
- Fleet workflows → Incident records: handles incidents (evidence: `fleet/views.py`)
- Fleet workflows → Reports and activity: builds reports (evidence: `fleet/views.py`)
- Admin console → Asset registry: administers records (evidence: `fleet/admin.py`)
- Fleet workflows → Django auth: checks permissions
- Admin console → Django auth: uses accounts (evidence: `fleet/admin.py`)
- Asset registry → SQLite database: persists in (evidence: `fleet/models.py`)
- Driver records → SQLite database: persists in (evidence: `fleet/models.py`)
- Incident records → SQLite database: persists in
- Fleet user → Installable PWA: installs app (evidence: `README.md`)
