# ajaygoud-0928/major_project architecture

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

- Interactive diagram: https://gitdiagram.com/ajaygoud-0928/major_project
- Repository: https://github.com/ajaygoud-0928/major_project

## Overview

RoadXamine detects road damage with an SSD-based vision model, sends video detections to Firebase, and provides a web interface for public route viewing and officer review. The principal flow runs from video frames through model inference and detection reporting to backend storage and the dashboard. The client also supports complaints, authentication, damage maps, and Google Maps directions. Training, dataset preparation, evaluation, and image inference are distinct model lifecycle stages. Several Python modules and frontend components are indexed but unsampled, so their internal links are omitted unless documented or visible in excerpts.

Main entry points: [`client/src/App.js`](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/App.js) (Application router), [`client/src/MyComponents/view.js`](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/view.js) (Public damage view), [`client/src/MyComponents/login.js`](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/login.js) (Officer login), [`client/src/MyComponents/dashboard.js`](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/dashboard.js) (Officer dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vision["Detection and ML"]
  node_config["Model configuration<br/>[config.py]"]
  node_dataset["Dataset preparation<br/>[datasets.py]"]
  node_training["Model training<br/>[train.py]"]
  node_ssd["SSD model<br/>[model.py]"]
  node_evaluation["Model evaluation<br/>[eval.py]"]
  node_imageinference["Image inference<br/>[inference.py]"]
  node_videoinference["Video inference<br/>[inference_video.py]"]
end

subgraph group_backend["Damage Backend"]
  node_firebasewriter["Detection uploader<br/>[fb.py]"]
  node_firebase[("Firebase store")]
  node_firebaseconfig["Client Firebase setup<br/>[firebase.js]"]
end

subgraph group_client["Web Client"]
  node_app["Application router<br/>[App.js]"]
  node_navigation["Site navigation<br/>[nav.js]"]
  node_login["Officer login<br/>[login.js]"]
  node_dashboard["Officer dashboard<br/>[dashboard.js]"]
  node_about["About page<br/>[about.js]"]
  node_homepage["Home page<br/>[header.js]"]
  node_copyright["Footer<br/>[copyright.js]"]
end

subgraph group_maps["Maps and Reporting"]
  node_view["Public damage view<br/>[view.js]"]
  node_mapsapi["Google Maps services"]
  node_complaints[("Complaint records")]
end

node_operator(("Road monitoring"))

node_operator -.->|"provides video"| node_videoinference
node_videoinference -->|"runs inference"| node_ssd
node_imageinference -->|"runs inference"| node_ssd
node_videoinference -->|"uploads detections"| node_firebasewriter
node_firebasewriter -.->|"writes reports"| node_firebase
node_app -->|"renders"| node_navigation
node_app -->|"routes to"| node_homepage
node_app -->|"routes to"| node_about
node_app -->|"routes to"| node_view
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"renders"| node_copyright
node_login -->|"uses client config"| node_firebaseconfig
node_login -->|"authenticates officer"| node_firebase
node_login -->|"navigates after login"| node_dashboard
node_dashboard -->|"uses client config"| node_firebaseconfig
node_dashboard -->|"queries damage data"| node_firebase
node_view -->|"uses client config"| node_firebaseconfig
node_view -->|"reads damage data"| node_firebase
node_view -->|"submits complaint"| node_complaints
node_view -->|"uses maps services"| node_mapsapi

click node_config "https://github.com/ajaygoud-0928/major_project/blob/main/Code/config.py"
click node_dataset "https://github.com/ajaygoud-0928/major_project/blob/main/Code/datasets.py"
click node_training "https://github.com/ajaygoud-0928/major_project/blob/main/Code/train.py"
click node_ssd "https://github.com/ajaygoud-0928/major_project/blob/main/Code/model.py"
click node_evaluation "https://github.com/ajaygoud-0928/major_project/blob/main/Code/eval.py"
click node_imageinference "https://github.com/ajaygoud-0928/major_project/blob/main/Code/inference.py"
click node_videoinference "https://github.com/ajaygoud-0928/major_project/blob/main/Code/inference_video.py"
click node_firebasewriter "https://github.com/ajaygoud-0928/major_project/blob/main/Code/fb.py"
click node_app "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/App.js"
click node_navigation "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/nav.js"
click node_login "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/login.js"
click node_dashboard "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/dashboard.js"
click node_about "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/about.js"
click node_homepage "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/header.js"
click node_copyright "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/copyright.js"
click node_firebaseconfig "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/Config/firebase.js"
click node_view "https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/view.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_config,node_dataset,node_training,node_ssd,node_evaluation,node_imageinference,node_videoinference toneBlue
class node_firebasewriter,node_firebase,node_firebaseconfig toneAmber
class node_app,node_navigation,node_login,node_dashboard,node_about,node_homepage,node_copyright toneMint
class node_view,node_mapsapi,node_complaints toneRose
class node_operator toneIndigo
```

## Components

### Detection and ML

- [Model configuration](https://github.com/ajaygoud-0928/major_project/blob/main/Code/config.py): `Code/config.py`
- [Dataset preparation](https://github.com/ajaygoud-0928/major_project/blob/main/Code/datasets.py): `Code/datasets.py`
- [Model training](https://github.com/ajaygoud-0928/major_project/blob/main/Code/train.py): `Code/train.py`
- [SSD model](https://github.com/ajaygoud-0928/major_project/blob/main/Code/model.py): `Code/model.py`
- [Model evaluation](https://github.com/ajaygoud-0928/major_project/blob/main/Code/eval.py): `Code/eval.py`
- [Image inference](https://github.com/ajaygoud-0928/major_project/blob/main/Code/inference.py): `Code/inference.py`
- [Video inference](https://github.com/ajaygoud-0928/major_project/blob/main/Code/inference_video.py): `Code/inference_video.py`

### Damage Backend

- [Detection uploader](https://github.com/ajaygoud-0928/major_project/blob/main/Code/fb.py): `Code/fb.py`
- **Firebase store**
- [Client Firebase setup](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/Config/firebase.js): `client/src/MyComponents/Config/firebase.js`

### Web Client

- [Application router](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/App.js): `client/src/App.js`
- [Site navigation](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/nav.js): `client/src/MyComponents/nav.js`
- [Officer login](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/login.js): `client/src/MyComponents/login.js`
- [Officer dashboard](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/dashboard.js): `client/src/MyComponents/dashboard.js`
- [About page](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/about.js): `client/src/MyComponents/about.js`
- [Home page](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/header.js): `client/src/MyComponents/header.js`
- [Footer](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/copyright.js): `client/src/MyComponents/copyright.js`

### Maps and Reporting

- [Public damage view](https://github.com/ajaygoud-0928/major_project/blob/main/client/src/MyComponents/view.js): `client/src/MyComponents/view.js`
- **Google Maps services**
- **Complaint records**

### Other components

- **Road monitoring**

## Connections

- Road monitoring → Video inference: provides video
- Video inference → SSD model: runs inference (evidence: `Code/inference_video.py`)
- Image inference → SSD model: runs inference (evidence: `Code/inference.py`)
- Video inference → Detection uploader: uploads detections (evidence: `Code/inference_video.py`)
- Detection uploader → Firebase store: writes reports
- Application router → Site navigation: renders (evidence: `client/src/App.js`)
- Application router → Home page: routes to (evidence: `client/src/App.js`)
- Application router → About page: routes to (evidence: `client/src/App.js`)
- Application router → Public damage view: routes to (evidence: `client/src/App.js`)
- Application router → Officer login: routes to (evidence: `client/src/App.js`)
- Application router → Officer dashboard: routes to (evidence: `client/src/App.js`)
- Application router → Footer: renders (evidence: `client/src/App.js`)
- Officer login → Client Firebase setup: uses client config (evidence: `client/src/MyComponents/login.js`)
- Officer login → Firebase store: authenticates officer (evidence: `client/src/MyComponents/login.js`)
- Officer login → Officer dashboard: navigates after login (evidence: `client/src/MyComponents/login.js`)
- Officer dashboard → Client Firebase setup: uses client config (evidence: `client/src/MyComponents/dashboard.js`)
- Officer dashboard → Firebase store: queries damage data (evidence: `client/src/MyComponents/dashboard.js`)
- Public damage view → Client Firebase setup: uses client config (evidence: `client/src/MyComponents/view.js`)
- Public damage view → Firebase store: reads damage data (evidence: `client/src/MyComponents/view.js`)
- Public damage view → Complaint records: submits complaint (evidence: `client/src/MyComponents/view.js`)
- Public damage view → Google Maps services: uses maps services (evidence: `client/src/MyComponents/view.js`)
