# adhithiya-77/-vehicle--breakdown--prediction- architecture

> Architecture diagram of the GitHub repository adhithiya-77/-vehicle--breakdown--prediction-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adhithiya-77/-vehicle--breakdown--prediction-
- Repository: https://github.com/adhithiya-77/-vehicle--breakdown--prediction-

## Overview

VehicleGuard AI is a fleet-monitoring and predictive-maintenance prototype. A fleet manager reviews dashboard, vehicle, analytics, alert, and maintenance views, or submits telemetry for a breakdown-risk prediction; risk results support prioritizing preventive maintenance. The frontend pages use a shared API client, while the backend and trained model provide the prediction service. The README documents the product workflow and capabilities; backend implementation details and the frontend-to-backend wiring were not excerpted, so those relationships are shown as unverified.

Main entry points: [`frontend/src/App.jsx`](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/App.jsx) (App router), [`frontend/src/services/api.js`](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/services/api.js) (API client), [`frontend/src/components/Shared.jsx`](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/components/Shared.jsx) (Shared UI), [`frontend/src/pages/Dashboard.jsx`](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Dashboard.jsx) (Fleet dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Fleet experience"]
  node_app["App router<br/>[App.jsx]"]
  node_navbar["Navigation<br/>[Navbar.jsx]"]
  node_dashboard["Fleet dashboard<br/>[Dashboard.jsx]"]
  node_vehicles["Vehicle records<br/>[Vehicles.jsx]"]
  node_detail["Vehicle profile<br/>[VehicleDetail.jsx]"]
  node_analytics["Fleet analytics<br/>[Analytics.jsx]"]
  node_alerts["Maintenance alerts<br/>[Alerts.jsx]"]
  node_maintenance["Maintenance priorities<br/>[Maintenance.jsx]"]
  node_predict["Risk prediction form<br/>[Predict.jsx]"]
  node_shared["Shared UI<br/>[Shared.jsx]"]
end

subgraph group_service["Service and prediction"]
  node_api["API client<br/>[api.js]"]
  node_backend["Backend service<br/>[app.py]"]
end

subgraph group_model["ML artifact"]
  node_model["Breakdown model"]
end

node_manager(("Fleet manager"))

node_manager -->|"uses"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_vehicles
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_analytics
node_app -->|"routes to"| node_alerts
node_app -->|"routes to"| node_predict
node_app -->|"routes to"| node_maintenance
node_dashboard -->|"requests data"| node_api
node_vehicles -->|"requests data"| node_api
node_detail -->|"requests data"| node_api
node_analytics -->|"requests data"| node_api
node_alerts -->|"requests data"| node_api
node_predict -->|"submits telemetry"| node_api
node_maintenance -->|"requests data"| node_api
node_dashboard -->|"renders with"| node_shared
node_vehicles -->|"renders with"| node_shared
node_detail -->|"renders with"| node_shared
node_analytics -->|"renders with"| node_shared
node_alerts -->|"renders with"| node_shared
node_predict -->|"renders with"| node_shared
node_maintenance -->|"renders with"| node_shared
node_api -.->|"calls API"| node_backend
node_backend -.->|"predicts risk"| node_model

click node_app "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/App.jsx"
click node_navbar "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/components/Navbar.jsx"
click node_dashboard "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Dashboard.jsx"
click node_vehicles "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Vehicles.jsx"
click node_detail "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/VehicleDetail.jsx"
click node_analytics "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Analytics.jsx"
click node_alerts "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Alerts.jsx"
click node_maintenance "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Maintenance.jsx"
click node_predict "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Predict.jsx"
click node_shared "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/components/Shared.jsx"
click node_api "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/services/api.js"
click node_backend "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/backend/app.py"
click node_model "https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/ml/vehicle_breakdown_model.pkl"

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_app,node_navbar,node_dashboard,node_vehicles,node_detail,node_analytics,node_alerts,node_maintenance,node_predict,node_shared toneBlue
class node_api,node_backend toneAmber
class node_model toneMint
class node_manager toneIndigo
```

## Components

### Fleet experience

- [App router](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Navigation](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/components/Navbar.jsx): `frontend/src/components/Navbar.jsx`
- [Fleet dashboard](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Vehicle records](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Vehicles.jsx): `frontend/src/pages/Vehicles.jsx`
- [Vehicle profile](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/VehicleDetail.jsx): `frontend/src/pages/VehicleDetail.jsx`
- [Fleet analytics](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Analytics.jsx): `frontend/src/pages/Analytics.jsx`
- [Maintenance alerts](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Alerts.jsx): `frontend/src/pages/Alerts.jsx`
- [Maintenance priorities](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Maintenance.jsx): `frontend/src/pages/Maintenance.jsx`
- [Risk prediction form](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/pages/Predict.jsx): `frontend/src/pages/Predict.jsx`
- [Shared UI](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/components/Shared.jsx): `frontend/src/components/Shared.jsx`

### Service and prediction

- [API client](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Backend service](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/backend/app.py): `backend/app.py`

### ML artifact

- [Breakdown model](https://github.com/adhithiya-77/-vehicle--breakdown--prediction-/blob/main/ml/vehicle_breakdown_model.pkl): `ml/vehicle_breakdown_model.pkl`

### Other components

- **Fleet manager**

## Connections

- Fleet manager → App router: uses (evidence: `README.md`)
- App router → Navigation: renders (evidence: `frontend/src/App.jsx`)
- App router → Fleet dashboard: routes to (evidence: `frontend/src/App.jsx`)
- App router → Vehicle records: routes to (evidence: `frontend/src/App.jsx`)
- App router → Vehicle profile: routes to (evidence: `frontend/src/App.jsx`)
- App router → Fleet analytics: routes to (evidence: `frontend/src/App.jsx`)
- App router → Maintenance alerts: routes to (evidence: `frontend/src/App.jsx`)
- App router → Risk prediction form: routes to (evidence: `frontend/src/App.jsx`)
- App router → Maintenance priorities: routes to (evidence: `frontend/src/App.jsx`)
- Fleet dashboard → API client: requests data (evidence: `frontend/src/pages/Dashboard.jsx`)
- Vehicle records → API client: requests data (evidence: `frontend/src/pages/Vehicles.jsx`)
- Vehicle profile → API client: requests data (evidence: `frontend/src/pages/VehicleDetail.jsx`)
- Fleet analytics → API client: requests data (evidence: `frontend/src/pages/Analytics.jsx`)
- Maintenance alerts → API client: requests data (evidence: `frontend/src/pages/Alerts.jsx`)
- Risk prediction form → API client: submits telemetry (evidence: `frontend/src/pages/Predict.jsx`)
- Maintenance priorities → API client: requests data (evidence: `frontend/src/pages/Maintenance.jsx`)
- Fleet dashboard → Shared UI: renders with (evidence: `frontend/src/pages/Dashboard.jsx`)
- Vehicle records → Shared UI: renders with (evidence: `frontend/src/pages/Vehicles.jsx`)
- Vehicle profile → Shared UI: renders with (evidence: `frontend/src/pages/VehicleDetail.jsx`)
- Fleet analytics → Shared UI: renders with (evidence: `frontend/src/pages/Analytics.jsx`)
- Maintenance alerts → Shared UI: renders with (evidence: `frontend/src/pages/Alerts.jsx`)
- Risk prediction form → Shared UI: renders with (evidence: `frontend/src/pages/Predict.jsx`)
- Maintenance priorities → Shared UI: renders with (evidence: `frontend/src/pages/Maintenance.jsx`)
- API client → Backend service: calls API
- Backend service → Breakdown model: predicts risk (evidence: `README.md`)
