A modern, production-ready template for building full-stack React applications using React Router.
AI-powered 2D floor plan to photorealistic 3D render β instantly.
Roomify lets you upload any 2D architectural floor plan and transforms it into a photorealistic, top-down 3D visualization using Google Gemini's image generation model β all within a clean, modern web UI. Projects are saved per-user via Puter's cloud infrastructure, so your work is always there when you come back.
| Feature | Description |
|---|---|
| πΌοΈ Floor Plan Upload | Drag-and-drop or click to upload JPG/PNG floor plans |
| π€ AI 3D Rendering | Converts 2D plans to photorealistic top-down renders via Gemini 2.5 Flash |
| π Before / After Slider | Side-by-side comparison of original and rendered output |
| πΎ Project Storage | Per-user project history saved to Puter KV + hosted image storage |
| π Auth | Sign in / sign out via Puter OAuth |
| π₯ Export | Download your rendered image with one click |
| π³ Docker Ready | Multi-stage Dockerfile for production deployments |
| Layer | Technology |
|---|---|
| Framework | React 19 + React Router v7 (SSR) |
| Language | TypeScript |
| Styling | TailwindCSS v4 |
| Build Tool | Vite |
| AI | Puter.js β Gemini 2.5 Flash (txt2img) |
| Auth & Storage | Puter.js (KV store + hosting) |
| Backend Worker | Puter Worker (serverless routing) |
| Icons | Lucide React |
| Compare UI | react-compare-slider |
roomify/
βββ app/
β βββ app.css # Global styles & Tailwind theme
β βββ root.tsx # App shell, auth state, outlet context
β βββ routes.ts # Route definitions
β βββ routes/
β βββ home.tsx # Landing page + upload + project grid
β βββ visualizer.$id.tsx # Render view + before/after compare
βββ components/
β βββ Navbar.tsx # Top navigation with auth controls
β βββ Upload.tsx # Drag-and-drop file uploader
β βββ ui/
β βββ Button.tsx # Reusable button component
βββ lib/
β βββ ai.action.ts # Gemini image generation logic
β βββ constants.ts # App-wide constants & render prompt
β βββ puter.action.ts # Puter auth, project CRUD
β βββ puter.hosting.ts # Image upload to Puter static hosting
β βββ puter.worker.ts # Serverless worker route handlers
β βββ utils.ts # Image conversion, URL helpers
βββ type.d.ts # Global TypeScript interfaces
βββ Dockerfile # Multi-stage production Docker build
βββ vite.config.ts
βββ react-router.config.ts
- Node.js
>= 20 - A Puter account (free) for auth and storage
- A deployed Puter Worker (set its URL in
.env.local)
git clone https://github.com/your-username/roomify.git
cd roomifynpm installCreate a .env.local file in the root:
VITE_PUTER_WORKER_URL=https://your-worker-url.puter.work/π Deploy
lib/puter.worker.tsas a Puter Worker to get this URL.
The worker handles project save/list/get via Puter KV.
npm run devApp will be available at http://localhost:5173.
npm run build
npm run startOr with Docker:
docker build -t roomify .
docker run -p 3000:3000 roomifyThe multi-stage Dockerfile separates dev dependencies, production dependencies, and the final runtime image for a lean container.
User uploads floor plan (JPG/PNG)
β
Image converted to base64
β
Saved to Puter KV + hosted on Puter static hosting
β
puter.ai.txt2img() called with Gemini 2.5 Flash
β
AI prompt: "Convert 2D floor plan β photorealistic top-down 3D render"
β
Rendered image saved back to Puter storage
β
Visualizer displays result + before/after slider
Roomify is a standard Node.js SSR app and can be deployed anywhere that supports Docker or Node:
- Docker β
docker build+docker run(see above) - Fly.io β
fly launch - Railway β connect repo and deploy
- Google Cloud Run β push image to GCR and deploy
- AWS ECS / Azure Container Apps β standard container deployment
Add your app screenshots here
- πͺ Furniture style selector (modern, minimalist, industrial)
- π¨ Room-by-room material customization
- π Public project gallery / community feed
- π€ Share rendered project via link
- π± Improved mobile layout
This project is licensed under the MIT License.
Aarav Kumar
π GitHub: @aarav12e
β If you found this useful, please star the repo and share it!
- π Server-side rendering
- β‘οΈ Hot Module Replacement (HMR)
- π¦ Asset bundling and optimization
- π Data loading and mutations
- π TypeScript by default
- π TailwindCSS for styling
- π React Router docs
Install the dependencies:
npm installStart the development server with HMR:
npm run devYour application will be available at http://localhost:5173.
Create a production build:
npm run buildTo build and run using Docker:
docker build -t my-app .
# Run the container
docker run -p 3000:3000 my-appThe containerized application can be deployed to any platform that supports Docker, including:
- AWS ECS
- Google Cloud Run
- Azure Container Apps
- Digital Ocean App Platform
- Fly.io
- Railway
If you're familiar with deploying Node applications, the built-in app server is production-ready.
Make sure to deploy the output of npm run build
βββ package.json
βββ package-lock.json (or pnpm-lock.yaml, or bun.lockb)
βββ build/
β βββ client/ # Static assets
β βββ server/ # Server-side code
This template comes with Tailwind CSS already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
Built with β€οΈ using React Router.