Skip to content

aarav12e/Roomify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Welcome to React Router!

A modern, production-ready template for building full-stack React applications using React Router.

Open in StackBlitz

Features# 🏠 Roomify

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.


✨ Features

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

πŸ› οΈ Tech Stack

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

πŸ“‚ Project Structure

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

βš™οΈ Getting Started

Prerequisites

  • Node.js >= 20
  • A Puter account (free) for auth and storage
  • A deployed Puter Worker (set its URL in .env.local)

1. Clone the Repository

git clone https://github.com/your-username/roomify.git
cd roomify

2. Install Dependencies

npm install

3. Configure Environment

Create a .env.local file in the root:

VITE_PUTER_WORKER_URL=https://your-worker-url.puter.work/

πŸ‘‰ Deploy lib/puter.worker.ts as a Puter Worker to get this URL.
The worker handles project save/list/get via Puter KV.

4. Start Development Server

npm run dev

App will be available at http://localhost:5173.


πŸ—οΈ Building for Production

npm run build
npm run start

Or with Docker:

docker build -t roomify .
docker run -p 3000:3000 roomify

The multi-stage Dockerfile separates dev dependencies, production dependencies, and the final runtime image for a lean container.


πŸ”„ How It Works

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

🌐 Deployment

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

πŸ“Έ Screenshots

Add your app screenshots here


πŸš€ Planned Improvements

  • πŸͺ‘ Furniture style selector (modern, minimalist, industrial)
  • 🎨 Room-by-room material customization
  • 🌐 Public project gallery / community feed
  • πŸ“€ Share rendered project via link
  • πŸ“± Improved mobile layout

πŸ“„ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

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

Getting Started

Installation

Install the dependencies:

npm install

Development

Start the development server with HMR:

npm run dev

Your application will be available at http://localhost:5173.

Building for Production

Create a production build:

npm run build

Deployment

Docker Deployment

To build and run using Docker:

docker build -t my-app .

# Run the container
docker run -p 3000:3000 my-app

The 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

DIY Deployment

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

Styling

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.

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors