# moor2006/waste-management architecture

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

- Interactive diagram: https://gitdiagram.com/moor2006/waste-management
- Repository: https://github.com/moor2006/waste-management

## Overview

This Flask application is a small waste-collection portal. Visitors can view the home page, submit collection requests, and access login, dashboard, tracking, complaints, and reports pages. The main data workflow stores submitted requests in SQLite and displays them on the dashboard; login checks SQLite user records. The source shows route and database behavior, but the templates were not inspected, so their internal behavior and the purpose of the tracking, complaints, and reports pages are unknown.

Main entry points: [`app.py`](https://github.com/moor2006/waste-management/blob/main/app.py) (Login route), [`database.db`](https://github.com/moor2006/waste-management/blob/main/database.db) (SQLite database), [`templates/index.html`](https://github.com/moor2006/waste-management/blob/main/templates/index.html) (Home page), [`templates/login.html`](https://github.com/moor2006/waste-management/blob/main/templates/login.html) (Login page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web routes"]
  node_home["Home route<br/>[app.py]"]
  node_login["Login route<br/>[app.py]"]
  node_dashboard["Dashboard route<br/>[app.py]"]
  node_collection["Collection route<br/>[app.py]"]
  node_tracking["Tracking route<br/>[app.py]"]
  node_complaints["Complaints route<br/>[app.py]"]
  node_reports["Reports route<br/>[app.py]"]
end

subgraph group_views["Page templates"]
  node_home_view["Home page<br/>[index.html]"]
  node_login_view["Login page<br/>[login.html]"]
  node_dashboard_view["Dashboard page<br/>[dashboard.html]"]
  node_collection_view["Collection form"]
  node_tracking_view["Tracking page<br/>[tracking.html]"]
  node_complaints_view["Complaints page<br/>[complaints.html]"]
  node_reports_view["Reports page<br/>[reports.html]"]
end

subgraph group_data["Persistence"]
  node_sqlite[("SQLite database<br/>[database.db]")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests"| node_home
node_visitor -->|"submits credentials"| node_login
node_visitor -->|"requests"| node_dashboard
node_visitor -->|"submits request"| node_collection
node_visitor -->|"requests"| node_tracking
node_visitor -->|"requests"| node_complaints
node_visitor -->|"requests"| node_reports
node_home -->|"renders"| node_home_view
node_login -->|"renders"| node_login_view
node_login -->|"checks credentials"| node_sqlite
node_login -->|"calls on success"| node_dashboard
node_dashboard -->|"reads requests"| node_sqlite
node_dashboard -->|"renders"| node_dashboard_view
node_collection -->|"renders"| node_collection_view
node_collection -->|"stores submission"| node_sqlite
node_collection -->|"returns confirmation"| node_visitor
node_tracking -->|"renders"| node_tracking_view
node_complaints -->|"renders"| node_complaints_view
node_reports -->|"renders"| node_reports_view
node_home -->|"returns page"| node_visitor
node_login -->|"returns response"| node_visitor
node_dashboard -->|"returns page"| node_visitor
node_tracking -->|"returns page"| node_visitor
node_complaints -->|"returns page"| node_visitor
node_reports -->|"returns page"| node_visitor

click node_home "https://github.com/moor2006/waste-management/blob/main/app.py"
click node_login "https://github.com/moor2006/waste-management/blob/main/app.py"
click node_dashboard "https://github.com/moor2006/waste-management/blob/main/app.py"
click node_collection "https://github.com/moor2006/waste-management/blob/main/app.py"
click node_tracking "https://github.com/moor2006/waste-management/blob/main/app.py"
click node_complaints "https://github.com/moor2006/waste-management/blob/main/app.py"
click node_reports "https://github.com/moor2006/waste-management/blob/main/app.py"
click node_home_view "https://github.com/moor2006/waste-management/blob/main/templates/index.html"
click node_login_view "https://github.com/moor2006/waste-management/blob/main/templates/login.html"
click node_dashboard_view "https://github.com/moor2006/waste-management/blob/main/templates/dashboard.html"
click node_collection_view "https://github.com/moor2006/waste-management/blob/main/templates/waste-collection.html"
click node_tracking_view "https://github.com/moor2006/waste-management/blob/main/templates/tracking.html"
click node_complaints_view "https://github.com/moor2006/waste-management/blob/main/templates/complaints.html"
click node_reports_view "https://github.com/moor2006/waste-management/blob/main/templates/reports.html"
click node_sqlite "https://github.com/moor2006/waste-management/blob/main/database.db"

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_home,node_login,node_dashboard,node_collection,node_tracking,node_complaints,node_reports toneBlue
class node_home_view,node_login_view,node_dashboard_view,node_collection_view,node_tracking_view,node_complaints_view,node_reports_view toneAmber
class node_sqlite toneMint
class node_visitor toneIndigo
```

## Components

### Web routes

- [Home route](https://github.com/moor2006/waste-management/blob/main/app.py): `app.py`
- [Login route](https://github.com/moor2006/waste-management/blob/main/app.py): `app.py`
- [Dashboard route](https://github.com/moor2006/waste-management/blob/main/app.py): `app.py`
- [Collection route](https://github.com/moor2006/waste-management/blob/main/app.py): `app.py`
- [Tracking route](https://github.com/moor2006/waste-management/blob/main/app.py): `app.py`
- [Complaints route](https://github.com/moor2006/waste-management/blob/main/app.py): `app.py`
- [Reports route](https://github.com/moor2006/waste-management/blob/main/app.py): `app.py`

### Page templates

- [Home page](https://github.com/moor2006/waste-management/blob/main/templates/index.html): `templates/index.html`
- [Login page](https://github.com/moor2006/waste-management/blob/main/templates/login.html): `templates/login.html`
- [Dashboard page](https://github.com/moor2006/waste-management/blob/main/templates/dashboard.html): `templates/dashboard.html`
- [Collection form](https://github.com/moor2006/waste-management/blob/main/templates/waste-collection.html): `templates/waste-collection.html`
- [Tracking page](https://github.com/moor2006/waste-management/blob/main/templates/tracking.html): `templates/tracking.html`
- [Complaints page](https://github.com/moor2006/waste-management/blob/main/templates/complaints.html): `templates/complaints.html`
- [Reports page](https://github.com/moor2006/waste-management/blob/main/templates/reports.html): `templates/reports.html`

### Persistence

- [SQLite database](https://github.com/moor2006/waste-management/blob/main/database.db): `database.db`

### Other components

- **Visitor**

## Connections

- Visitor → Home route: requests (evidence: `app.py`)
- Visitor → Login route: submits credentials (evidence: `app.py`)
- Visitor → Dashboard route: requests (evidence: `app.py`)
- Visitor → Collection route: submits request (evidence: `app.py`)
- Visitor → Tracking route: requests (evidence: `app.py`)
- Visitor → Complaints route: requests (evidence: `app.py`)
- Visitor → Reports route: requests (evidence: `app.py`)
- Home route → Home page: renders (evidence: `app.py`)
- Login route → Login page: renders (evidence: `app.py`)
- Login route → SQLite database: checks credentials (evidence: `app.py`)
- Login route → Dashboard route: calls on success (evidence: `app.py`)
- Dashboard route → SQLite database: reads requests (evidence: `app.py`)
- Dashboard route → Dashboard page: renders (evidence: `app.py`)
- Collection route → Collection form: renders (evidence: `app.py`)
- Collection route → SQLite database: stores submission (evidence: `app.py`)
- Collection route → Visitor: returns confirmation (evidence: `app.py`)
- Tracking route → Tracking page: renders (evidence: `app.py`)
- Complaints route → Complaints page: renders (evidence: `app.py`)
- Reports route → Reports page: renders (evidence: `app.py`)
- Home route → Visitor: returns page (evidence: `app.py`)
- Login route → Visitor: returns response (evidence: `app.py`)
- Dashboard route → Visitor: returns page (evidence: `app.py`)
- Tracking route → Visitor: returns page (evidence: `app.py`)
- Complaints route → Visitor: returns page (evidence: `app.py`)
- Reports route → Visitor: returns page (evidence: `app.py`)
