# Feature: House/Apartment Plan Maker

**Branch:** `feature/house-plan-maker`
**Base branch:** `master`
**Created:** 2026-04-05
**Status:** 🟡 In Progress
**Strategy:** Big Bang
**Mode:** Automated
**Execution:** Orchestrator

## Summary
Greenfield client-server application for creating and editing apartment/house floor plans.
Features: Apartment CRUD, room editor with 2D top-down view, 4 wall projection views,
3D perspective preview, electrical planning (IEC symbols), furniture placement, REST API
with persistence, and PDF/PNG export.

## Tech Stack
- **Frontend:** React 19 + TypeScript + Vite
- **2D Canvas:** Konva.js via react-konva
- **3D View:** Three.js via @react-three/fiber + @react-three/drei
- **Backend:** Node.js + Fastify + Prisma ORM
- **Database:** SQLite (dev) / PostgreSQL (prod)
- **Export:** jsPDF + html2canvas (client-side)
- **Monorepo:** Turborepo: `apps/client`, `apps/server`, `packages/shared`
- **Testing:** Vitest (unit/integration) + Playwright (E2E)

## Build & Test Commands
- **Build:** `npx turbo build`
- **Test:** `npx turbo test`
- **Lint:** `npx turbo lint`
- **Dev:** `npx turbo dev`

## Phases

- [x] Phase 1: Monorepo Scaffold + Tooling [domain: fullstack] → [subplan](./phase-1-scaffold.md)
- [x] Phase 2: Data Model + REST API [domain: backend] → [subplan](./phase-2-data-model-api.md)
- [x] Phase 3: Apartment & Room Management UI [domain: frontend] → [subplan](./phase-3-management-ui.md)
- [x] Phase 4: 2D Top-Down Room Editor — Core [domain: frontend] → [subplan](./phase-4-2d-editor-core.md)
- [x] Phase 5: Electrical & Furniture Placement [domain: frontend] → [subplan](./phase-5-electrical-furniture.md)
- [x] Phase 6: Wall Projection Views [domain: frontend] → [subplan](./phase-6-wall-projections.md)
- [x] Phase 7: 3D Perspective View [domain: frontend] → [subplan](./phase-7-3d-view.md)
- [x] Phase 8: Export Pipeline + Polish [domain: fullstack] → [subplan](./phase-8-export-polish.md)

**Parallel note:** Phases 6 and 7 are independent and will be executed in parallel.

## Phase Progress Log

| Phase | Domain | Status | Review | Build | Committed |
|-------|--------|--------|--------|-------|-----------|
| Phase 1: Scaffold | fullstack | ✅ Done | ✅ | ⏭️ Skipped (BB) | ✅ |
| Phase 2: Data Model + API | backend | ✅ Done | ✅ | ⏭️ Skipped (BB) | ✅ |
| Phase 3: Management UI | frontend | ✅ Done | ✅ | ⏭️ Skipped (BB) | ✅ |
| Phase 4: 2D Editor Core | frontend | ✅ Done | ✅ | ⏭️ Skipped (BB) | ✅ |
| Phase 5: Electrical & Furniture | frontend | ✅ Done | ✅ | ⏭️ Skipped (BB) | ✅ |
| Phase 6: Wall Projections | frontend | ✅ Done | ✅ | ⏭️ Skipped (BB) | ✅ |
| Phase 7: 3D View | frontend | ✅ Done | ✅ | ⏭️ Skipped (BB) | ✅ |
| Phase 8: Export + Polish | fullstack | ✅ Done | ⬜ | ✅ Pass | ✅ |

## Amendment Log

### Amendment 1 — 2026-04-05
**Type:** Modified data model
**What changed:** Added `plinthHeight` (default 0.06m) and `plinthThickness` (default 0.01m) fields to the Room model across Prisma schema, shared types, Zod schemas, and room routes.
**Why:** User requested plinth (baseboard/skirting board) visualization. Plinth dimensions are a room-level property.
**Impact on existing phases:** Phase 6 (Wall Projections) and Phase 7 (3D View) should render plinth. Phase 3 (Room Form) should include plinth fields.

## Final Review
- [ ] Comprehensive code review
- [ ] Full build passes
- [ ] Full test suite passes
- [ ] Merged to `master`
