# siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system architecture

> Architecture diagram of the GitHub repository siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system
- Repository: https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system

## Overview

The product is a web-based student uniform-compliance monitor. Users upload a photo or stream webcam frames; the backend identifies faces, evaluates uniform and ID-card compliance, scores the result, and exposes student and violation records to the dashboard. The graph also preserves calibration, enrollment/manual review, and analysis-history capabilities documented in the README. Source excerpts show the main analysis and stream flows; some unsampled route-to-service details are therefore omitted.

Main entry points: [`frontend/src/components/Dashboard.jsx`](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/Dashboard.jsx) (Dashboard), [`backend/app/main.py`](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/main.py) (FastAPI application), [`backend/app/routes/analyze.py`](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/analyze.py) (Photo analysis route), [`frontend/src/utils/api.js`](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/utils/api.js) (API and socket client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Web dashboard"]
  node_app["Application shell<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_camera["Camera feed<br/>[CameraFeed.jsx]"]
  node_upload["Image upload<br/>[ImageUpload.jsx]"]
  node_results["Result panels<br/>[Scorecard.jsx]"]
  node_identity["Identity panel"]
  node_override["Manual override<br/>[ManualOverride.jsx]"]
  node_audit["Analysis audit<br/>[AnalysisAudit.jsx]"]
  node_history["Analysis history<br/>[History.jsx]"]
  node_violations_ui["Violation log<br/>[ViolationLog.jsx]"]
  node_api_client["API and socket client<br/>[api.js]"]
end

subgraph group_api["API workflows"]
  node_server["FastAPI application<br/>[main.py]"]
  node_analyze["Photo analysis route<br/>[analyze.py]"]
  node_stream["Live stream route<br/>[stream.py]"]
  node_students["Student management<br/>[students.py]"]
  node_violations["Violation and history routes<br/>[violations.py]"]
  node_calibrate["Uniform calibration<br/>[calibrate.py]"]
end

subgraph group_vision["Vision and scoring"]
  node_face["Face recognition"]
  node_mlp["Face MLP<br/>[mlp_classifier.py]"]
  node_uniform["Uniform detection"]
  node_cnn["Uniform CNN<br/>[cnn_uniform.py]"]
  node_idcard["ID-card detection"]
  node_scoring["Compliance scoring<br/>[scoring.py]"]
  node_drawing["Result annotation<br/>[drawing.py]"]
  node_image_utils["Image conversion<br/>[image_utils.py]"]
end

subgraph group_data["Configuration and records"]
  node_config["Runtime settings<br/>[config.py]"]
  node_database[("SQLite records<br/>[database.py]")]
end

node_user(("Staff user"))

node_user -->|"operates"| node_dashboard
node_app -->|"renders"| node_dashboard
node_dashboard -->|"selects"| node_camera
node_dashboard -->|"selects"| node_upload
node_dashboard -->|"renders"| node_results
node_dashboard -->|"renders"| node_identity
node_dashboard -->|"renders"| node_override
node_dashboard -->|"renders"| node_audit
node_dashboard -->|"renders"| node_violations_ui
node_camera -->|"uses"| node_api_client
node_upload -->|"uses"| node_api_client
node_dashboard -->|"enrolls unknown face"| node_api_client
node_history -->|"fetches history"| node_api_client
node_violations_ui -->|"fetches violations"| node_api_client
node_api_client -->|"posts photo"| node_analyze
node_api_client -->|"streams frames"| node_stream
node_api_client -->|"fetches students"| node_students
node_api_client -->|"fetches records"| node_violations
node_server -->|"mounts route"| node_analyze
node_server -->|"mounts route"| node_stream
node_server -->|"mounts route"| node_students
node_server -->|"mounts route"| node_violations
node_server -->|"mounts route"| node_calibrate
node_server -->|"initializes"| node_database
node_server -->|"initializes"| node_face
node_server -->|"initializes"| node_uniform
node_server -->|"initializes"| node_idcard
node_analyze -->|"decodes upload"| node_image_utils
node_analyze -.->|"recognizes faces"| node_face
node_analyze -.->|"detects uniform"| node_uniform
node_analyze -.->|"detects card"| node_idcard
node_analyze -->|"computes score"| node_scoring
node_analyze -->|"annotates result"| node_drawing
node_analyze -->|"saves analysis"| node_database
node_stream -->|"decodes frames"| node_image_utils
node_stream -.->|"recognizes faces"| node_face
node_stream -.->|"detects uniform"| node_uniform
node_stream -->|"detects card"| node_idcard
node_stream -->|"computes score"| node_scoring
node_stream -.->|"annotates frame"| node_drawing
node_students -->|"manages records"| node_database
node_violations -->|"reads and writes"| node_database
node_calibrate -->|"updates thresholds"| node_config
node_face -->|"classifies embeddings"| node_mlp
node_uniform -->|"classifies components"| node_cnn
node_face -->|"loads student data"| node_database
node_database -->|"uses settings"| node_config
node_mlp -->|"uses settings"| node_config

click node_app "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/Dashboard.jsx"
click node_camera "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/CameraFeed.jsx"
click node_upload "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/ImageUpload.jsx"
click node_results "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/Scorecard.jsx"
click node_identity "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/IdentificationPanel.jsx"
click node_override "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/ManualOverride.jsx"
click node_audit "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/AnalysisAudit.jsx"
click node_history "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/History.jsx"
click node_violations_ui "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/ViolationLog.jsx"
click node_api_client "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/utils/api.js"
click node_server "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/main.py"
click node_analyze "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/analyze.py"
click node_stream "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/stream.py"
click node_students "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/students.py"
click node_violations "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/violations.py"
click node_calibrate "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/calibrate.py"
click node_face "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/face_recognition.py"
click node_mlp "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/models/mlp_classifier.py"
click node_uniform "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/uniform_detection.py"
click node_cnn "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/models/cnn_uniform.py"
click node_idcard "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/id_card_detection.py"
click node_scoring "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/scoring.py"
click node_drawing "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/utils/drawing.py"
click node_image_utils "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/utils/image_utils.py"
click node_config "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/config.py"
click node_database "https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/database.py"

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_dashboard,node_camera,node_upload,node_results,node_identity,node_override,node_audit,node_history,node_violations_ui,node_api_client,node_user toneBlue
class node_server,node_analyze,node_stream,node_students,node_violations,node_calibrate toneAmber
class node_face,node_mlp,node_uniform,node_cnn,node_idcard,node_scoring,node_drawing,node_image_utils toneMint
class node_config,node_database toneRose
```

## Components

### Web dashboard

- [Application shell](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Dashboard](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/Dashboard.jsx): `frontend/src/components/Dashboard.jsx`
- [Camera feed](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/CameraFeed.jsx): `frontend/src/components/CameraFeed.jsx`
- [Image upload](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/ImageUpload.jsx): `frontend/src/components/ImageUpload.jsx`
- [Result panels](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/Scorecard.jsx): `frontend/src/components/Scorecard.jsx`
- [Identity panel](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/IdentificationPanel.jsx): `frontend/src/components/IdentificationPanel.jsx`
- [Manual override](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/ManualOverride.jsx): `frontend/src/components/ManualOverride.jsx`
- [Analysis audit](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/AnalysisAudit.jsx): `frontend/src/components/AnalysisAudit.jsx`
- [Analysis history](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/History.jsx): `frontend/src/components/History.jsx`
- [Violation log](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/components/ViolationLog.jsx): `frontend/src/components/ViolationLog.jsx`
- [API and socket client](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/frontend/src/utils/api.js): `frontend/src/utils/api.js`

### API workflows

- [FastAPI application](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/main.py): `backend/app/main.py`
- [Photo analysis route](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/analyze.py): `backend/app/routes/analyze.py`
- [Live stream route](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/stream.py): `backend/app/routes/stream.py`
- [Student management](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/students.py): `backend/app/routes/students.py`
- [Violation and history routes](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/violations.py): `backend/app/routes/violations.py`
- [Uniform calibration](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/routes/calibrate.py): `backend/app/routes/calibrate.py`

### Vision and scoring

- [Face recognition](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/face_recognition.py): `backend/app/pipeline/face_recognition.py`
- [Face MLP](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/models/mlp_classifier.py): `backend/app/models/mlp_classifier.py`
- [Uniform detection](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/uniform_detection.py): `backend/app/pipeline/uniform_detection.py`
- [Uniform CNN](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/models/cnn_uniform.py): `backend/app/models/cnn_uniform.py`
- [ID-card detection](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/id_card_detection.py): `backend/app/pipeline/id_card_detection.py`
- [Compliance scoring](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/pipeline/scoring.py): `backend/app/pipeline/scoring.py`
- [Result annotation](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/utils/drawing.py): `backend/app/utils/drawing.py`
- [Image conversion](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/utils/image_utils.py): `backend/app/utils/image_utils.py`

### Configuration and records

- [Runtime settings](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/config.py): `backend/app/config.py`
- [SQLite records](https://github.com/siddeshkhandekar/artificial-neural-network---custom-student-uniform-compliance-detection-system/blob/main/backend/app/database.py): `backend/app/database.py`

### Other components

- **Staff user**

## Connections

- Staff user → Dashboard: operates (evidence: `README.md`)
- Application shell → Dashboard: renders (evidence: `frontend/src/App.jsx`)
- Dashboard → Camera feed: selects (evidence: `frontend/src/components/Dashboard.jsx`)
- Dashboard → Image upload: selects (evidence: `frontend/src/components/Dashboard.jsx`)
- Dashboard → Result panels: renders (evidence: `frontend/src/components/Dashboard.jsx`)
- Dashboard → Identity panel: renders (evidence: `frontend/src/components/Dashboard.jsx`)
- Dashboard → Manual override: renders (evidence: `frontend/src/components/Dashboard.jsx`)
- Dashboard → Analysis audit: renders (evidence: `frontend/src/components/Dashboard.jsx`)
- Dashboard → Violation log: renders (evidence: `frontend/src/components/Dashboard.jsx`)
- Camera feed → API and socket client: uses (evidence: `frontend/src/components/CameraFeed.jsx`)
- Image upload → API and socket client: uses (evidence: `frontend/src/components/ImageUpload.jsx`)
- Dashboard → API and socket client: enrolls unknown face (evidence: `frontend/src/components/Dashboard.jsx`)
- Analysis history → API and socket client: fetches history (evidence: `frontend/src/components/History.jsx`)
- Violation log → API and socket client: fetches violations (evidence: `frontend/src/components/ViolationLog.jsx`)
- API and socket client → Photo analysis route: posts photo (evidence: `frontend/src/utils/api.js`)
- API and socket client → Live stream route: streams frames (evidence: `frontend/src/utils/api.js`)
- API and socket client → Student management: fetches students (evidence: `frontend/src/utils/api.js`)
- API and socket client → Violation and history routes: fetches records (evidence: `frontend/src/utils/api.js`)
- FastAPI application → Photo analysis route: mounts route (evidence: `backend/app/main.py`)
- FastAPI application → Live stream route: mounts route (evidence: `backend/app/main.py`)
- FastAPI application → Student management: mounts route (evidence: `backend/app/main.py`)
- FastAPI application → Violation and history routes: mounts route (evidence: `backend/app/main.py`)
- FastAPI application → Uniform calibration: mounts route (evidence: `backend/app/main.py`)
- FastAPI application → SQLite records: initializes (evidence: `backend/app/main.py`)
- FastAPI application → Face recognition: initializes (evidence: `backend/app/main.py`)
- FastAPI application → Uniform detection: initializes (evidence: `backend/app/main.py`)
- FastAPI application → ID-card detection: initializes (evidence: `backend/app/main.py`)
- Photo analysis route → Image conversion: decodes upload (evidence: `backend/app/routes/analyze.py`)
- Photo analysis route → Face recognition: recognizes faces
- Photo analysis route → Uniform detection: detects uniform
- Photo analysis route → ID-card detection: detects card
- Photo analysis route → Compliance scoring: computes score (evidence: `backend/app/routes/analyze.py`)
- Photo analysis route → Result annotation: annotates result (evidence: `backend/app/routes/analyze.py`)
- Photo analysis route → SQLite records: saves analysis (evidence: `backend/app/routes/analyze.py`)
- Live stream route → Image conversion: decodes frames (evidence: `backend/app/routes/stream.py`)
- Live stream route → Face recognition: recognizes faces
- Live stream route → Uniform detection: detects uniform
- Live stream route → ID-card detection: detects card (evidence: `backend/app/routes/stream.py`)
- Live stream route → Compliance scoring: computes score (evidence: `backend/app/routes/stream.py`)
- Live stream route → Result annotation: annotates frame (evidence: `backend/app/routes/stream.py`)
- Student management → SQLite records: manages records (evidence: `backend/app/routes/students.py`)
- Violation and history routes → SQLite records: reads and writes (evidence: `backend/app/routes/violations.py`)
- Uniform calibration → Runtime settings: updates thresholds (evidence: `backend/app/routes/calibrate.py`)
- Face recognition → Face MLP: classifies embeddings (evidence: `backend/app/pipeline/face_recognition.py`)
- Uniform detection → Uniform CNN: classifies components (evidence: `backend/app/pipeline/uniform_detection.py`)
- Face recognition → SQLite records: loads student data (evidence: `backend/app/pipeline/face_recognition.py`)
- SQLite records → Runtime settings: uses settings (evidence: `backend/app/database.py`)
- Face MLP → Runtime settings: uses settings (evidence: `backend/app/models/mlp_classifier.py`)
