High-level system description
A Django REST backend with PostgreSQL, with two clients: the main React web application and a separate offline-first PWA used by inspectors in the field. Bulk data arrives through an ingestion pipeline that writes to the database on its own validated path.Domain layers
Internally the backend is organised in layers of Django applications. Dependencies generally point downward: a higher layer uses what is below it, and the layers below do not depend on the modules above.1
Foundation
Users, projects, and shared plumbing. Who can log in, which fleets they have access
to, and the conventions every other part of the system follows. Always present, never
visible as a feature in its own right.
authentication · user · projects · common2
Fleet registry
The assets. Vehicle types, the standardised product-group hierarchy, component
types, mounting positions, and then the actual vehicles and components in service.
This is the backbone — nearly everything else attaches to a vehicle or a component.
assets3
Modules
The working areas. Each adds records that point back at the fleet registry beneath
it.
servicebook · defects · warranty · measurements · planner · inspections ·
high_value_components · strategic_kpi · askaidefects builds on servicebook, warranty
and strategic_kpi build on defects, and askai reads across most of the others.
The downward rule holds for module-level imports but is not absolute.
common reaches up
into assets and inspections in a few places, using function-local imports to avoid
circular-import errors at load time.Navigation structure
The Pages tab follows the application’s own sidebar. What a user sees depends on their assigned roles.
Field inspections happen in a separate inspector app rather than in
the web application.
Data origin
Data can enter the platform in three distinct ways.Configured in the application
Configured in the application
The definitions admin sets up: vehicle
types, the product-group hierarchy, component types, mounting positions, measurement
types and their thresholds, inspection templates. Created and edited in the web
application.
Created by people using the platform
Created by people using the platform
The work the platform is actually for: warranty claims and their approval history,
component repair-loop updates, inspection findings, maintenance plannings, comments and
attachments. Created through the web application or the inspector app.
Imported from CSV files
Imported from CSV files
The daily operational record: defects, odometer readings, mount and dismount events,
performed maintenance, measurements, out-of-service periods, cleaning. These arrive as
CSV exports from other systems and are read-only inside the platform — they cannot
be edited in the application, because the next import would overwrite the change.