# utsapoddar/ai-interior-designer architecture

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

- Interactive diagram: https://gitdiagram.com/utsapoddar/ai-interior-designer
- Repository: https://github.com/utsapoddar/ai-interior-designer
- Video tour (about a minute): https://gitdiagram.com/utsapoddar/ai-interior-designer/video

## Overview

LiDAR Room Designer turns a scanned room and the user's design preferences into a checked furniture plan and preview. The main flow is USDZ upload and parsing, intent and catalog selection, deterministic placement and repair, then plan presentation. The README documents broader capture, reference-image, shopping, and preview capabilities; source excerpts are partial, so uncertain internal wiring is omitted.

Main entry points: [`chat/routes/plans.py`](https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/routes/plans.py) (Plan endpoints), [`frontend/src/lib/api.ts`](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/lib/api.ts) (API client), [`frontend/src/App.tsx`](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/App.tsx) (Web app routing), [`chat/app.py`](https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/app.py) (FastAPI app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_frontend["Web app routing<br/>[App.tsx]"]
  node_upload["Scan upload<br/>[UploadPage.tsx]"]
  node_chat["Design chat<br/>[ChatPage.tsx]"]
  node_api["API client<br/>[api.ts]"]
end

subgraph group_geometry["Room geometry"]
  node_backend["FastAPI app<br/>[app.py]"]
  node_scans["Scan endpoints<br/>[scans.py]"]
  node_parser["USDZ parser<br/>[parser.py]"]
  node_parsed["Parsed mesh files"]
end

subgraph group_planning["Furniture planning"]
  node_plans["Plan endpoints<br/>[plans.py]"]
  node_orchestrator["Intent orchestration<br/>[orchestrator.py]"]
  node_catalog_api["Catalog endpoints<br/>[catalog.py]"]
  node_catalog["Furniture catalog<br/>[bedroom.json]"]
  node_solver["Layout solver<br/>[layout.py]"]
end

subgraph group_results["Plan and preview"]
  node_images["Plan image generation<br/>[image_gen.py]"]
  node_preview_page["Plan preview page<br/>[PreviewPage.tsx]"]
  node_scene["3D room renderer"]
  node_assets["Furniture assets"]
end

node_user(("Room designer"))
node_capture["RoomPlan capture"]
node_vision["Vision model service"]
node_flux["Image generation service"]

node_user -->|"scans room"| node_capture
node_capture -->|"exports USDZ"| node_upload
node_user -->|"uses app"| node_frontend
node_frontend -->|"routes to"| node_upload
node_frontend -->|"routes to"| node_chat
node_frontend -->|"routes to"| node_preview_page
node_upload -->|"uploads scan"| node_api
node_chat -->|"requests plan"| node_api
node_api -->|"sends requests"| node_backend
node_backend -->|"dispatches"| node_scans
node_backend -->|"dispatches"| node_plans
node_backend -->|"dispatches"| node_catalog_api
node_scans -->|"parses USDZ"| node_parser
node_parser -->|"writes mesh"| node_parsed
node_plans -->|"loads mesh"| node_parsed
node_plans -->|"requests proposals"| node_orchestrator
node_orchestrator -.->|"sends prompt and images"| node_vision
node_plans -->|"gets candidates"| node_catalog_api
node_catalog_api -->|"reads records"| node_catalog
node_plans -->|"validates and places"| node_solver
node_plans -->|"requests replacements"| node_orchestrator
node_plans -->|"schedules images"| node_images
node_images -.->|"requests renders"| node_flux
node_preview_page -->|"loads plan and catalog"| node_api
node_preview_page -->|"renders plan"| node_scene
node_scene -->|"loads scan and plan"| node_api
node_scene -->|"selects models"| node_assets

click node_frontend "https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/App.tsx"
click node_upload "https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/routes/UploadPage.tsx"
click node_chat "https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/routes/ChatPage.tsx"
click node_api "https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/lib/api.ts"
click node_backend "https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/app.py"
click node_scans "https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/routes/scans.py"
click node_parser "https://github.com/utsapoddar/ai-interior-designer/blob/main/ingest/parser.py"
click node_parsed "https://github.com/utsapoddar/ai-interior-designer/tree/main/ingest/parsed-mesh"
click node_plans "https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/routes/plans.py"
click node_orchestrator "https://github.com/utsapoddar/ai-interior-designer/blob/main/llm/orchestrator.py"
click node_catalog_api "https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/routes/catalog.py"
click node_catalog "https://github.com/utsapoddar/ai-interior-designer/blob/main/catalog/seed/bedroom.json"
click node_solver "https://github.com/utsapoddar/ai-interior-designer/blob/main/solver/layout.py"
click node_images "https://github.com/utsapoddar/ai-interior-designer/blob/main/llm/image_gen.py"
click node_preview_page "https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/routes/PreviewPage.tsx"
click node_scene "https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/three/RoomPreviewScene.tsx"
click node_assets "https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/three/furniture_assets.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_frontend,node_upload,node_chat,node_api toneBlue
class node_backend,node_scans,node_parser,node_parsed toneAmber
class node_plans,node_orchestrator,node_catalog_api,node_catalog,node_solver toneMint
class node_images,node_preview_page,node_scene,node_assets toneRose
class node_user,node_capture,node_vision,node_flux toneIndigo
```

## Components

### Web experience

- [Web app routing](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Scan upload](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/routes/UploadPage.tsx): `frontend/src/routes/UploadPage.tsx`
- [Design chat](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/routes/ChatPage.tsx): `frontend/src/routes/ChatPage.tsx`
- [API client](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`

### Room geometry

- [FastAPI app](https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/app.py): `chat/app.py`
- [Scan endpoints](https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/routes/scans.py): `chat/routes/scans.py`
- [USDZ parser](https://github.com/utsapoddar/ai-interior-designer/blob/main/ingest/parser.py): `ingest/parser.py`
- [Parsed mesh files](https://github.com/utsapoddar/ai-interior-designer/tree/main/ingest/parsed-mesh): `ingest/parsed-mesh`

### Furniture planning

- [Plan endpoints](https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/routes/plans.py): `chat/routes/plans.py`
- [Intent orchestration](https://github.com/utsapoddar/ai-interior-designer/blob/main/llm/orchestrator.py): `llm/orchestrator.py`
- [Catalog endpoints](https://github.com/utsapoddar/ai-interior-designer/blob/main/chat/routes/catalog.py): `chat/routes/catalog.py`
- [Furniture catalog](https://github.com/utsapoddar/ai-interior-designer/blob/main/catalog/seed/bedroom.json): `catalog/seed/bedroom.json`
- [Layout solver](https://github.com/utsapoddar/ai-interior-designer/blob/main/solver/layout.py): `solver/layout.py`

### Plan and preview

- [Plan image generation](https://github.com/utsapoddar/ai-interior-designer/blob/main/llm/image_gen.py): `llm/image_gen.py`
- [Plan preview page](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/routes/PreviewPage.tsx): `frontend/src/routes/PreviewPage.tsx`
- [3D room renderer](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/three/RoomPreviewScene.tsx): `frontend/src/three/RoomPreviewScene.tsx`
- [Furniture assets](https://github.com/utsapoddar/ai-interior-designer/blob/main/frontend/src/three/furniture_assets.ts): `frontend/src/three/furniture_assets.ts`

### Other components

- **Room designer**
- **RoomPlan capture**
- **Vision model service**
- **Image generation service**

## Connections

- Room designer → RoomPlan capture: scans room
- RoomPlan capture → Scan upload: exports USDZ
- Room designer → Web app routing: uses app
- Web app routing → Scan upload: routes to
- Web app routing → Design chat: routes to
- Web app routing → Plan preview page: routes to
- Scan upload → API client: uploads scan
- Design chat → API client: requests plan
- API client → FastAPI app: sends requests
- FastAPI app → Scan endpoints: dispatches
- FastAPI app → Plan endpoints: dispatches
- FastAPI app → Catalog endpoints: dispatches
- Scan endpoints → USDZ parser: parses USDZ
- USDZ parser → Parsed mesh files: writes mesh
- Plan endpoints → Parsed mesh files: loads mesh
- Plan endpoints → Intent orchestration: requests proposals
- Intent orchestration → Vision model service: sends prompt and images
- Plan endpoints → Catalog endpoints: gets candidates
- Catalog endpoints → Furniture catalog: reads records
- Plan endpoints → Layout solver: validates and places
- Plan endpoints → Intent orchestration: requests replacements
- Plan endpoints → Plan image generation: schedules images
- Plan image generation → Image generation service: requests renders
- Plan preview page → API client: loads plan and catalog
- Plan preview page → 3D room renderer: renders plan
- 3D room renderer → API client: loads scan and plan
- 3D room renderer → Furniture assets: selects models
