# bunniehunnie131-ai/draft architecture

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

- Interactive diagram: https://gitdiagram.com/bunniehunnie131-ai/draft
- Repository: https://github.com/bunniehunnie131-ai/draft

## Overview

eKasi Local Hub is a Flask marketplace prototype connecting township customers with local service providers, with admin oversight. The principal workflow is registration and approval, provider discovery, booking, service completion and payment recording, followed by reviews or complaints; providers also manage expenses and financial summaries. The app uses a local JSON-backed store, with an optional Neo4j audit mirror. The excerpts show selected routes and store operations; other documented features are included, but their internal call paths are not inferred.

Main entry points: [`app.py`](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py) (Flask routes), [`store.py`](https://github.com/bunniehunnie131-ai/draft/blob/main/store.py) (Domain store), [`templates`](https://github.com/bunniehunnie131-ai/draft/tree/main/templates) (HTML pages), [`database/schema.cypher`](https://github.com/bunniehunnie131-ai/draft/blob/main/database/schema.cypher) (Graph schema)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market["Marketplace"]
  node_registration["Registration and approval<br/>[app.py]"]
  node_discovery["Provider discovery<br/>[app.py]"]
  node_dashboards["Role dashboards<br/>[app.py]"]
end

subgraph group_operations["Service Operations"]
  node_booking["Bookings<br/>[app.py]"]
  node_completion["Job completion<br/>[app.py]"]
  node_payments["Payment recording<br/>[app.py]"]
  node_reviews_complaints["Reviews and complaints<br/>[app.py]"]
end

subgraph group_business["Provider Business"]
  node_provider_finance["Provider finances<br/>[app.py]"]
  node_consent["Open Finance consent<br/>[app.py]"]
end

subgraph group_platform["Application Platform"]
  node_flask_app["Flask routes<br/>[app.py]"]
  node_store["Domain store<br/>[store.py]"]
  node_json_data[("Local JSON data<br/>[store.py]")]
  node_neo4j[("Neo4j audit mirror<br/>[store.py]")]
  node_graph_schema["Graph schema<br/>[schema.cypher]"]
  node_pages["HTML pages"]
  node_browser_ui["Browser interactions<br/>[app.js]"]
end

node_customer(("Customer"))
node_provider_actor(("Provider"))
node_admin_actor(("Admin"))

node_customer -->|"uses"| node_flask_app
node_provider_actor -->|"uses"| node_flask_app
node_admin_actor -->|"uses"| node_flask_app
node_flask_app -->|"routes"| node_registration
node_flask_app -->|"routes"| node_discovery
node_flask_app -->|"routes"| node_booking
node_flask_app -->|"routes"| node_completion
node_flask_app -->|"routes"| node_payments
node_flask_app -->|"routes"| node_reviews_complaints
node_flask_app -->|"routes"| node_dashboards
node_flask_app -->|"routes"| node_provider_finance
node_flask_app -->|"routes"| node_consent
node_flask_app -->|"calls"| node_store
node_store -->|"reads and writes"| node_json_data
node_store -.->|"mirrors audit events"| node_neo4j
node_graph_schema -->|"defines schema"| node_neo4j
node_flask_app -->|"renders"| node_pages
node_browser_ui -.->|"enhances"| node_pages

click node_registration "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_discovery "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_booking "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_completion "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_payments "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_reviews_complaints "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_dashboards "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_provider_finance "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_consent "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_flask_app "https://github.com/bunniehunnie131-ai/draft/blob/main/app.py"
click node_store "https://github.com/bunniehunnie131-ai/draft/blob/main/store.py"
click node_json_data "https://github.com/bunniehunnie131-ai/draft/blob/main/store.py"
click node_neo4j "https://github.com/bunniehunnie131-ai/draft/blob/main/store.py"
click node_graph_schema "https://github.com/bunniehunnie131-ai/draft/blob/main/database/schema.cypher"
click node_pages "https://github.com/bunniehunnie131-ai/draft/tree/main/templates"
click node_browser_ui "https://github.com/bunniehunnie131-ai/draft/blob/main/static/js/app.js"

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_registration,node_discovery,node_dashboards toneBlue
class node_booking,node_completion,node_payments,node_reviews_complaints toneAmber
class node_provider_finance,node_consent toneMint
class node_flask_app,node_store,node_json_data,node_neo4j,node_graph_schema,node_pages,node_browser_ui toneRose
class node_customer,node_provider_actor,node_admin_actor toneIndigo
```

## Components

### Marketplace

- [Registration and approval](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`
- [Provider discovery](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`
- [Role dashboards](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`

### Service Operations

- [Bookings](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`
- [Job completion](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`
- [Payment recording](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`
- [Reviews and complaints](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`

### Provider Business

- [Provider finances](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`
- [Open Finance consent](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`

### Application Platform

- [Flask routes](https://github.com/bunniehunnie131-ai/draft/blob/main/app.py): `app.py`
- [Domain store](https://github.com/bunniehunnie131-ai/draft/blob/main/store.py): `store.py`
- [Local JSON data](https://github.com/bunniehunnie131-ai/draft/blob/main/store.py): `store.py`
- [Neo4j audit mirror](https://github.com/bunniehunnie131-ai/draft/blob/main/store.py): `store.py`
- [Graph schema](https://github.com/bunniehunnie131-ai/draft/blob/main/database/schema.cypher): `database/schema.cypher`
- [HTML pages](https://github.com/bunniehunnie131-ai/draft/tree/main/templates): `templates`
- [Browser interactions](https://github.com/bunniehunnie131-ai/draft/blob/main/static/js/app.js): `static/js/app.js`

### Other components

- **Customer**
- **Provider**
- **Admin**

## Connections

- Customer → Flask routes: uses (evidence: `README.md`)
- Provider → Flask routes: uses (evidence: `README.md`)
- Admin → Flask routes: uses (evidence: `README.md`)
- Flask routes → Registration and approval: routes (evidence: `README.md`)
- Flask routes → Provider discovery: routes (evidence: `app.py`)
- Flask routes → Bookings: routes (evidence: `README.md`)
- Flask routes → Job completion: routes (evidence: `app.py`)
- Flask routes → Payment recording: routes (evidence: `README.md`)
- Flask routes → Reviews and complaints: routes (evidence: `app.py`)
- Flask routes → Role dashboards: routes (evidence: `README.md`)
- Flask routes → Provider finances: routes (evidence: `app.py`)
- Flask routes → Open Finance consent: routes (evidence: `README.md`)
- Flask routes → Domain store: calls (evidence: `app.py`)
- Domain store → Local JSON data: reads and writes (evidence: `store.py`)
- Domain store → Neo4j audit mirror: mirrors audit events (evidence: `README.md`)
- Graph schema → Neo4j audit mirror: defines schema (evidence: `README.md`)
- Flask routes → HTML pages: renders (evidence: `app.py`)
- Browser interactions → HTML pages: enhances
