# floorproadm/axofloorsnj architecture

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

- Interactive diagram: https://gitdiagram.com/floorproadm/axofloorsnj
- Repository: https://github.com/floorproadm/axofloorsnj

## Overview

This is a React/Supabase field-service and customer-relationship application, with an admin workspace plus partner, collaborator, customer-portal and public proposal flows. The central admin workflow routes users through lead intake and pipeline management, then measurements, proposals, projects/jobs, scheduling and financial follow-up. Separate branches cover partner referrals, automation, media, workforce and performance. The excerpts show routing, lead-pipeline use and selected data access; many capabilities are evident from the tree but their runtime wiring was not sampled, so those links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/floorproadm/axofloorsnj/blob/main/src/App.tsx) (Route and auth shell), [`src/hooks/useLeadPipeline.ts`](https://github.com/floorproadm/axofloorsnj/blob/main/src/hooks/useLeadPipeline.ts) (Lead stages), [`src/integrations/supabase/client.ts`](https://github.com/floorproadm/axofloorsnj/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/pages/admin/LeadsManager.tsx`](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/LeadsManager.tsx) (Lead manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application access"]
  node_app["Route and auth shell<br/>[App.tsx]"]
  node_admin["Admin workspace<br/>[AdminLayout.tsx]"]
end

subgraph group_sales["Sales lifecycle"]
  node_leadpage["Lead manager<br/>[LeadsManager.tsx]"]
  node_pipeline["Lead pipeline board<br/>[LinearPipeline.tsx]"]
  node_leadstate["Lead stages<br/>[useLeadPipeline.ts]"]
  node_leadcontrol["Lead controls"]
  node_quoting["Quote creation"]
  node_measure["Measurements"]
  node_partners["Partner referral pipeline"]
end

subgraph group_delivery["Project delivery"]
  node_projects["Project pipeline"]
  node_job["Job detail<br/>[JobDetail.tsx]"]
  node_schedule["Dispatch and schedule<br/>[Schedule.tsx]"]
  node_gallery["Project media<br/>[GalleryHub.tsx]"]
end

subgraph group_operations["Business operations"]
  node_finance["Payments and invoices<br/>[Payments.tsx]"]
  node_automation["Lead automations<br/>[Automations.tsx]"]
  node_workforce["Crew and payroll<br/>[LaborPayroll.tsx]"]
  node_analytics["Performance review<br/>[WeeklyReview.tsx]"]
end

subgraph group_platform["Data and services"]
  node_auth["Authentication context<br/>[AuthContext.tsx]"]
  node_dbclient["Supabase client<br/>[client.ts]"]
  node_db[("Supabase backend")]
end

node_user(("Staff user"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_leadpage
node_app -->|"routes to"| node_job
node_app -->|"routes to"| node_schedule
node_leadpage -->|"renders"| node_admin
node_leadpage -->|"renders"| node_pipeline
node_leadpage -->|"uses"| node_leadstate
node_pipeline -->|"uses"| node_leadstate
node_pipeline -->|"opens"| node_leadcontrol
node_pipeline -->|"opens"| node_quoting
node_leadstate -->|"queries"| node_dbclient
node_leadstate -->|"notifies via"| node_dbclient
node_auth -->|"authenticates through"| node_dbclient
node_dbclient -->|"connects"| node_db
node_projects -->|"reads data"| node_dbclient
node_projects -->|"derives risk with"| node_leadstate

click node_app "https://github.com/floorproadm/axofloorsnj/blob/main/src/App.tsx"
click node_admin "https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/AdminLayout.tsx"
click node_leadpage "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/LeadsManager.tsx"
click node_pipeline "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/components/LinearPipeline.tsx"
click node_leadstate "https://github.com/floorproadm/axofloorsnj/blob/main/src/hooks/useLeadPipeline.ts"
click node_leadcontrol "https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/LeadControlModal.tsx"
click node_quoting "https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/QuickQuoteSheet.tsx"
click node_measure "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/MeasurementsManager.tsx"
click node_partners "https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/AdminReferralPipelineTab.tsx"
click node_projects "https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/projects/ProjectPipelineBoard.tsx"
click node_job "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/JobDetail.tsx"
click node_schedule "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/Schedule.tsx"
click node_gallery "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/GalleryHub.tsx"
click node_finance "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/Payments.tsx"
click node_automation "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/Automations.tsx"
click node_workforce "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/LaborPayroll.tsx"
click node_analytics "https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/WeeklyReview.tsx"
click node_auth "https://github.com/floorproadm/axofloorsnj/blob/main/src/contexts/AuthContext.tsx"
click node_dbclient "https://github.com/floorproadm/axofloorsnj/blob/main/src/integrations/supabase/client.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_admin,node_user toneBlue
class node_leadpage,node_pipeline,node_leadstate,node_leadcontrol,node_quoting,node_measure,node_partners toneAmber
class node_projects,node_job,node_schedule,node_gallery toneMint
class node_finance,node_automation,node_workforce,node_analytics toneRose
class node_auth,node_dbclient,node_db toneIndigo
```

## Components

### Application access

- [Route and auth shell](https://github.com/floorproadm/axofloorsnj/blob/main/src/App.tsx): `src/App.tsx`
- [Admin workspace](https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/AdminLayout.tsx): `src/components/admin/AdminLayout.tsx`

### Sales lifecycle

- [Lead manager](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/LeadsManager.tsx): `src/pages/admin/LeadsManager.tsx`
- [Lead pipeline board](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/components/LinearPipeline.tsx): `src/pages/admin/components/LinearPipeline.tsx`
- [Lead stages](https://github.com/floorproadm/axofloorsnj/blob/main/src/hooks/useLeadPipeline.ts): `src/hooks/useLeadPipeline.ts`
- [Lead controls](https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/LeadControlModal.tsx): `src/components/admin/LeadControlModal.tsx`
- [Quote creation](https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/QuickQuoteSheet.tsx): `src/components/admin/QuickQuoteSheet.tsx`
- [Measurements](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/MeasurementsManager.tsx): `src/pages/admin/MeasurementsManager.tsx`
- [Partner referral pipeline](https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/AdminReferralPipelineTab.tsx): `src/components/admin/AdminReferralPipelineTab.tsx`

### Project delivery

- [Project pipeline](https://github.com/floorproadm/axofloorsnj/blob/main/src/components/admin/projects/ProjectPipelineBoard.tsx): `src/components/admin/projects/ProjectPipelineBoard.tsx`
- [Job detail](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/JobDetail.tsx): `src/pages/admin/JobDetail.tsx`
- [Dispatch and schedule](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/Schedule.tsx): `src/pages/admin/Schedule.tsx`
- [Project media](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/GalleryHub.tsx): `src/pages/admin/GalleryHub.tsx`

### Business operations

- [Payments and invoices](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/Payments.tsx): `src/pages/admin/Payments.tsx`
- [Lead automations](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/Automations.tsx): `src/pages/admin/Automations.tsx`
- [Crew and payroll](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/LaborPayroll.tsx): `src/pages/admin/LaborPayroll.tsx`
- [Performance review](https://github.com/floorproadm/axofloorsnj/blob/main/src/pages/admin/WeeklyReview.tsx): `src/pages/admin/WeeklyReview.tsx`

### Data and services

- [Authentication context](https://github.com/floorproadm/axofloorsnj/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Supabase client](https://github.com/floorproadm/axofloorsnj/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase backend**

### Other components

- **Staff user**

## Connections

- Staff user → Route and auth shell: opens (evidence: `src/App.tsx`)
- Route and auth shell → Admin workspace: routes to (evidence: `src/App.tsx`)
- Route and auth shell → Lead manager: routes to (evidence: `src/App.tsx`)
- Route and auth shell → Job detail: routes to (evidence: `src/App.tsx`)
- Route and auth shell → Dispatch and schedule: routes to (evidence: `src/App.tsx`)
- Lead manager → Admin workspace: renders (evidence: `src/pages/admin/LeadsManager.tsx`)
- Lead manager → Lead pipeline board: renders (evidence: `src/pages/admin/LeadsManager.tsx`)
- Lead manager → Lead stages: uses (evidence: `src/pages/admin/LeadsManager.tsx`)
- Lead pipeline board → Lead stages: uses (evidence: `src/pages/admin/components/LinearPipeline.tsx`)
- Lead pipeline board → Lead controls: opens (evidence: `src/pages/admin/components/LinearPipeline.tsx`)
- Lead pipeline board → Quote creation: opens (evidence: `src/pages/admin/components/LinearPipeline.tsx`)
- Lead stages → Supabase client: queries (evidence: `src/hooks/useLeadPipeline.ts`)
- Lead stages → Supabase client: notifies via (evidence: `src/hooks/useLeadPipeline.ts`)
- Authentication context → Supabase client: authenticates through (evidence: `src/contexts/AuthContext.tsx`)
- Supabase client → Supabase backend: connects (evidence: `src/integrations/supabase/client.ts`)
- Project pipeline → Supabase client: reads data (evidence: `src/components/admin/projects/ProjectPipelineBoard.tsx`)
- Project pipeline → Lead stages: derives risk with (evidence: `src/components/admin/projects/ProjectPipelineBoard.tsx`)
