# team-infiniity/buildcalc architecture

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

- Interactive diagram: https://gitdiagram.com/team-infiniity/buildcalc
- Repository: https://github.com/team-infiniity/buildcalc

## Overview

BuildCalc is a BIM-based construction planning platform; the README identifies IFC component extraction as the current implemented focus. The main workflow is a user creating or selecting a project, submitting an IFC model, extracting component and quantity data, persisting BIM results, and using project, estimation, BOQ, dashboard, advisory, and reporting areas. The graph also preserves these documented UI capabilities, though their implementation details were not all sampled. Frontend-to-backend submission is shown as unverified because the excerpts do not establish its HTTP wiring.

Main entry points: [`frontend/src/App.tsx`](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/App.tsx) (Application routes), [`frontend/src/lib/supabase.ts`](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/lib/supabase.ts) (Frontend Supabase client), [`backend/app/api/ifc.py`](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/api/ifc.py) (IFC upload endpoint), [`backend/app/services/ifc_job_processor.py`](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/ifc_job_processor.py) (Job processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace and access"]
  node_app["Application routes<br/>[App.tsx]"]
  node_auth["Authentication<br/>[AuthContext.tsx]"]
  node_projects["Project workspace<br/>[Projects.tsx]"]
  node_project_create["Project creation"]
end

subgraph group_bim["IFC processing"]
  node_bim_models["BIM models<br/>[BIMModels.tsx]"]
  node_bim_processing["BIM processing UI<br/>[BIMProcessing.tsx]"]
  node_api["FastAPI application<br/>[main.py]"]
  node_ifc_api["IFC upload endpoint<br/>[ifc.py]"]
  node_jobs_api["IFC job endpoints<br/>[ifc_jobs.py]"]
  node_job_processor["Job processing"]
  node_extractor["IFC extraction<br/>[ifc_extractor.py]"]
  node_geometry["Geometry quantities"]
  node_quantity_engine["Material quantities"]
end

subgraph group_planning["Planning and insights"]
  node_dashboard["Dashboard<br/>[Dashboard.tsx]"]
  node_estimation["Cost estimation<br/>[Estimation.tsx]"]
  node_boq["BOQ generation<br/>[BOQ.tsx]"]
  node_advisory["Construction advisory<br/>[Advisory.tsx]"]
  node_reports["Reports<br/>[Reports.tsx]"]
end

subgraph group_data["Data services"]
  node_persistence["BIM persistence<br/>[bim_persistence.py]"]
  node_dashboard_data["Dashboard data"]
  node_estimation_data["Estimation data"]
  node_boq_data["BOQ data<br/>[boqService.ts]"]
  node_advisory_data["Advisory data<br/>[advisoryService.ts]"]
  node_report_data["Report data<br/>[reportService.ts]"]
  node_supabase_client["Backend Supabase client<br/>[supabase_client.py]"]
  node_frontend_supabase["Frontend Supabase client<br/>[supabase.ts]"]
end

node_user(("Construction user"))
node_supabase[("Supabase")]

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes to"| node_projects
node_app -->|"routes to"| node_bim_models
node_app -->|"routes to"| node_bim_processing
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_estimation
node_app -->|"routes to"| node_boq
node_app -->|"routes to"| node_advisory
node_app -->|"routes to"| node_reports
node_projects -.->|"starts creation"| node_project_create
node_project_create -->|"opens flow"| node_bim_processing
node_bim_processing -.->|"submits IFC"| node_ifc_api
node_api -->|"registers router"| node_ifc_api
node_api -->|"registers router"| node_jobs_api
node_ifc_api -->|"extracts components"| node_extractor
node_ifc_api -->|"persists results"| node_persistence
node_jobs_api -->|"dispatches job"| node_job_processor
node_job_processor -->|"extracts model"| node_extractor
node_job_processor -->|"persists extraction"| node_persistence
node_extractor -->|"extracts geometry"| node_geometry
node_persistence -->|"calculates quantities"| node_quantity_engine
node_ifc_api -.->|"persists via"| node_supabase_client
node_persistence -->|"uses client"| node_supabase_client
node_job_processor -->|"uses client"| node_supabase_client
node_supabase_client -->|"connects to"| node_supabase
node_auth -->|"uses client"| node_frontend_supabase
node_project_create -->|"uses client"| node_frontend_supabase
node_frontend_supabase -->|"connects to"| node_supabase
node_dashboard -->|"loads data"| node_dashboard_data
node_dashboard_data -->|"queries"| node_frontend_supabase
node_estimation -->|"uses service"| node_estimation_data
node_estimation_data -->|"queries"| node_frontend_supabase
node_boq -->|"uses service"| node_boq_data
node_boq_data -->|"reads and writes"| node_frontend_supabase
node_advisory -->|"uses service"| node_advisory_data
node_advisory_data -->|"reads and writes"| node_frontend_supabase
node_reports -->|"uses service"| node_report_data
node_report_data -->|"queries"| node_frontend_supabase

click node_app "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/App.tsx"
click node_auth "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/context/AuthContext.tsx"
click node_projects "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Projects.tsx"
click node_project_create "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/components/dashboard/ProjectCreateFlow.tsx"
click node_bim_models "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/BIMModels.tsx"
click node_bim_processing "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/BIMProcessing.tsx"
click node_api "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/main.py"
click node_ifc_api "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/api/ifc.py"
click node_jobs_api "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/api/ifc_jobs.py"
click node_job_processor "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/ifc_job_processor.py"
click node_extractor "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/ifc_extractor.py"
click node_geometry "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/geometry_extractor.py"
click node_persistence "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/bim_persistence.py"
click node_quantity_engine "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/material_quantity_engine.py"
click node_dashboard "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Dashboard.tsx"
click node_dashboard_data "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/dashboardService.ts"
click node_estimation "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Estimation.tsx"
click node_estimation_data "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/estimationService.ts"
click node_boq "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/BOQ.tsx"
click node_boq_data "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/boqService.ts"
click node_advisory "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Advisory.tsx"
click node_advisory_data "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/advisoryService.ts"
click node_reports "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Reports.tsx"
click node_report_data "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/reportService.ts"
click node_supabase_client "https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/supabase_client.py"
click node_frontend_supabase "https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/lib/supabase.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_projects,node_project_create,node_user toneBlue
class node_bim_models,node_bim_processing,node_api,node_ifc_api,node_jobs_api,node_job_processor,node_extractor,node_geometry,node_quantity_engine,node_supabase toneAmber
class node_dashboard,node_estimation,node_boq,node_advisory,node_reports toneMint
class node_persistence,node_dashboard_data,node_estimation_data,node_boq_data,node_advisory_data,node_report_data,node_supabase_client,node_frontend_supabase toneRose
```

## Components

### Workspace and access

- [Application routes](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Authentication](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/context/AuthContext.tsx): `frontend/src/context/AuthContext.tsx`
- [Project workspace](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Projects.tsx): `frontend/src/pages/Projects.tsx`
- [Project creation](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/components/dashboard/ProjectCreateFlow.tsx): `frontend/src/components/dashboard/ProjectCreateFlow.tsx`

### IFC processing

- [BIM models](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/BIMModels.tsx): `frontend/src/pages/BIMModels.tsx`
- [BIM processing UI](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/BIMProcessing.tsx): `frontend/src/pages/BIMProcessing.tsx`
- [FastAPI application](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/main.py): `backend/app/main.py`
- [IFC upload endpoint](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/api/ifc.py): `backend/app/api/ifc.py`
- [IFC job endpoints](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/api/ifc_jobs.py): `backend/app/api/ifc_jobs.py`
- [Job processing](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/ifc_job_processor.py): `backend/app/services/ifc_job_processor.py`
- [IFC extraction](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/ifc_extractor.py): `backend/app/services/ifc_extractor.py`
- [Geometry quantities](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/geometry_extractor.py): `backend/app/services/geometry_extractor.py`
- [Material quantities](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/material_quantity_engine.py): `backend/app/services/material_quantity_engine.py`

### Planning and insights

- [Dashboard](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Dashboard.tsx): `frontend/src/pages/Dashboard.tsx`
- [Cost estimation](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Estimation.tsx): `frontend/src/pages/Estimation.tsx`
- [BOQ generation](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/BOQ.tsx): `frontend/src/pages/BOQ.tsx`
- [Construction advisory](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Advisory.tsx): `frontend/src/pages/Advisory.tsx`
- [Reports](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/pages/Reports.tsx): `frontend/src/pages/Reports.tsx`

### Data services

- [BIM persistence](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/bim_persistence.py): `backend/app/services/bim_persistence.py`
- [Dashboard data](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/dashboardService.ts): `frontend/src/services/dashboardService.ts`
- [Estimation data](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/estimationService.ts): `frontend/src/services/estimationService.ts`
- [BOQ data](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/boqService.ts): `frontend/src/services/boqService.ts`
- [Advisory data](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/advisoryService.ts): `frontend/src/services/advisoryService.ts`
- [Report data](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/services/reportService.ts): `frontend/src/services/reportService.ts`
- [Backend Supabase client](https://github.com/team-infiniity/buildcalc/blob/main/backend/app/services/supabase_client.py): `backend/app/services/supabase_client.py`
- [Frontend Supabase client](https://github.com/team-infiniity/buildcalc/blob/main/frontend/src/lib/supabase.ts): `frontend/src/lib/supabase.ts`

### Other components

- **Construction user**
- **Supabase**

## Connections

- Construction user → Application routes: uses (evidence: `frontend/src/App.tsx`)
- Application routes → Authentication: provides auth (evidence: `frontend/src/App.tsx`)
- Application routes → Project workspace: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → BIM models: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → BIM processing UI: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Dashboard: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Cost estimation: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → BOQ generation: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Construction advisory: routes to (evidence: `frontend/src/App.tsx`)
- Application routes → Reports: routes to (evidence: `frontend/src/App.tsx`)
- Project workspace → Project creation: starts creation
- Project creation → BIM processing UI: opens flow (evidence: `frontend/src/pages/BIMProcessing.tsx`)
- BIM processing UI → IFC upload endpoint: submits IFC
- FastAPI application → IFC upload endpoint: registers router (evidence: `backend/app/main.py`)
- FastAPI application → IFC job endpoints: registers router (evidence: `backend/app/main.py`)
- IFC upload endpoint → IFC extraction: extracts components (evidence: `backend/app/api/ifc.py`)
- IFC upload endpoint → BIM persistence: persists results (evidence: `backend/app/api/ifc.py`)
- IFC job endpoints → Job processing: dispatches job (evidence: `backend/app/api/ifc_jobs.py`)
- Job processing → IFC extraction: extracts model (evidence: `backend/app/services/ifc_job_processor.py`)
- Job processing → BIM persistence: persists extraction (evidence: `backend/app/services/ifc_job_processor.py`)
- IFC extraction → Geometry quantities: extracts geometry (evidence: `backend/app/services/ifc_extractor.py`)
- BIM persistence → Material quantities: calculates quantities (evidence: `backend/app/services/bim_persistence.py`)
- IFC upload endpoint → Backend Supabase client: persists via
- BIM persistence → Backend Supabase client: uses client (evidence: `backend/app/services/bim_persistence.py`)
- Job processing → Backend Supabase client: uses client (evidence: `backend/app/services/ifc_job_processor.py`)
- Backend Supabase client → Supabase: connects to (evidence: `backend/app/services/supabase_client.py`)
- Authentication → Frontend Supabase client: uses client (evidence: `frontend/src/context/AuthContext.tsx`)
- Project creation → Frontend Supabase client: uses client (evidence: `frontend/src/components/dashboard/ProjectCreateFlow.tsx`)
- Frontend Supabase client → Supabase: connects to (evidence: `frontend/src/lib/supabase.ts`)
- Dashboard → Dashboard data: loads data (evidence: `frontend/src/pages/Dashboard.tsx`)
- Dashboard data → Frontend Supabase client: queries (evidence: `frontend/src/services/dashboardService.ts`)
- Cost estimation → Estimation data: uses service
- Estimation data → Frontend Supabase client: queries (evidence: `frontend/src/services/estimationService.ts`)
- BOQ generation → BOQ data: uses service (evidence: `frontend/src/pages/BOQ.tsx`)
- BOQ data → Frontend Supabase client: reads and writes (evidence: `frontend/src/services/boqService.ts`)
- Construction advisory → Advisory data: uses service (evidence: `frontend/src/pages/Advisory.tsx`)
- Advisory data → Frontend Supabase client: reads and writes (evidence: `frontend/src/services/advisoryService.ts`)
- Reports → Report data: uses service
- Report data → Frontend Supabase client: queries (evidence: `frontend/src/services/reportService.ts`)
