# mayank-dhawad/quick-hire architecture

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

- Interactive diagram: https://gitdiagram.com/mayank-dhawad/quick-hire
- Repository: https://github.com/mayank-dhawad/quick-hire

## Overview

QuickHire is a web platform for worker profiles, discovery, jobs, payments, and work history, with an administrative sub-application. The principal user flow is browser access, phone-based authentication, worker lookup or profile management, then job-related activity backed by Supabase. The graph includes major capabilities named in the README and product-facing subsystems in the tree. Some feature components were not sampled, so their internal calls and data flows are not asserted; edges reflect excerpted references or README documentation.

Main entry points: [`src/App.tsx`](https://github.com/mayank-dhawad/quick-hire/blob/main/src/App.tsx) (Application Shell), [`src/lib/supabase.ts`](https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/supabase.ts) (Supabase Client), [`src/components/WorkersTab.tsx`](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkersTab.tsx) (Worker Workspace), [`src/components/Auth.tsx`](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/Auth.tsx) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Worker Platform"]
  node_app["Application Shell<br/>[App.tsx]"]
  node_auth["Authentication<br/>[Auth.tsx]"]
  node_discovery["Worker Discovery"]
  node_workers["Worker Workspace<br/>[WorkersTab.tsx]"]
  node_profile["Worker Profile"]
  node_map["Worker Map<br/>[WorkersMapView.tsx]"]
  node_dashboard["Jobs and History<br/>[DashboardTab.tsx]"]
  node_jobpost["Job Posting<br/>[PostJobTab.tsx]"]
  node_payments["Payment Workflow"]
  node_equipment["Equipment Rental"]
  node_safety["Safety Services<br/>[SafetyTab.tsx]"]
end

subgraph group_services["Shared Services"]
  node_supabase["Supabase Client<br/>[supabase.ts]"]
  node_geocoding["Location Services<br/>[geocoding.ts]"]
  node_translations["Translations<br/>[translations.ts]"]
  node_sms["SMS Function<br/>[index.ts]"]
end

subgraph group_admin["Administration"]
  node_adminrouter["Admin Routing<br/>[adminRouter.ts]"]
  node_adminauth["Admin Authorization<br/>[adminAuth.ts]"]
  node_adminlogin["Admin Login<br/>[AdminLogin.tsx]"]
  node_adminmanagement["Admin Management"]
end

subgraph group_pwa["Offline Access"]
  node_pwa["PWA Registration<br/>[pwaRegister.ts]"]
  node_pwainstall["Install Prompt<br/>[usePwaInstall.ts]"]
end

node_user(("Worker or Employer"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_auth
node_app -->|"renders"| node_discovery
node_app -->|"renders"| node_profile
node_app -->|"resolves locations"| node_geocoding
node_workers -->|"opens"| node_discovery
node_workers -->|"renders"| node_map
node_workers -->|"saves locations"| node_geocoding
node_profile -->|"looks up locations"| node_geocoding
node_profile -->|"gets translations"| node_translations
node_auth -->|"checks admin"| node_adminauth
node_auth -->|"gets translations"| node_translations
node_adminlogin -->|"authenticates"| node_adminauth
node_adminlogin -->|"uses routes"| node_adminrouter
node_adminauth -->|"queries and verifies"| node_supabase
node_app -->|"stores and retrieves data"| node_supabase
node_app -->|"reads route"| node_adminrouter
node_dashboard -.->|"uses backend"| node_supabase
node_jobpost -.->|"uses backend"| node_supabase
node_payments -.->|"uses backend"| node_supabase
node_equipment -.->|"uses backend"| node_supabase
node_safety -.->|"uses backend"| node_supabase
node_adminmanagement -.->|"uses backend"| node_supabase
node_app -->|"registers service worker"| node_pwa
node_pwainstall -.->|"offers installation"| node_user

click node_app "https://github.com/mayank-dhawad/quick-hire/blob/main/src/App.tsx"
click node_auth "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/Auth.tsx"
click node_discovery "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkerDiscoveryModal.tsx"
click node_workers "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkersTab.tsx"
click node_profile "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkerProfileModal.tsx"
click node_map "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkersMapView.tsx"
click node_dashboard "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/DashboardTab.tsx"
click node_jobpost "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/PostJobTab.tsx"
click node_payments "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/DirectPaymentModal.tsx"
click node_equipment "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/EquipmentRentalTab.tsx"
click node_safety "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/SafetyTab.tsx"
click node_supabase "https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/supabase.ts"
click node_geocoding "https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/geocoding.ts"
click node_translations "https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/translations.ts"
click node_adminrouter "https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/adminRouter.ts"
click node_adminauth "https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/adminAuth.ts"
click node_adminlogin "https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/admin/AdminLogin.tsx"
click node_adminmanagement "https://github.com/mayank-dhawad/quick-hire/tree/main/src/components/admin"
click node_pwa "https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/pwaRegister.ts"
click node_pwainstall "https://github.com/mayank-dhawad/quick-hire/blob/main/src/hooks/usePwaInstall.ts"
click node_sms "https://github.com/mayank-dhawad/quick-hire/blob/main/supabase/functions/send-sms/index.ts"

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_discovery,node_workers,node_profile,node_map,node_dashboard,node_jobpost,node_payments,node_equipment,node_safety toneBlue
class node_supabase,node_geocoding,node_translations,node_sms toneAmber
class node_adminrouter,node_adminauth,node_adminlogin,node_adminmanagement toneMint
class node_pwa,node_pwainstall,node_user toneRose
```

## Components

### Worker Platform

- [Application Shell](https://github.com/mayank-dhawad/quick-hire/blob/main/src/App.tsx): `src/App.tsx`
- [Authentication](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/Auth.tsx): `src/components/Auth.tsx`
- [Worker Discovery](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkerDiscoveryModal.tsx): `src/components/WorkerDiscoveryModal.tsx`
- [Worker Workspace](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkersTab.tsx): `src/components/WorkersTab.tsx`
- [Worker Profile](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkerProfileModal.tsx): `src/components/WorkerProfileModal.tsx`
- [Worker Map](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/WorkersMapView.tsx): `src/components/WorkersMapView.tsx`
- [Jobs and History](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/DashboardTab.tsx): `src/components/DashboardTab.tsx`
- [Job Posting](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/PostJobTab.tsx): `src/components/PostJobTab.tsx`
- [Payment Workflow](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/DirectPaymentModal.tsx): `src/components/DirectPaymentModal.tsx`
- [Equipment Rental](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/EquipmentRentalTab.tsx): `src/components/EquipmentRentalTab.tsx`
- [Safety Services](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/SafetyTab.tsx): `src/components/SafetyTab.tsx`

### Shared Services

- [Supabase Client](https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/supabase.ts): `src/lib/supabase.ts`
- [Location Services](https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/geocoding.ts): `src/lib/geocoding.ts`
- [Translations](https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/translations.ts): `src/lib/translations.ts`
- [SMS Function](https://github.com/mayank-dhawad/quick-hire/blob/main/supabase/functions/send-sms/index.ts): `supabase/functions/send-sms/index.ts`

### Administration

- [Admin Routing](https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/adminRouter.ts): `src/lib/adminRouter.ts`
- [Admin Authorization](https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/adminAuth.ts): `src/lib/adminAuth.ts`
- [Admin Login](https://github.com/mayank-dhawad/quick-hire/blob/main/src/components/admin/AdminLogin.tsx): `src/components/admin/AdminLogin.tsx`
- [Admin Management](https://github.com/mayank-dhawad/quick-hire/tree/main/src/components/admin): `src/components/admin`

### Offline Access

- [PWA Registration](https://github.com/mayank-dhawad/quick-hire/blob/main/src/lib/pwaRegister.ts): `src/lib/pwaRegister.ts`
- [Install Prompt](https://github.com/mayank-dhawad/quick-hire/blob/main/src/hooks/usePwaInstall.ts): `src/hooks/usePwaInstall.ts`

### Other components

- **Worker or Employer**

## Connections

- Worker or Employer → Application Shell: uses (evidence: `README.md`)
- Application Shell → Authentication: renders (evidence: `src/App.tsx`)
- Application Shell → Worker Discovery: renders (evidence: `src/App.tsx`)
- Application Shell → Worker Profile: renders (evidence: `src/App.tsx`)
- Application Shell → Location Services: resolves locations (evidence: `src/App.tsx`)
- Worker Workspace → Worker Discovery: opens (evidence: `src/components/WorkersTab.tsx`)
- Worker Workspace → Worker Map: renders (evidence: `src/components/WorkersTab.tsx`)
- Worker Workspace → Location Services: saves locations (evidence: `src/components/WorkersTab.tsx`)
- Worker Profile → Location Services: looks up locations (evidence: `src/components/WorkerProfileModal.tsx`)
- Worker Profile → Translations: gets translations (evidence: `src/components/WorkerProfileModal.tsx`)
- Authentication → Admin Authorization: checks admin (evidence: `src/components/Auth.tsx`)
- Authentication → Translations: gets translations (evidence: `src/components/Auth.tsx`)
- Admin Login → Admin Authorization: authenticates (evidence: `src/components/admin/AdminLogin.tsx`)
- Admin Login → Admin Routing: uses routes (evidence: `src/components/admin/AdminLogin.tsx`)
- Admin Authorization → Supabase Client: queries and verifies (evidence: `src/lib/adminAuth.ts`)
- Application Shell → Supabase Client: stores and retrieves data (evidence: `README.md`)
- Application Shell → Admin Routing: reads route (evidence: `src/App.tsx`)
- Jobs and History → Supabase Client: uses backend
- Job Posting → Supabase Client: uses backend
- Payment Workflow → Supabase Client: uses backend
- Equipment Rental → Supabase Client: uses backend
- Safety Services → Supabase Client: uses backend
- Admin Management → Supabase Client: uses backend (evidence: `src/components/admin/AdminLogin.tsx`)
- Application Shell → PWA Registration: registers service worker (evidence: `src/main.tsx`)
- Install Prompt → Worker or Employer: offers installation
