# anikakesavan/reconstruct architecture

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

- Interactive diagram: https://gitdiagram.com/anikakesavan/reconstruct
- Repository: https://github.com/anikakesavan/reconstruct

## Overview

Reconstruct turns room photos or video into an editable 3D room, then lets users redesign and compare it in the browser. The scan path accepts uploads, prepares frames, estimates and fuses geometry, fits the room, and detects furniture and openings; the browser presents the result and supports editing, catalog placement, material changes, measurement, and local saves. The graph preserves these major capabilities, but some service stages are represented at their module level because their implementation was not excerpted.

Main entry points: [`services/reconstruction/app/pipeline.py`](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/pipeline.py) (Reconstruction pipeline), [`apps/web/lib/store.ts`](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/store.ts) (Design state), [`apps/web/components/studio/Studio.tsx`](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/Studio.tsx) (Studio shell), [`apps/web/components/scene/Furniture.tsx`](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/Furniture.tsx) (Furniture models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser studio"]
  node_studio["Studio shell<br/>[Studio.tsx]"]
  node_upload["Scan upload<br/>[UploadDialog.tsx]"]
  node_api["Service API client<br/>[api.ts]"]
end

subgraph group_editing["Design and rendering"]
  node_state[("Design state<br/>[store.ts]")]
  node_placement["Placement rules<br/>[placement.ts]"]
  node_catalog[("Furniture catalog<br/>[catalog.ts]")]
  node_inspector["Furniture inspector<br/>[Inspector.tsx]"]
  node_roompanel["Room controls<br/>[RoomPanel.tsx]"]
  node_viewport["3D viewport<br/>[Viewport.tsx]"]
  node_room["Room shell<br/>[Room.tsx]"]
  node_furniture["Furniture models<br/>[Furniture.tsx]"]
  node_recolor["Material recoloring<br/>[recolor.ts]"]
  node_types["Room and scan data<br/>[types.ts]"]
end

subgraph group_service["Reconstruction service"]
  node_service["HTTP service<br/>[main.py]"]
  node_jobs[("Scan jobs<br/>[jobs.py]")]
end

subgraph group_vision["Scan processing"]
  node_frames["Frame preparation<br/>[frames.py]"]
  node_pipeline["Reconstruction pipeline<br/>[pipeline.py]"]
  node_fusion["Geometry fusion<br/>[fuse.py]"]
end

subgraph group_domain["Room and furniture analysis"]
  node_roomfit["Room fitting<br/>[roomfit.py]"]
  node_objects["Object detection<br/>[objects.py]"]
  node_quality["Scan quality<br/>[quality.py]"]
end

node_user(("Room designer"))

node_user -->|"edits room"| node_studio
node_studio -->|"opens"| node_upload
node_studio -->|"renders"| node_inspector
node_studio -->|"renders"| node_roompanel
node_studio -.->|"renders"| node_viewport
node_upload -->|"calls"| node_api
node_upload -->|"opens scan"| node_state
node_api -.->|"HTTP requests"| node_service
node_service -->|"queues and reads"| node_jobs
node_jobs -->|"runs"| node_pipeline
node_service -->|"reports health"| node_pipeline
node_pipeline -->|"prepares views"| node_frames
node_pipeline -->|"fuses views"| node_fusion
node_pipeline -->|"fits room"| node_roomfit
node_pipeline -->|"detects objects"| node_objects
node_pipeline -->|"assesses quality"| node_quality
node_state -->|"checks placement"| node_placement
node_state -->|"uses definitions"| node_catalog
node_inspector -.->|"edits design"| node_state
node_roompanel -->|"edits room"| node_state
node_viewport -->|"renders"| node_room
node_viewport -->|"renders"| node_furniture
node_furniture -->|"loads models"| node_catalog
node_furniture -->|"recolors materials"| node_recolor
node_furniture -->|"reads selection"| node_state
node_state -->|"stores typed data"| node_types

click node_studio "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/Studio.tsx"
click node_upload "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/UploadDialog.tsx"
click node_api "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/api.ts"
click node_state "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/store.ts"
click node_placement "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/placement.ts"
click node_catalog "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/catalog.ts"
click node_inspector "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/Inspector.tsx"
click node_roompanel "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/RoomPanel.tsx"
click node_viewport "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/Viewport.tsx"
click node_room "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/Room.tsx"
click node_furniture "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/Furniture.tsx"
click node_recolor "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/recolor.ts"
click node_service "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/main.py"
click node_jobs "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/jobs.py"
click node_frames "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/frames.py"
click node_pipeline "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/pipeline.py"
click node_fusion "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/fuse.py"
click node_roomfit "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/roomfit.py"
click node_objects "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/objects.py"
click node_quality "https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/quality.py"
click node_types "https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/types.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_studio,node_upload,node_api toneBlue
class node_state,node_placement,node_catalog,node_inspector,node_roompanel,node_viewport,node_room,node_furniture,node_recolor,node_types toneAmber
class node_service,node_jobs toneMint
class node_frames,node_pipeline,node_fusion toneRose
class node_roomfit,node_objects,node_quality,node_user toneIndigo
```

## Components

### Browser studio

- [Studio shell](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/Studio.tsx): `apps/web/components/studio/Studio.tsx`
- [Scan upload](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/UploadDialog.tsx): `apps/web/components/studio/UploadDialog.tsx`
- [Service API client](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/api.ts): `apps/web/lib/api.ts`

### Design and rendering

- [Design state](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/store.ts): `apps/web/lib/store.ts`
- [Placement rules](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/placement.ts): `apps/web/lib/placement.ts`
- [Furniture catalog](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/catalog.ts): `apps/web/lib/catalog.ts`
- [Furniture inspector](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/Inspector.tsx): `apps/web/components/studio/Inspector.tsx`
- [Room controls](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/studio/RoomPanel.tsx): `apps/web/components/studio/RoomPanel.tsx`
- [3D viewport](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/Viewport.tsx): `apps/web/components/scene/Viewport.tsx`
- [Room shell](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/Room.tsx): `apps/web/components/scene/Room.tsx`
- [Furniture models](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/Furniture.tsx): `apps/web/components/scene/Furniture.tsx`
- [Material recoloring](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/components/scene/recolor.ts): `apps/web/components/scene/recolor.ts`
- [Room and scan data](https://github.com/anikakesavan/reconstruct/blob/main/apps/web/lib/types.ts): `apps/web/lib/types.ts`

### Reconstruction service

- [HTTP service](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/main.py): `services/reconstruction/app/main.py`
- [Scan jobs](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/jobs.py): `services/reconstruction/app/jobs.py`

### Scan processing

- [Frame preparation](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/frames.py): `services/reconstruction/app/frames.py`
- [Reconstruction pipeline](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/pipeline.py): `services/reconstruction/app/pipeline.py`
- [Geometry fusion](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/fuse.py): `services/reconstruction/app/fuse.py`

### Room and furniture analysis

- [Room fitting](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/roomfit.py): `services/reconstruction/app/roomfit.py`
- [Object detection](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/objects.py): `services/reconstruction/app/objects.py`
- [Scan quality](https://github.com/anikakesavan/reconstruct/blob/main/services/reconstruction/app/quality.py): `services/reconstruction/app/quality.py`

### Other components

- **Room designer**

## Connections

- Room designer → Studio shell: edits room (evidence: `README.md`)
- Studio shell → Scan upload: opens (evidence: `apps/web/components/studio/Studio.tsx`)
- Studio shell → Furniture inspector: renders (evidence: `apps/web/components/studio/Studio.tsx`)
- Studio shell → Room controls: renders (evidence: `apps/web/components/studio/Studio.tsx`)
- Studio shell → 3D viewport: renders
- Scan upload → Service API client: calls (evidence: `apps/web/components/studio/UploadDialog.tsx`)
- Scan upload → Design state: opens scan (evidence: `apps/web/components/studio/UploadDialog.tsx`)
- Service API client → HTTP service: HTTP requests
- HTTP service → Scan jobs: queues and reads (evidence: `services/reconstruction/app/main.py`)
- Scan jobs → Reconstruction pipeline: runs (evidence: `services/reconstruction/app/jobs.py`)
- HTTP service → Reconstruction pipeline: reports health (evidence: `services/reconstruction/app/main.py`)
- Reconstruction pipeline → Frame preparation: prepares views (evidence: `services/reconstruction/app/pipeline.py`)
- Reconstruction pipeline → Geometry fusion: fuses views (evidence: `services/reconstruction/app/pipeline.py`)
- Reconstruction pipeline → Room fitting: fits room (evidence: `services/reconstruction/app/pipeline.py`)
- Reconstruction pipeline → Object detection: detects objects (evidence: `services/reconstruction/app/pipeline.py`)
- Reconstruction pipeline → Scan quality: assesses quality (evidence: `services/reconstruction/app/pipeline.py`)
- Design state → Placement rules: checks placement (evidence: `apps/web/lib/store.ts`)
- Design state → Furniture catalog: uses definitions (evidence: `apps/web/lib/store.ts`)
- Furniture inspector → Design state: edits design
- Room controls → Design state: edits room (evidence: `apps/web/components/studio/RoomPanel.tsx`)
- 3D viewport → Room shell: renders (evidence: `apps/web/components/scene/Viewport.tsx`)
- 3D viewport → Furniture models: renders (evidence: `apps/web/components/scene/Viewport.tsx`)
- Furniture models → Furniture catalog: loads models (evidence: `apps/web/components/scene/Furniture.tsx`)
- Furniture models → Material recoloring: recolors materials (evidence: `apps/web/components/scene/Furniture.tsx`)
- Furniture models → Design state: reads selection (evidence: `apps/web/components/scene/Furniture.tsx`)
- Design state → Room and scan data: stores typed data (evidence: `apps/web/lib/store.ts`)
