5fbd3821206ada190b836911f43d16e9f64429d4
- Drop file size: jsPDF compression + 3D page encoded as JPEG (0.95) on a white composite canvas (no more black background), PDF pixelRatio=1. - Tighten 3D export framing: new 'birds-eye-export' preset derives camera height from Three.js vertical FOV at the wall-top plane so the room fills the page without the interactive preset's extra headroom. - Thread canvas + preset trigger through Room3DView props so the export dialog can always find the live canvas and snap the camera even when the view was lazy-mounted by the dialog itself. - 2D capture on PDF uses an A4-landscape-matched aspect (1820x1200) so the image fills the page box without large empty bands. - Projection exports: per-wall hidden renderer mounts every wall at native aspect with a right/bottom overflow budget for label headroom; fontScale prop (passed as 2 from the export block) keeps Konva text legible at high export resolution without affecting interactive view. - Filter out annotations attached to electrical items from the 2D view and exported images (they belong to the wall-projection context). - Projection filters: assign furniture and orphan electrical items to a single 'home' wall (minimum edge / perpendicular distance) so a corner item stops double-projecting onto both neighbouring walls; stale wallIds fall back to the proximity path instead of being dropped. - Annotate tool works in projection view: clicking creates a wall- anchored annotation rendered next to the wall at the click position. - Outlet projection coord labels now show 3 decimal places. - PDF page titles use a Unicode font (DejaVu Sans) so Cyrillic renders correctly; wall projections get one dedicated landscape page each at native aspect; pdf aspect-preserving addImage helper centres images horizontally and top-aligns vertically.
House Plan Maker
A web-based apartment and room planning tool with 2D editing, wall projections, and a 3D preview. Design rooms, place electrical fixtures and furniture, and export layouts as PDFs.
Features
- Apartment & room management — organize multi-room apartments with per-room floor type, wall finish, ceiling, and plinth properties.
- 2D editor — draw walls, place doors/windows, add outlets/switches/cables and furniture on a Konva-powered canvas.
- Wall projections — view and edit each wall elevation with accurate opening and electrical placement.
- 3D view — preview rooms in Three.js / React Three Fiber with materials, textures, and openings.
- Electrical elements — outlets (with horizontal/vertical orientation), switches, wall cables, ceiling and wall lights.
- Furniture — textured furniture items with projection onto wall elevations.
- PDF export — export floor plans and wall projections via jsPDF.
- i18n — English and Russian translations out of the box.
Tech Stack
- Monorepo: npm workspaces + Turborepo
- Client: React 19, Vite 6, React Router 7, Konva, React Three Fiber / Three.js, i18next
- Server: Fastify 5, Prisma 6 (SQLite), Zod validation
- Shared: TypeScript types and Zod schemas in
packages/shared - Tooling: TypeScript, ESLint, Prettier, Vitest
Repository Layout
apps/
client/ # React + Vite frontend (2D editor, 3D view, PDF export)
server/ # Fastify API + Prisma (SQLite)
packages/
shared/ # Shared types and Zod schemas
Getting Started
Prerequisites
- Node.js 20+
- npm 10+
Install
npm install
Database setup
cd apps/server
npx prisma migrate dev
cd ../..
Set DATABASE_URL in apps/server/.env (defaults to a local SQLite file at apps/server/prisma/dev.db).
Run in development
npm run dev
This starts both client (Vite) and server (tsx watch) via Turborepo. The client is served on the Vite dev port and proxies API calls to the Fastify server.
Build
npm run build
Test & lint
npm test
npm run lint
npm run format
Data Model (summary)
- Apartment → has many Rooms
- Room → has Walls, WallOpenings (doors/windows), ElectricalItems, FurnitureItems, Annotations
- Stretch-ceiling, plinth, wall color/finish, and floor type are configured per room.
See apps/server/prisma/schema.prisma for the full schema.
API
The Fastify server exposes REST routes under:
/apartments/rooms/elements(walls, openings, electrical, furniture, annotations)
Request/response shapes are validated with Zod schemas from @house-plan-maker/shared.
License
Private / unlicensed. Internal project.
Description
Languages
TypeScript
92.4%
CSS
7%
Python
0.5%
JavaScript
0.1%