alexei.dolgolyov 68d2b5e3b0 feat(export): default-view option, Cyrillic PDF, per-wall projection pages
- Add 'Default View' scope to PNG export (fit-to-room for 2D, birds-eye for 3D)
- PDF now includes 3D top view, 2D default view, and every wall projection
- Embed DejaVu Sans TTF so Cyrillic room names render correctly in PDFs
- Preserve image aspect ratios and top-align on PDF pages
- Render each wall projection on its own PDF page at native aspect
- Mount a hidden per-wall projection renderer during export so all walls
  are captured even when the visible panel is in tab mode
- Keep 3D view mounted off-screen once requested so PDF can always snap
  to birds-eye without a visible view switch
- Outlet projection coordinate labels now show 3 decimal places
2026-04-14 18:49:26 +03:00
2026-04-05 11:51:39 +03:00
2026-04-14 03:10:07 +03:00

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.

S
Description
No description provided
Readme 2.6 MiB
Languages
TypeScript 92.4%
CSS 7%
Python 0.5%
JavaScript 0.1%