# aryan-tembhurne5xx5/house-help-hub architecture

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

- Interactive diagram: https://gitdiagram.com/aryan-tembhurne5xx5/house-help-hub
- Repository: https://github.com/aryan-tembhurne5xx5/house-help-hub

## Overview

House Help Hub connects households seeking daily services with registered helpers, supporting booking updates, worker onboarding, and location-based discovery/tracking. The main user flow runs from role-aware web routes through booking and nearby-worker screens, the API/GraphQL client, and backend resolvers to MySQL. Separate worker and admin workflows cover service setup and platform management. The README documents map tracking, radius filtering, recommendations, and geocoding; their detailed implementation is not present in the supplied tree. Backend and several page links are limited to the SOURCE INDEX and documented capabilities.

Main entry points: [`backend/graphql/resolvers/index.js`](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/index.js) (Resolver registry), [`src/App.tsx`](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/App.tsx) (Role routes), [`src/utils/api.ts`](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/api.ts) (API operations), [`backend/server.js`](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/server.js) (GraphQL server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Role routes<br/>[App.tsx]"]
  node_auth["Authentication<br/>[Auth.tsx]"]
  node_session["Session utilities<br/>[auth.ts]"]
  node_layout["Shared layout<br/>[Layout.tsx]"]
end

subgraph group_booking["Booking and location"]
  node_booking_page["Book service<br/>[BookService.tsx]"]
  node_nearby["Nearby workers<br/>[NearbyWorkers.tsx]"]
  node_location_ui["Map selection<br/>[MapPicker.tsx]"]
  node_location_logic["Location utilities<br/>[location.ts]"]
  node_date_logic["Date utilities<br/>[dateUtils.ts]"]
  node_booking_resolvers["Booking resolvers"]
  node_location_backend["Location calculations<br/>[location.js]"]
end

subgraph group_api["API and backend"]
  node_api_helpers["API operations<br/>[api.ts]"]
  node_graphql_docs["GraphQL operations<br/>[queries.ts]"]
  node_graphql_mutations["GraphQL mutations<br/>[mutations.ts]"]
  node_apollo["Apollo client<br/>[apolloClient.ts]"]
  node_server["GraphQL server<br/>[server.js]"]
  node_schema["GraphQL schema<br/>[schema.js]"]
  node_resolver_registry["Resolver registry<br/>[index.js]"]
  node_auth_resolvers["Auth resolvers<br/>[auth.resolvers.js]"]
  node_auth_middleware["Auth middleware<br/>[auth.js]"]
  node_permissions["Permissions<br/>[permissions.js]"]
  node_db_module["Database connection<br/>[db.js]"]
end

subgraph group_operations["Platform operations"]
  node_worker_setup["Worker setup<br/>[SetupServices.tsx]"]
  node_admin_workers["Worker administration<br/>[WorkersList.tsx]"]
  node_worker_resolvers["Worker resolvers"]
  node_admin_resolvers["Admin resolvers<br/>[admin.resolvers.js]"]
  node_notification_resolvers["Notifications"]
  node_review_resolvers["Reviews"]
end

node_household(("Household"))
node_helper(("Helper"))
node_administrator(("Administrator"))
node_mysql[("MySQL")]

node_household -->|"uses"| node_app
node_helper -->|"uses"| node_app
node_administrator -->|"uses"| node_app
node_app -->|"routes to"| node_auth
node_app -->|"routes to"| node_booking_page
node_app -->|"routes to"| node_worker_setup
node_app -->|"routes to"| node_admin_workers
node_auth -->|"uses"| node_session
node_booking_page -->|"renders"| node_layout
node_booking_page -->|"requests services"| node_api_helpers
node_booking_page -->|"uses"| node_location_ui
node_nearby -->|"searches workers"| node_api_helpers
node_location_ui -->|"uses"| node_location_logic
node_worker_setup -->|"registers services"| node_api_helpers
node_worker_setup -->|"renders"| node_layout
node_admin_workers -->|"manages workers"| node_api_helpers
node_api_helpers -->|"queries and mutates"| node_apollo
node_api_helpers -->|"uses queries"| node_graphql_docs
node_api_helpers -->|"uses mutations"| node_graphql_mutations
node_apollo -.->|"sends GraphQL"| node_server
node_server -->|"loads schema"| node_schema
node_server -->|"loads resolvers"| node_resolver_registry
node_server -->|"uses connection"| node_db_module
node_server -->|"uses middleware"| node_auth_middleware
node_db_module -.->|"connects"| node_mysql
node_resolver_registry -.->|"dispatches"| node_booking_resolvers
node_resolver_registry -.->|"dispatches"| node_auth_resolvers
node_resolver_registry -.->|"dispatches"| node_worker_resolvers
node_resolver_registry -.->|"dispatches"| node_admin_resolvers
node_resolver_registry -.->|"dispatches"| node_notification_resolvers
node_resolver_registry -.->|"dispatches"| node_review_resolvers
node_worker_resolvers -->|"uses"| node_location_backend
node_auth_resolvers -->|"uses"| node_auth_middleware
node_review_resolvers -->|"uses"| node_permissions

click node_app "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/App.tsx"
click node_auth "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/Auth.tsx"
click node_session "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/auth.ts"
click node_layout "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/components/Layout.tsx"
click node_booking_page "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/user/BookService.tsx"
click node_nearby "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/user/NearbyWorkers.tsx"
click node_worker_setup "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/worker/SetupServices.tsx"
click node_admin_workers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/admin/WorkersList.tsx"
click node_location_ui "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/components/MapPicker.tsx"
click node_location_logic "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/location.ts"
click node_date_logic "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/dateUtils.ts"
click node_api_helpers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/api.ts"
click node_graphql_docs "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/graphql/queries.ts"
click node_graphql_mutations "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/graphql/mutations.ts"
click node_apollo "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/lib/apolloClient.ts"
click node_server "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/server.js"
click node_schema "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/schema.js"
click node_resolver_registry "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/index.js"
click node_booking_resolvers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/booking.resolvers.js"
click node_auth_resolvers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/auth.resolvers.js"
click node_worker_resolvers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/worker.resolvers.js"
click node_admin_resolvers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/admin.resolvers.js"
click node_notification_resolvers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/notification.resolvers.js"
click node_review_resolvers "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/review.resolvers.js"
click node_auth_middleware "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/middleware/auth.js"
click node_permissions "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/middleware/permissions.js"
click node_location_backend "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/utils/location.js"
click node_db_module "https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/db.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_app,node_auth,node_session,node_layout toneBlue
class node_booking_page,node_nearby,node_location_ui,node_location_logic,node_date_logic,node_booking_resolvers,node_location_backend,node_mysql toneAmber
class node_api_helpers,node_graphql_docs,node_graphql_mutations,node_apollo,node_server,node_schema,node_resolver_registry,node_auth_resolvers,node_auth_middleware,node_permissions,node_db_module toneMint
class node_worker_setup,node_admin_workers,node_worker_resolvers,node_admin_resolvers,node_notification_resolvers,node_review_resolvers toneRose
class node_household,node_helper,node_administrator toneIndigo
```

## Components

### Web application

- [Role routes](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/Auth.tsx): `src/pages/Auth.tsx`
- [Session utilities](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/auth.ts): `src/utils/auth.ts`
- [Shared layout](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/components/Layout.tsx): `src/components/Layout.tsx`

### Booking and location

- [Book service](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/user/BookService.tsx): `src/pages/user/BookService.tsx`
- [Nearby workers](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/user/NearbyWorkers.tsx): `src/pages/user/NearbyWorkers.tsx`
- [Map selection](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/components/MapPicker.tsx): `src/components/MapPicker.tsx`
- [Location utilities](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/location.ts): `src/utils/location.ts`
- [Date utilities](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/dateUtils.ts): `src/utils/dateUtils.ts`
- [Booking resolvers](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/booking.resolvers.js): `backend/graphql/resolvers/booking.resolvers.js`
- [Location calculations](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/utils/location.js): `backend/utils/location.js`

### API and backend

- [API operations](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/utils/api.ts): `src/utils/api.ts`
- [GraphQL operations](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/graphql/queries.ts): `src/graphql/queries.ts`
- [GraphQL mutations](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/graphql/mutations.ts): `src/graphql/mutations.ts`
- [Apollo client](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/lib/apolloClient.ts): `src/lib/apolloClient.ts`
- [GraphQL server](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/server.js): `backend/server.js`
- [GraphQL schema](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/schema.js): `backend/graphql/schema.js`
- [Resolver registry](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/index.js): `backend/graphql/resolvers/index.js`
- [Auth resolvers](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/auth.resolvers.js): `backend/graphql/resolvers/auth.resolvers.js`
- [Auth middleware](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [Permissions](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/middleware/permissions.js): `backend/middleware/permissions.js`
- [Database connection](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/db.js): `backend/db.js`

### Platform operations

- [Worker setup](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/worker/SetupServices.tsx): `src/pages/worker/SetupServices.tsx`
- [Worker administration](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/src/pages/admin/WorkersList.tsx): `src/pages/admin/WorkersList.tsx`
- [Worker resolvers](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/worker.resolvers.js): `backend/graphql/resolvers/worker.resolvers.js`
- [Admin resolvers](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/admin.resolvers.js): `backend/graphql/resolvers/admin.resolvers.js`
- [Notifications](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/notification.resolvers.js): `backend/graphql/resolvers/notification.resolvers.js`
- [Reviews](https://github.com/aryan-tembhurne5xx5/house-help-hub/blob/main/backend/graphql/resolvers/review.resolvers.js): `backend/graphql/resolvers/review.resolvers.js`

### Other components

- **Household**
- **Helper**
- **Administrator**
- **MySQL**

## Connections

- Household → Role routes: uses (evidence: `src/App.tsx`)
- Helper → Role routes: uses (evidence: `src/App.tsx`)
- Administrator → Role routes: uses (evidence: `src/App.tsx`)
- Role routes → Authentication: routes to (evidence: `src/App.tsx`)
- Role routes → Book service: routes to (evidence: `src/App.tsx`)
- Role routes → Worker setup: routes to (evidence: `src/App.tsx`)
- Role routes → Worker administration: routes to (evidence: `src/App.tsx`)
- Authentication → Session utilities: uses (evidence: `src/pages/Auth.tsx`)
- Book service → Shared layout: renders (evidence: `src/pages/user/BookService.tsx`)
- Book service → API operations: requests services (evidence: `src/pages/user/BookService.tsx`)
- Book service → Map selection: uses (evidence: `src/pages/user/BookService.tsx`)
- Nearby workers → API operations: searches workers (evidence: `src/pages/user/NearbyWorkers.tsx`)
- Map selection → Location utilities: uses (evidence: `src/components/MapPicker.tsx`)
- Worker setup → API operations: registers services (evidence: `src/pages/worker/SetupServices.tsx`)
- Worker setup → Shared layout: renders (evidence: `src/pages/worker/SetupServices.tsx`)
- Worker administration → API operations: manages workers (evidence: `src/pages/admin/WorkersList.tsx`)
- API operations → Apollo client: queries and mutates (evidence: `src/utils/api.ts`)
- API operations → GraphQL operations: uses queries (evidence: `src/utils/api.ts`)
- API operations → GraphQL mutations: uses mutations (evidence: `src/utils/api.ts`)
- Apollo client → GraphQL server: sends GraphQL
- GraphQL server → GraphQL schema: loads schema (evidence: `backend/server.js`)
- GraphQL server → Resolver registry: loads resolvers (evidence: `backend/server.js`)
- GraphQL server → Database connection: uses connection (evidence: `backend/server.js`)
- GraphQL server → Auth middleware: uses middleware (evidence: `backend/server.js`)
- Database connection → MySQL: connects
- Resolver registry → Booking resolvers: dispatches
- Resolver registry → Auth resolvers: dispatches
- Resolver registry → Worker resolvers: dispatches
- Resolver registry → Admin resolvers: dispatches
- Resolver registry → Notifications: dispatches
- Resolver registry → Reviews: dispatches
- Worker resolvers → Location calculations: uses (evidence: `backend/graphql/resolvers/worker.resolvers.js`)
- Auth resolvers → Auth middleware: uses (evidence: `backend/graphql/resolvers/auth.resolvers.js`)
- Reviews → Permissions: uses (evidence: `backend/graphql/resolvers/review.resolvers.js`)
