A best-in-class TypeScript boilerplate for designing interior floor plans with matched 2D and 3D views of the same scene โ built on React, Three.js, Zustand, and Zod โ so you can build at the speed of thought with AI, ship an accurate planner, and rank #1 on Google.
โก Demo: 2d-3d-floor-planner.gallop.software
๐จ Template: gallop.software/templates
๐ฆ Repository: github.com/gallop-software/2d-3d-floor-planner-pro
๐ท๏ธ Category: 2D/3D Floor Planner Boilerplate
Just chat with AI inside your code editor using our Gallop templates, and you will never want to wrestle with a heavyweight CAD suite, a bloated drag-and-drop room designer, or a proprietary file format again. Simply describe the space you want, and AI writes the code. No SketchUp, no AutoCAD, no visual editors, and no design limitations. Just type and watch. Lay out rooms and walls, place windows, doors, cabinets and appliances, toggle between accurate 2D and 3D views, configure your SEO and AI discoverability instantly, expand endlessly, and get prompting tips from our Gallop community. Go live in minutes.
/cad/ workspace turns one typed cabinet definition into a 3D drawing, CNC-ready DXF cut sheets, and GRBL G-code for every board, all derived from the same dataft / in) display by default with an in toggle@react-three/fiber + @react-three/drei for the 3D viewsrc/design/home.ts; an edge/bounds authoring DSL keeps the math out of your wayBeyond the floor planner, the template ships a second, standalone page at /cad/ for taking a single cabinet all the way to the shop. Open it from the page menu in the top-left of the toolbar (or visit http://localhost:5173/cad/ directly).
Each cabinet is described once as a typed definition (cad/cabinets/*.ts). From that one source of truth the page generates:
.dxf back onto the canvas to inspect it.Two build variants ship as worked examples โ upper18 (CNC face-frame upper on 48ร48 boards) and upper18saw (the same cabinet as straight saw cuts on 4ร8 sheets).
Machine-safety audit: because bad G-code breaks bits and gouges stock, every generated job is checked by npm run audit:gcode โ it flags un-parseable lines, plunges into stock, travel below safe height, cuts deeper than the material, out-of-bounds moves, and more, and confirms every toolpath lands exactly on the 3D plan.
New to this? No problem. You'll have AI guiding you the entire way. Choose your editor below and follow the steps.
We recommend the Gallop AI Editor for the best experience with Gallop templates โ whether you're a beginner or an advanced developer who wants AI-assisted iteration. It was purpose-built for this workflow and requires zero configuration. VS Code is also a fine choice if you prefer to work without AI assistance.
| Gallop AI Editor | VS Code | |
|---|---|---|
| Best for | Non-programmers, junior programmers, advanced programmers | Advanced programmers |
| AI built in | Yes โ Claude AI ready to go | No (optional extensions available) |
| AI setup requirement | Enter Claude API keys | Install extensions manually |
| Template browser | Built-in marketplace | Download ZIP from GitHub |
| Media manager | Built-in Studio with CDN sync | Manual file management |
| Font manager | Built-in Studio with WOFF2 font generation | No support |
| SEO Audit | Analyze SEO & Structured Data | No support |
| Git | Better Git UI with modal diff viewer | Default Git UI |
| Node.js | Built-in installer and version manager | Install Node.js separately |
The Gallop AI Editor is a desktop app built specifically for AI-powered web development. It includes everything you need โ code editor, AI assistant, Git, terminal, media manager, font manager, SEO & structured data scanner, and a template marketplace โ all in one window with nothing to configure.
Available for Mac and Windows.
From the built-in template marketplace:
Or from a ZIP download:
2d-3d-floor-planner folderClick the AI Chat panel (or press Cmd+E on Mac / Ctrl+E on Windows) to open the AI assistant. Now just ask:
I'm new to this. Help me turn this template into my own floor plan.
The AI assistant can read and edit your project files, run commands, and explain anything you're confused about. Just describe what you want in plain English:
Replace the starter home with my one-bedroom apartment
Add a kitchen island and a row of base cabinets along the north wall
Move the front door to the south wall and add two 48" windows
Turn the living room into an open-plan living and dining space
Tip: Press Cmd+Ctrl+3 (Mac) to take a screenshot of your running plan and attach it to the chat. The AI can see exactly what you see and suggest changes visually.
VS Code is a good choice if you prefer to work without AI assistance. You'll need to install a few things manually.
Click the green Code button at the top of this GitHub page, then click Download ZIP. Unzip the folder somewhere easy to find (like your Desktop).
2d-3d-floor-planner folderOpen the terminal in VS Code (Ctrl+` on Mac/Windows) and run:
npm installnpm run dev
Open http://localhost:5173 to see your floor plan. Press Ctrl+C to stop the server.
Edit src/design/home.ts to model your own space. Refer to the Project Structure and Available Scripts sections below for guidance.
Connect with other Gallop users on Slack. Share your progress, swap AI prompting tips, and see what people are building with the help of AI.
When you're ready to share your floor planner with the world, you'll need a free GitHub account to store your code and a free Vercel account to host your build.
Just ask your AI assistant:
Help me create a GitHub account, push this project to GitHub, and deploy to Vercel
The AI will walk you through every step. When you're done, your planner will be live with a URL you can share.
If you're comfortable with Git:
Ask your AI assistant:
Help me clone my new GitHub repository and run it locally
Or run these commands in your terminal:
git clone https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.gitcd YOUR-REPO-NAMEnpm installnpm run dev
Open http://localhost:5173 to view your floor plan. Press Ctrl+C to stop the server. When ready to test the production build, run npm run build then npm run preview.
Select your repository, and Vercel will automatically deploy whenever you push changes.
Congratulations! Your floor planner is now live to the world. Share your new URL and start growing your audience. Ready for a custom domain? See Vercel's domain setup guide.
2D/3D Floor Planner is part of the Gallop template ecosystem. Gallop templates are designed to be built with AI โ just describe what you want in plain English and watch your project come to life.
The Gallop AI Editor is a desktop code editor built specifically for AI-powered development. It combines a full code editor, Claude AI assistant, visual Git interface, integrated terminal, media manager, and template marketplace into one app. Everything is preconfigured to work with Gallop templates out of the box โ no extensions, no plugins, no setup.
Key highlights:
Cmd+Ctrl+3 to screenshot your running plan and share it with AI for visual feedbackThis template was crafted from the ground up to get your project ranked #1 on Google and recommended by AI assistants like ChatGPT and Google's Gemini. The HTML shell ships with complete metadata, Open Graph, and Twitter cards that search engines and AI models actually parse.
AI mentions are becoming more important than traditional SEO. When someone asks an AI assistant for "tools to plan a room layout," you want yours in that answer. Gallop templates are built with the metadata and semantic markup that AI models rely on to understand and recommend your work.
The team behind Gallop has decades of combined experience building websites, apps, and web applications for top global brands. We've helped projects achieve #1 Google rankings in competitive markets and understand what it takes to ship something polished. That expertise is baked into every template, every component, and every line of code.
2d-3d-floor-planner/โโโ src/โ โโโ main.tsx # React entry โ mounts <App> into #rootโ โโโ App.tsx # Layout shell: Toolbar + 2D / 3D / Split viewsโ โโโ design/โ โ โโโ home.ts # THE DESIGN โ your rooms, walls, openings, fixtures (EDIT THIS)โ โโโ scene/ # The template engine (reference it; don't change it)โ โ โโโ schema.ts # Zod schema + types โ the scene contractโ โ โโโ build.ts # Edge/bounds authoring DSL used from home.tsโ โ โโโ geometry.ts # Polygon, wall, and opening mathโ โ โโโ units.ts # Imperial / inch formatting helpersโ โ โโโ describe.ts # Shared tooltip + selection text for both viewsโ โ โโโ store.ts # Zustand state (view mode, units, selection)โ โโโ views/ # The renderersโ โ โโโ Plan2D.tsx # SVG 2D floor planโ โ โโโ Scene3D.tsx # react-three-fiber 3D scene + cameraโ โ โโโ Compass.tsx # Cardinal compass roseโ โ โโโ three/ # 3D primitivesโ โ โโโ Wall3D.tsx # Zero-thickness wall plane with openings cut outโ โ โโโ Opening3D.tsx # Window / door / cased openingโ โ โโโ Floor3D.tsx # Room floor polygonโ โ โโโ Fixture3D.tsx # Box / cylinder / prism cabinets & appliancesโ โโโ ui/ # Toolbar chromeโ โ โโโ Toolbar.tsx # Top bar (page menu + brand + toggles)โ โ โโโ PageMenu.tsx # Dropdown to switch between Floor Plan and Cabinet CAD pagesโ โ โโโ ViewModeToggle.tsx # 2D Plan / 3D View / Splitโ โ โโโ UnitsToggle.tsx # ft / in ยท inโ โ โโโ ZoomControls.tsx # Shared +/- zoom buttonsโ โโโ styles/โ โโโ index.css # Tailwind entry + global stylesโโโ cad/ # Standalone Cabinet CAD page (/cad/) โ 3D + DXF + G-codeโ โโโ index.html # SEO-rich HTML shell for the CAD pageโ โโโ main.ts # CAD app entry โ canvas, sheets, downloads, page menuโ โโโ model.ts # Cabinet definition types + DXF generation (single source of truth)โ โโโ view3d.ts # Three.js 3D drawing of a cabinet (explode, callouts, layers)โ โโโ gcode.ts # CAM โ generates GRBL G-code per board from the cabinetโ โโโ surfacing.ts # Wasteboard-surfacing G-code programโ โโโ audit.ts # Machine-safety + dimensional audit of every G-code jobโ โโโ viewer.css # Styling for the CAD pageโ โโโ cabinets/ # Cabinet definitions (edit / add your own)โ โโโ upper18.ts # CNC face-frame upper (48ร48 boards)โ โโโ upper18saw.ts # Circular-saw build of the same cabinet (4ร8 sheets)โโโ public/โ โโโ screenshot.jpg # Featured image for OG / template marketplacesโโโ index.html # SEO-rich HTML shell (meta, Open Graph, Twitter cards)โโโ vite.config.ts # Vite configuration (multi-page: index.html + cad/index.html)โโโ tsconfig.json # TypeScript config (strict)โโโ tailwind.config.js # Tailwind CSS configurationโโโ postcss.config.js # PostCSS (Tailwind + Autoprefixer)โโโ package.jsonโโโ README.md
npm run dev โ Start development server at http://localhost:5173 with hot reload (Floor Plan at /, Cabinet CAD at /cad/)npm run build โ Type-check, then bundle both pages to dist/ for productionnpm run preview โ Serve the production build locally for testingnpm run typecheck โ TypeScript type checking without emittingnpm run audit:gcode โ Machine-safety + dimensional audit of every generated CNC G-code jobEvery dependency is battle-tested in production and chosen for stability, performance, and long-term maintainability.
18.3 โ UI library powering both view shells0.169 โ WebGL 3D renderer8.17 โ React renderer for Three.js9.114 โ Helpers for fiber (OrbitControls, Grid, Html, Edges)5.0 โ Minimal state management with localStorage persistence3.23 โ Runtime schema validation for the scene contractTools for building and developing the planner:
5.4 โ Dev server and bundler with instant HMR4.3 โ React Fast Refresh + JSX transform5.6 โ Type safety and IntelliSense (strict mode)3.4 โ Utility-first styling for UI chrome8.4 + Autoprefixer 10.4 โ CSS processing pipelineMIT License โ see LICENSE for details
Contributors:
Built with โค๏ธ by the team at Gallop