# vignesh-hegde/recycle architecture

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

- Interactive diagram: https://gitdiagram.com/vignesh-hegde/recycle
- Repository: https://github.com/vignesh-hegde/recycle

## Overview

Recycle is a Django web application for arranging recyclable-waste pickups: residents submit requests, and logged-in service agents review them and approve or reject them. The sampled service code confirms agent registration, authentication, request filtering, deletion, and email decisions; the upload view and URL wiring were not sampled, so those connections are intentionally limited. The project configures SQLite and Gmail SMTP.

Main entry points: [`recycle/service/views.py`](https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/views.py) (Agent workflows), [`recycle/recycle/urls.py`](https://github.com/vignesh-hegde/recycle/blob/main/recycle/recycle/urls.py) (Django URL router), [`recycle/one/models.py`](https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/models.py) (Pickup requests), [`recycle/db.sqlite3`](https://github.com/vignesh-hegde/recycle/blob/main/recycle/db.sqlite3) (SQLite database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and UI"]
  node_django["Django URL router<br/>[urls.py]"]
  node_resident_routes["Resident routes<br/>[urls.py]"]
  node_resident_ui["Resident pages"]
  node_service_routes["Service routes<br/>[urls.py]"]
  node_service_ui["Agent pages"]
end

subgraph group_pickup["Pickup handling"]
  node_resident_views["Resident views<br/>[views.py]"]
  node_service_views["Agent workflows<br/>[views.py]"]
  node_upload_form["Pickup form<br/>[forms.py]"]
  node_agent_forms["Agent forms<br/>[forms.py]"]
end

subgraph group_accounts["Accounts and persistence"]
  node_pickup_model["Pickup requests<br/>[models.py]"]
  node_profile_model["Agent profile<br/>[models.py]"]
  node_auth["Django authentication"]
  node_user_model["Django users"]
  node_database[("SQLite database<br/>[db.sqlite3]")]
end

subgraph group_integration["Notifications"]
  node_mail_copy["Pickup email text"]
  node_mail_server["Gmail SMTP"]
  node_secret_helper["Mail credential helper<br/>[hello_world.py]"]
end

node_resident(("Resident"))
node_agent(("Service agent"))

node_resident -->|"opens site"| node_django
node_agent -->|"opens site"| node_django
node_django -->|"routes users"| node_resident_routes
node_django -->|"routes service"| node_service_routes
node_resident -->|"uses pages"| node_resident_ui
node_agent -->|"uses pages"| node_service_ui
node_resident_views -->|"validates with"| node_upload_form
node_upload_form -->|"models request"| node_pickup_model
node_service_views -->|"validates with"| node_agent_forms
node_service_views -->|"filters and deletes"| node_pickup_model
node_service_views -->|"authenticates and logs in"| node_auth
node_agent_forms -->|"defines registration"| node_user_model
node_service_views -->|"uses accounts"| node_user_model
node_profile_model -->|"extends account"| node_user_model
node_pickup_model -->|"persists"| node_database
node_profile_model -->|"persists"| node_database
node_user_model -->|"persists"| node_database
node_service_views -->|"builds decision email"| node_mail_copy
node_service_views -->|"gets credentials"| node_secret_helper
node_service_views -->|"sends email"| node_mail_server

click node_django "https://github.com/vignesh-hegde/recycle/blob/main/recycle/recycle/urls.py"
click node_resident_routes "https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/urls.py"
click node_resident_views "https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/views.py"
click node_resident_ui "https://github.com/vignesh-hegde/recycle/tree/main/recycle/templates/User"
click node_service_routes "https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/urls.py"
click node_service_views "https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/views.py"
click node_service_ui "https://github.com/vignesh-hegde/recycle/tree/main/recycle/templates/service"
click node_upload_form "https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/forms.py"
click node_agent_forms "https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/forms.py"
click node_pickup_model "https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/models.py"
click node_profile_model "https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/models.py"
click node_database "https://github.com/vignesh-hegde/recycle/blob/main/recycle/db.sqlite3"
click node_mail_copy "https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/user_email_messages.py"
click node_secret_helper "https://github.com/vignesh-hegde/recycle/blob/main/recycle/recycle/hello_world.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_django,node_resident_routes,node_resident_ui,node_service_routes,node_service_ui toneBlue
class node_resident_views,node_service_views,node_upload_form,node_agent_forms toneAmber
class node_pickup_model,node_profile_model,node_auth,node_user_model,node_database toneMint
class node_mail_copy,node_mail_server,node_secret_helper toneRose
class node_resident,node_agent toneIndigo
```

## Components

### Web entry and UI

- [Django URL router](https://github.com/vignesh-hegde/recycle/blob/main/recycle/recycle/urls.py): `recycle/recycle/urls.py`
- [Resident routes](https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/urls.py): `recycle/one/urls.py`
- [Resident pages](https://github.com/vignesh-hegde/recycle/tree/main/recycle/templates/User): `recycle/templates/User`
- [Service routes](https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/urls.py): `recycle/service/urls.py`
- [Agent pages](https://github.com/vignesh-hegde/recycle/tree/main/recycle/templates/service): `recycle/templates/service`

### Pickup handling

- [Resident views](https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/views.py): `recycle/one/views.py`
- [Agent workflows](https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/views.py): `recycle/service/views.py`
- [Pickup form](https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/forms.py): `recycle/one/forms.py`
- [Agent forms](https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/forms.py): `recycle/service/forms.py`

### Accounts and persistence

- [Pickup requests](https://github.com/vignesh-hegde/recycle/blob/main/recycle/one/models.py): `recycle/one/models.py`
- [Agent profile](https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/models.py): `recycle/service/models.py`
- **Django authentication**
- **Django users**
- [SQLite database](https://github.com/vignesh-hegde/recycle/blob/main/recycle/db.sqlite3): `recycle/db.sqlite3`

### Notifications

- [Pickup email text](https://github.com/vignesh-hegde/recycle/blob/main/recycle/service/user_email_messages.py): `recycle/service/user_email_messages.py`
- **Gmail SMTP**
- [Mail credential helper](https://github.com/vignesh-hegde/recycle/blob/main/recycle/recycle/hello_world.py): `recycle/recycle/hello_world.py`

### Other components

- **Resident**
- **Service agent**

## Connections

- Resident → Django URL router: opens site
- Service agent → Django URL router: opens site
- Django URL router → Resident routes: routes users
- Django URL router → Service routes: routes service
- Resident → Resident pages: uses pages
- Service agent → Agent pages: uses pages
- Resident views → Pickup form: validates with
- Pickup form → Pickup requests: models request
- Agent workflows → Agent forms: validates with
- Agent workflows → Pickup requests: filters and deletes
- Agent workflows → Django authentication: authenticates and logs in
- Agent forms → Django users: defines registration
- Agent workflows → Django users: uses accounts
- Agent profile → Django users: extends account
- Pickup requests → SQLite database: persists
- Agent profile → SQLite database: persists
- Django users → SQLite database: persists
- Agent workflows → Pickup email text: builds decision email
- Agent workflows → Mail credential helper: gets credentials
- Agent workflows → Gmail SMTP: sends email
