# gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system architecture

> Architecture diagram of the GitHub repository gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-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/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system
- Repository: https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system

## Overview

Dump Surveillance AI is a Django application for detecting illegal dumping and supporting waste-management response. Its documented surveillance flow processes CCTV footage, detects dumping and vehicle plates, analyzes incidents, and presents hotspots on maps; citizens can also submit reports. The README additionally describes nearby legal-site discovery and a waste-guidance chatbot. The tree and excerpts do not show all of these implementations or their wiring, so documented capability links cite the README; unverified implementation links are omitted.

Main entry points: [`garbmgmt/login/ml/mgarbdetect.py`](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/ml/mgarbdetect.py) (Dump Detection), [`garbmgmt/login/cctvcamstream/rtsp.py`](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/cctvcamstream/rtsp.py) (RTSP Processing), [`garbmgmt/login/ml`](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/tree/main/garbmgmt/login/ml) (Incident Analysis), [`garbmgmt/static/js/main.js`](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/static/js/main.js) (Hotspot Maps)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_surveillance["Surveillance AI"]
  node_rtsp["RTSP Processing<br/>[rtsp.py]"]
  node_dumpdetect["Dump Detection<br/>[mgarbdetect.py]"]
  node_plateocr["Plate Recognition<br/>[numberplate3.py]"]
  node_cctvviews["CCTV Views<br/>[cctv_views.py]"]
end

subgraph group_incident["Incident Management"]
  node_analysis["Incident Analysis"]
  node_evidence["Evidence Sync"]
  node_synccommand["Event Sync<br/>[sync_events.py]"]
  node_reports["Citizen Reports<br/>[report_views.py]"]
  node_reporting["Report Intake"]
  node_maps["Hotspot Maps<br/>[main.js]"]
end

subgraph group_public["Public Services"]
  node_legal["Legal Site Finder"]
  node_chatbot["Waste Chatbot"]
end

subgraph group_platform["Web Platform"]
  node_auth["Authentication<br/>[auth_views.py]"]
  node_settings["Django Settings<br/>[base.py]"]
end

node_authority(("Authorities"))
node_citizens(("Citizens"))
node_cctv(("CCTV Feeds"))

node_cctv -->|"streams to"| node_rtsp
node_rtsp -->|"provides footage"| node_dumpdetect
node_dumpdetect -->|"extracts plates"| node_plateocr
node_dumpdetect -->|"analyzes incidents"| node_analysis
node_analysis -->|"visualizes hotspots"| node_maps
node_citizens -->|"submit reports"| node_reporting
node_citizens -->|"finds nearby sites"| node_legal
node_citizens -->|"asks for guidance"| node_chatbot
node_authority -->|"views hotspots"| node_maps

click node_rtsp "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/cctvcamstream/rtsp.py"
click node_dumpdetect "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/ml/mgarbdetect.py"
click node_plateocr "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/ml/numberplate3.py"
click node_cctvviews "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/views/cctv_views.py"
click node_analysis "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/tree/main/garbmgmt/login/ml"
click node_evidence "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/evidence_manager.py"
click node_synccommand "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/management/commands/sync_events.py"
click node_reports "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/views/report_views.py"
click node_reporting "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/tree/main/garbmgmt/login"
click node_maps "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/static/js/main.js"
click node_legal "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/tree/main/garbmgmt/login"
click node_chatbot "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/generate_chatbot_data.py"
click node_auth "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/views/auth_views.py"
click node_settings "https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/garbmgmt/settings/base.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_rtsp,node_dumpdetect,node_plateocr,node_cctvviews toneBlue
class node_analysis,node_evidence,node_synccommand,node_reports,node_reporting,node_maps toneAmber
class node_legal,node_chatbot toneMint
class node_auth,node_settings toneRose
class node_authority,node_citizens,node_cctv toneIndigo
```

## Components

### Surveillance AI

- [RTSP Processing](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/cctvcamstream/rtsp.py): `garbmgmt/login/cctvcamstream/rtsp.py`
- [Dump Detection](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/ml/mgarbdetect.py): `garbmgmt/login/ml/mgarbdetect.py`
- [Plate Recognition](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/ml/numberplate3.py): `garbmgmt/login/ml/numberplate3.py`
- [CCTV Views](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/views/cctv_views.py): `garbmgmt/login/views/cctv_views.py`

### Incident Management

- [Incident Analysis](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/tree/main/garbmgmt/login/ml): `garbmgmt/login/ml`
- [Evidence Sync](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/evidence_manager.py): `garbmgmt/login/evidence_manager.py`
- [Event Sync](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/management/commands/sync_events.py): `garbmgmt/login/management/commands/sync_events.py`
- [Citizen Reports](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/views/report_views.py): `garbmgmt/login/views/report_views.py`
- [Report Intake](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/tree/main/garbmgmt/login): `garbmgmt/login`
- [Hotspot Maps](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/static/js/main.js): `garbmgmt/static/js/main.js`

### Public Services

- [Legal Site Finder](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/tree/main/garbmgmt/login): `garbmgmt/login`
- [Waste Chatbot](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/generate_chatbot_data.py): `garbmgmt/login/generate_chatbot_data.py`

### Web Platform

- [Authentication](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/login/views/auth_views.py): `garbmgmt/login/views/auth_views.py`
- [Django Settings](https://github.com/gabrielms-svg/illegal-garbage-dumping-detection-and-waste-management-system/blob/main/garbmgmt/garbmgmt/settings/base.py): `garbmgmt/garbmgmt/settings/base.py`

### Other components

- **Authorities**
- **Citizens**
- **CCTV Feeds**

## Connections

- CCTV Feeds → RTSP Processing: streams to
- RTSP Processing → Dump Detection: provides footage
- Dump Detection → Plate Recognition: extracts plates
- Dump Detection → Incident Analysis: analyzes incidents
- Incident Analysis → Hotspot Maps: visualizes hotspots
- Citizens → Report Intake: submit reports
- Citizens → Legal Site Finder: finds nearby sites
- Citizens → Waste Chatbot: asks for guidance
- Authorities → Hotspot Maps: views hotspots
