# preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026 architecture

> Architecture diagram of the GitHub repository preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026
- Repository: https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026

## Overview

Sentinel VMS is a Flask-based CCTV registry, live viewing, and traffic analytics platform. The main workflow is a user viewing camera feeds, enabling analytics, and reviewing resulting events, plate detections, watchlist alerts, vehicle history, and violations. Camera ingestion, frame streaming, detection/tracking, and persistence are distinct runtime stages; ANPR and NVIDIA-powered scene analysis extend them. The README documents the UI capabilities, while sampled source confirms key engine and storage behavior; omitted route code limits certainty about some UI-to-API wiring.

Main entry points: [`app.py`](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py) (Flask Application), [`scene_analyzer.py`](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/scene_analyzer.py) (Scene Analysis), [`templates/index.html`](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/index.html) (Dashboard and Map), [`static/spa.js`](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/static/spa.js) (Page Navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Viewing and Registry"]
  node_dashboard_ui["Dashboard and Map<br/>[index.html]"]
  node_spa["Page Navigation<br/>[spa.js]"]
  node_flask["Flask Application<br/>[app.py]"]
  node_registry["Camera Registry<br/>[app.py]"]
  node_stream["Stream Engine<br/>[app.py]"]
end

subgraph group_analytics["Detection and Analysis"]
  node_analytics_engine["Analytics Engine<br/>[app.py]"]
  node_tracker["Vehicle Tracker<br/>[app.py]"]
  node_anpr["Plate Recognition<br/>[anpr.py]"]
  node_scene["Scene Analysis<br/>[scene_analyzer.py]"]
end

subgraph group_records["Events and Investigation"]
  node_event_ui["Event Log<br/>[events.html]"]
  node_watch_ui["Watchlist<br/>[watchlist.html]"]
  node_anpr_ui["ANPR Alerts<br/>[anpr_alerts.html]"]
  node_search_ui["Vehicle Search"]
  node_violation_ui["Violation Evidence<br/>[violations.html]"]
  node_database[("SQLite Records")]
end

subgraph group_integration["External Systems"]
  node_gateway["Camera Gateway"]
  node_cameras["CCTV Cameras"]
  node_nim["NVIDIA NIM"]
end

node_user(("Operator"))
node_operator_browser(("Browser"))

node_user -->|"uses"| node_operator_browser
node_operator_browser -->|"views"| node_dashboard_ui
node_operator_browser -->|"navigates"| node_spa
node_spa -->|"fetches pages"| node_flask
node_dashboard_ui -->|"requests data"| node_flask
node_event_ui -->|"searches events"| node_flask
node_watch_ui -->|"manages plates"| node_flask
node_anpr_ui -->|"requests alerts"| node_flask
node_search_ui -->|"searches plates"| node_flask
node_violation_ui -->|"requests evidence"| node_flask
node_flask -->|"loads cameras"| node_registry
node_registry -->|"fetches registry"| node_gateway
node_registry -->|"reads and writes"| node_database
node_flask -->|"starts streams"| node_stream
node_stream -->|"reads camera URLs"| node_database
node_stream -->|"pulls video"| node_cameras
node_flask -->|"starts analytics"| node_analytics_engine
node_analytics_engine -->|"processes frames"| node_stream
node_analytics_engine -->|"assigns tracks"| node_tracker
node_analytics_engine -->|"reads plates"| node_anpr
node_analytics_engine -->|"stores detections"| node_database
node_flask -->|"requests analysis"| node_scene
node_scene -.->|"analyzes frames"| node_nim
node_scene -->|"stores violations"| node_database

click node_dashboard_ui "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/index.html"
click node_spa "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/static/spa.js"
click node_event_ui "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/events.html"
click node_watch_ui "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/watchlist.html"
click node_anpr_ui "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/anpr_alerts.html"
click node_search_ui "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/vehicle_search.html"
click node_violation_ui "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/violations.html"
click node_flask "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py"
click node_registry "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py"
click node_stream "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py"
click node_analytics_engine "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py"
click node_tracker "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py"
click node_anpr "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/anpr.py"
click node_scene "https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/scene_analyzer.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_dashboard_ui,node_spa,node_flask,node_registry,node_stream,node_operator_browser toneBlue
class node_analytics_engine,node_tracker,node_anpr,node_scene toneAmber
class node_event_ui,node_watch_ui,node_anpr_ui,node_search_ui,node_violation_ui,node_database toneMint
class node_gateway,node_cameras,node_nim toneRose
class node_user toneIndigo
```

## Components

### Viewing and Registry

- [Dashboard and Map](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/index.html): `templates/index.html`
- [Page Navigation](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/static/spa.js): `static/spa.js`
- [Flask Application](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py): `app.py`
- [Camera Registry](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py): `app.py`
- [Stream Engine](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py): `app.py`

### Detection and Analysis

- [Analytics Engine](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py): `app.py`
- [Vehicle Tracker](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/app.py): `app.py`
- [Plate Recognition](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/anpr.py): `anpr.py`
- [Scene Analysis](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/scene_analyzer.py): `scene_analyzer.py`

### Events and Investigation

- [Event Log](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/events.html): `templates/events.html`
- [Watchlist](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/watchlist.html): `templates/watchlist.html`
- [ANPR Alerts](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/anpr_alerts.html): `templates/anpr_alerts.html`
- [Vehicle Search](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/vehicle_search.html): `templates/vehicle_search.html`
- [Violation Evidence](https://github.com/preetanshmgohil-sketch/sentinal-gujrat-police-hackathon-2026/blob/main/templates/violations.html): `templates/violations.html`
- **SQLite Records**

### External Systems

- **Camera Gateway**
- **CCTV Cameras**
- **NVIDIA NIM**

### Other components

- **Operator**
- **Browser**

## Connections

- Operator → Browser: uses
- Browser → Dashboard and Map: views
- Browser → Page Navigation: navigates
- Page Navigation → Flask Application: fetches pages
- Dashboard and Map → Flask Application: requests data
- Event Log → Flask Application: searches events
- Watchlist → Flask Application: manages plates
- ANPR Alerts → Flask Application: requests alerts
- Vehicle Search → Flask Application: searches plates
- Violation Evidence → Flask Application: requests evidence
- Flask Application → Camera Registry: loads cameras
- Camera Registry → Camera Gateway: fetches registry
- Camera Registry → SQLite Records: reads and writes
- Flask Application → Stream Engine: starts streams
- Stream Engine → SQLite Records: reads camera URLs
- Stream Engine → CCTV Cameras: pulls video
- Flask Application → Analytics Engine: starts analytics
- Analytics Engine → Stream Engine: processes frames
- Analytics Engine → Vehicle Tracker: assigns tracks
- Analytics Engine → Plate Recognition: reads plates
- Analytics Engine → SQLite Records: stores detections
- Flask Application → Scene Analysis: requests analysis
- Scene Analysis → NVIDIA NIM: analyzes frames
- Scene Analysis → SQLite Records: stores violations
