# shourya-912/knock-at-door architecture

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

- Interactive diagram: https://gitdiagram.com/shourya-912/knock-at-door
- Repository: https://github.com/shourya-912/knock-at-door

## Overview

Knock at Door is a Flask marketplace connecting local customers and vendors. Customers register, discover nearby vendors and products, and manage alerts; vendors register, maintain inventory and service localities, and alert customers. Flask routes in `frontend-flask/app.py` handle these workflows and use MongoDB for marketplace data. The README documents ratings and real-time notifications as additional capabilities. The source excerpt is partial, so some subsystem links rely on README statements rather than inspected route implementations.

Main entry points: [`frontend-flask/app.py`](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py) (Vendor Discovery), [`frontend-flask/templates/vendor_home.html`](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/templates/vendor_home.html) (Vendor Dashboard), [`frontend-flask/templates/customer_home.html`](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/templates/customer_home.html) (Customer Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts &amp; Profiles"]
  node_flask_app["Flask Routes<br/>[app.py]"]
  node_registration["Registration &amp; Login<br/>[app.py]"]
  node_profiles["Profile Management<br/>[app.py]"]
end

subgraph group_marketplace["Vendor Marketplace"]
  node_mongo[("Marketplace Data")]
  node_inventory["Item Management<br/>[app.py]"]
  node_localities["Service Localities<br/>[app.py]"]
  node_vendor_dashboard["Vendor Dashboard<br/>[vendor_home.html]"]
end

subgraph group_customer["Customer Experience"]
  node_discovery["Vendor Discovery<br/>[app.py]"]
  node_customer_dashboard["Customer Dashboard<br/>[customer_home.html]"]
  node_ratings["Ratings &amp; Reviews<br/>[app.py]"]
end

subgraph group_realtime["Alerts &amp; Realtime"]
  node_alert_dispatch["Alert Management<br/>[app.py]"]
  node_notifications["Realtime Notifications<br/>[app.py]"]
end

node_visitor(("Visitor"))
node_vendor_user(("Vendor"))
node_customer_user(("Customer"))
node_socket_client["Socket.IO Client"]

node_visitor -->|"opens marketplace"| node_flask_app
node_vendor_user -->|"registers"| node_registration
node_customer_user -->|"registers"| node_registration
node_registration -.->|"stores accounts"| node_mongo
node_vendor_user -->|"manages products"| node_inventory
node_inventory -->|"updates items"| node_mongo
node_vendor_user -->|"sets service areas"| node_localities
node_localities -.->|"stores localities"| node_mongo
node_flask_app -->|"renders"| node_vendor_dashboard
node_customer_user -->|"browses vendors"| node_discovery
node_discovery -->|"queries nearby vendors"| node_mongo
node_discovery -->|"shows vendors"| node_customer_dashboard
node_customer_user -->|"submits reviews"| node_ratings
node_ratings -.->|"stores ratings"| node_mongo
node_vendor_user -->|"sends alerts"| node_alert_dispatch
node_alert_dispatch -.->|"records alerts"| node_mongo
node_customer_user -->|"manages alerts"| node_alert_dispatch
node_socket_client -->|"connects via Socket.IO"| node_notifications
node_notifications -.->|"notifies responses"| node_vendor_user
node_notifications -.->|"delivers alerts"| node_customer_user
node_vendor_user -->|"edits profile"| node_profiles
node_customer_user -->|"edits profile"| node_profiles
node_profiles -.->|"updates profiles"| node_mongo

click node_flask_app "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_registration "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_profiles "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_inventory "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_localities "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_vendor_dashboard "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/templates/vendor_home.html"
click node_discovery "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_customer_dashboard "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/templates/customer_home.html"
click node_ratings "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_alert_dispatch "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py"
click node_notifications "https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.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_flask_app,node_registration,node_profiles,node_socket_client toneBlue
class node_mongo,node_inventory,node_localities,node_vendor_dashboard toneAmber
class node_discovery,node_customer_dashboard,node_ratings toneMint
class node_alert_dispatch,node_notifications toneRose
class node_visitor,node_vendor_user,node_customer_user toneIndigo
```

## Components

### Accounts & Profiles

- [Flask Routes](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`
- [Registration & Login](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`
- [Profile Management](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`

### Vendor Marketplace

- **Marketplace Data**
- [Item Management](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`
- [Service Localities](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`
- [Vendor Dashboard](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/templates/vendor_home.html): `frontend-flask/templates/vendor_home.html`

### Customer Experience

- [Vendor Discovery](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`
- [Customer Dashboard](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/templates/customer_home.html): `frontend-flask/templates/customer_home.html`
- [Ratings & Reviews](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`

### Alerts & Realtime

- [Alert Management](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`
- [Realtime Notifications](https://github.com/shourya-912/knock-at-door/blob/main/frontend-flask/app.py): `frontend-flask/app.py`

### Other components

- **Visitor**
- **Vendor**
- **Customer**
- **Socket.IO Client**

## Connections

- Visitor → Flask Routes: opens marketplace (evidence: `README.md`)
- Vendor → Registration & Login: registers (evidence: `README.md`)
- Customer → Registration & Login: registers (evidence: `README.md`)
- Registration & Login → Marketplace Data: stores accounts (evidence: `README.md`)
- Vendor → Item Management: manages products (evidence: `README.md`)
- Item Management → Marketplace Data: updates items (evidence: `frontend-flask/app.py`)
- Vendor → Service Localities: sets service areas (evidence: `README.md`)
- Service Localities → Marketplace Data: stores localities (evidence: `README.md`)
- Flask Routes → Vendor Dashboard: renders (evidence: `frontend-flask/app.py`)
- Customer → Vendor Discovery: browses vendors (evidence: `README.md`)
- Vendor Discovery → Marketplace Data: queries nearby vendors (evidence: `frontend-flask/app.py`)
- Vendor Discovery → Customer Dashboard: shows vendors (evidence: `README.md`)
- Customer → Ratings & Reviews: submits reviews (evidence: `frontend-flask/app.py`)
- Ratings & Reviews → Marketplace Data: stores ratings
- Vendor → Alert Management: sends alerts (evidence: `README.md`)
- Alert Management → Marketplace Data: records alerts (evidence: `README.md`)
- Customer → Alert Management: manages alerts (evidence: `README.md`)
- Socket.IO Client → Realtime Notifications: connects via Socket.IO (evidence: `frontend-flask/app.py`)
- Realtime Notifications → Vendor: notifies responses (evidence: `README.md`)
- Realtime Notifications → Customer: delivers alerts (evidence: `README.md`)
- Vendor → Profile Management: edits profile (evidence: `frontend-flask/app.py`)
- Customer → Profile Management: edits profile (evidence: `frontend-flask/app.py`)
- Profile Management → Marketplace Data: updates profiles
