# harshjohn756-collab/hackverse- architecture

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

- Interactive diagram: https://gitdiagram.com/harshjohn756-collab/hackverse-
- Repository: https://github.com/harshjohn756-collab/hackverse-

## Overview

SheEarn is a women-focused services marketplace with provider verification, service discovery and booking, payments, messaging, ratings, and government-scheme information. Its principal workflow is a customer browsing services, booking one, paying, and rating it after completion; providers register, manage services and bookings, and receive payment. The Flask application factory registers the backend routes and serves the frontend. Source excerpts support several route-to-model interactions, but the frontend-to-API wiring and unsampled scheme, admin, and socket behavior are not verified here.

Main entry points: [`sheEarn/backend/app/__init__.py`](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/__init__.py) (Flask app factory), [`sheEarn/backend/instance/she_earn.db`](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/instance/she_earn.db) (Application database), [`sheEarn/backend/app/routes/booking_routes.py`](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/booking_routes.py) (Booking lifecycle), [`sheEarn/backend/app/routes/profile_routes.py`](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/profile_routes.py) (User profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_web["Web pages<br/>[index.html]"]
  node_api_client["API client<br/>[api.js]"]
  node_browse_ui["Browse services<br/>[browse.html]"]
  node_booking_ui["Bookings<br/>[bookings.html]"]
  node_chat_ui["Chat<br/>[chat.html]"]
  node_schemes_ui["Schemes<br/>[schemes.html]"]
  node_wallet_ui["Wallet<br/>[wallet.html]"]
end

subgraph group_identity["Identity and profiles"]
  node_auth["Authentication and KYC<br/>[auth_routes.py]"]
  node_auth_helpers["JWT and roles<br/>[auth.py]"]
  node_profiles["User profiles<br/>[profile_routes.py]"]
  node_uploads["Image uploads<br/>[upload.py]"]
end

subgraph group_marketplace["Marketplace workflow"]
  node_services["Service discovery<br/>[service_routes.py]"]
  node_service_model["Service records<br/>[service.py]"]
  node_bookings["Booking lifecycle<br/>[booking_routes.py]"]
  node_payments["Payments and wallet<br/>[payment_routes.py]"]
  node_ratings["Ratings<br/>[rating_routes.py]"]
end

subgraph group_community["Community and schemes"]
  node_chat["Messaging<br/>[chat_routes.py]"]
  node_socket["Live chat events<br/>[socket_events.py]"]
  node_schemes["Government schemes<br/>[scheme_routes.py]"]
end

subgraph group_platform["Backend platform"]
  node_app["Flask app factory<br/>[__init__.py]"]
  node_admin["Administration<br/>[admin_routes.py]"]
  node_database[("Application database<br/>[she_earn.db]")]
end

node_customer(("Customer / provider"))

node_customer -.->|"uses"| node_web
node_web -.->|"uses"| node_api_client
node_api_client -.->|"calls API"| node_app
node_app -->|"registers"| node_auth
node_app -->|"registers"| node_profiles
node_app -->|"registers"| node_services
node_app -->|"registers"| node_bookings
node_app -->|"registers"| node_payments
node_app -->|"registers"| node_ratings
node_app -->|"registers"| node_chat
node_app -->|"registers"| node_schemes
node_app -->|"registers"| node_admin
node_app -->|"loads events"| node_socket
node_auth -->|"uses"| node_auth_helpers
node_profiles -->|"uses"| node_auth_helpers
node_profiles -->|"stores images"| node_uploads
node_services -->|"queries"| node_service_model
node_services -->|"stores images"| node_uploads
node_bookings -->|"checks availability"| node_service_model
node_payments -->|"checks booking"| node_bookings
node_ratings -->|"verifies completion"| node_bookings
node_ratings -->|"updates rating"| node_service_model
node_auth -->|"reads and writes"| node_database
node_profiles -->|"reads and writes"| node_database
node_services -->|"reads and writes"| node_database
node_bookings -->|"reads and writes"| node_database
node_payments -->|"reads and writes"| node_database
node_ratings -->|"reads and writes"| node_database
node_chat -->|"reads and writes"| node_database
node_socket -.-> node_database
node_schemes -.-> node_database
node_admin -.-> node_database

click node_web "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/index.html"
click node_api_client "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/js/api.js"
click node_browse_ui "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/browse.html"
click node_booking_ui "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/bookings.html"
click node_chat_ui "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/chat.html"
click node_schemes_ui "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/schemes.html"
click node_wallet_ui "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/wallet.html"
click node_app "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/__init__.py"
click node_auth "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/auth_routes.py"
click node_auth_helpers "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/utils/auth.py"
click node_profiles "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/profile_routes.py"
click node_uploads "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/utils/upload.py"
click node_services "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/service_routes.py"
click node_service_model "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/models/service.py"
click node_bookings "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/booking_routes.py"
click node_payments "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/payment_routes.py"
click node_ratings "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/rating_routes.py"
click node_chat "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/chat_routes.py"
click node_socket "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/socket_events.py"
click node_schemes "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/scheme_routes.py"
click node_admin "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/admin_routes.py"
click node_database "https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/instance/she_earn.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_web,node_api_client,node_browse_ui,node_booking_ui,node_chat_ui,node_schemes_ui,node_wallet_ui toneBlue
class node_auth,node_auth_helpers,node_profiles,node_uploads toneAmber
class node_services,node_service_model,node_bookings,node_payments,node_ratings toneMint
class node_chat,node_socket,node_schemes toneRose
class node_app,node_admin,node_database,node_customer toneIndigo
```

## Components

### Web experience

- [Web pages](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/index.html): `sheEarn/frontend/index.html`
- [API client](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/js/api.js): `sheEarn/frontend/js/api.js`
- [Browse services](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/browse.html): `sheEarn/frontend/browse.html`
- [Bookings](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/bookings.html): `sheEarn/frontend/bookings.html`
- [Chat](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/chat.html): `sheEarn/frontend/chat.html`
- [Schemes](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/schemes.html): `sheEarn/frontend/schemes.html`
- [Wallet](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/frontend/wallet.html): `sheEarn/frontend/wallet.html`

### Identity and profiles

- [Authentication and KYC](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/auth_routes.py): `sheEarn/backend/app/routes/auth_routes.py`
- [JWT and roles](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/utils/auth.py): `sheEarn/backend/app/utils/auth.py`
- [User profiles](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/profile_routes.py): `sheEarn/backend/app/routes/profile_routes.py`
- [Image uploads](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/utils/upload.py): `sheEarn/backend/app/utils/upload.py`

### Marketplace workflow

- [Service discovery](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/service_routes.py): `sheEarn/backend/app/routes/service_routes.py`
- [Service records](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/models/service.py): `sheEarn/backend/app/models/service.py`
- [Booking lifecycle](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/booking_routes.py): `sheEarn/backend/app/routes/booking_routes.py`
- [Payments and wallet](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/payment_routes.py): `sheEarn/backend/app/routes/payment_routes.py`
- [Ratings](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/rating_routes.py): `sheEarn/backend/app/routes/rating_routes.py`

### Community and schemes

- [Messaging](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/chat_routes.py): `sheEarn/backend/app/routes/chat_routes.py`
- [Live chat events](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/socket_events.py): `sheEarn/backend/app/routes/socket_events.py`
- [Government schemes](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/scheme_routes.py): `sheEarn/backend/app/routes/scheme_routes.py`

### Backend platform

- [Flask app factory](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/__init__.py): `sheEarn/backend/app/__init__.py`
- [Administration](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/app/routes/admin_routes.py): `sheEarn/backend/app/routes/admin_routes.py`
- [Application database](https://github.com/harshjohn756-collab/hackverse-/blob/main/sheEarn/backend/instance/she_earn.db): `sheEarn/backend/instance/she_earn.db`

### Other components

- **Customer / provider**

## Connections

- Customer / provider → Web pages: uses
- Web pages → API client: uses
- API client → Flask app factory: calls API
- Flask app factory → Authentication and KYC: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → User profiles: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Service discovery: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Booking lifecycle: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Payments and wallet: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Ratings: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Messaging: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Government schemes: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Administration: registers (evidence: `sheEarn/backend/app/__init__.py`)
- Flask app factory → Live chat events: loads events (evidence: `sheEarn/backend/app/__init__.py`)
- Authentication and KYC → JWT and roles: uses (evidence: `sheEarn/backend/app/routes/auth_routes.py`)
- User profiles → JWT and roles: uses (evidence: `sheEarn/backend/app/routes/profile_routes.py`)
- User profiles → Image uploads: stores images (evidence: `sheEarn/backend/app/routes/profile_routes.py`)
- Service discovery → Service records: queries (evidence: `sheEarn/backend/app/routes/service_routes.py`)
- Service discovery → Image uploads: stores images (evidence: `sheEarn/backend/app/routes/service_routes.py`)
- Booking lifecycle → Service records: checks availability (evidence: `sheEarn/backend/app/routes/booking_routes.py`)
- Payments and wallet → Booking lifecycle: checks booking (evidence: `sheEarn/backend/app/routes/payment_routes.py`)
- Ratings → Booking lifecycle: verifies completion (evidence: `sheEarn/backend/app/routes/rating_routes.py`)
- Ratings → Service records: updates rating (evidence: `sheEarn/backend/app/routes/rating_routes.py`)
- Authentication and KYC → Application database: reads and writes (evidence: `sheEarn/backend/app/routes/auth_routes.py`)
- User profiles → Application database: reads and writes (evidence: `sheEarn/backend/app/routes/profile_routes.py`)
- Service discovery → Application database: reads and writes (evidence: `sheEarn/backend/app/routes/service_routes.py`)
- Booking lifecycle → Application database: reads and writes (evidence: `sheEarn/backend/app/routes/booking_routes.py`)
- Payments and wallet → Application database: reads and writes (evidence: `sheEarn/backend/app/routes/payment_routes.py`)
- Ratings → Application database: reads and writes (evidence: `sheEarn/backend/app/routes/rating_routes.py`)
- Messaging → Application database: reads and writes (evidence: `sheEarn/backend/app/routes/chat_routes.py`)
- Live chat events → Application database
- Government schemes → Application database
- Administration → Application database
