Skip to content

offflinerpsy/prop2ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Room Renovator

Turn distressed rooms into listing-ready interiors using AI-powered virtual staging.

License: MIT Node.js Tailwind CSS

Overview

AI Room Renovator is an MVP web application designed for US realtors who need to virtually stage empty or outdated rooms for property listings. Upload a room photo, choose a design style, and receive a photorealistic renovation — all while preserving the original wall geometry via ControlNet.

Key Features

  • Before / After Slider — interactive comparison using img-comparison-slider
  • Multiple Interior Styles — Modern, Industrial, Minimalist (admin-managed)
  • AI Generation — Replicate + ControlNet (geometry-preserving)
  • Admin Panel — full CMS via AdminJS (users, styles, content, analytics)
  • No Signup Required — instant upload-and-generate workflow
  • Responsive — mobile-first layout with Tailwind CSS

Architecture

prop2ai/
├── server.js              # Express server, API routes, boot sequence
├── models/index.js        # Sequelize models (SQLite) — User, Style, etc.
├── admin/index.js         # AdminJS configuration & resources
├── services/v0Client.js   # v0 API integration for design assistance
├── public/
│   ├── index.html         # Single-page frontend (Tailwind CDN)
│   └── script.js          # Client-side logic & API interactions
├── .env                   # Environment variables (not committed)
└── data.db                # SQLite database (auto-created, not committed)

Tech Stack

Layer Technology
Backend Node.js 20+, Express 4, ESM
Database SQLite via Sequelize 6
Admin AdminJS 7 + @adminjs/sequelize
AI Engine Replicate API (ControlNet models)
Frontend Vanilla JS, Tailwind CSS (CDN)
Slider img-comparison-slider 8
Design v0 Model API (design assistance)

Quick Start

Prerequisites

Installation

git clone https://github.com/offflinerpsy/prop2ai.git
cd prop2ai
npm install

Configuration

Create a .env file in the project root:

REPLICATE_API_TOKEN=r8_your_token_here
V0_API_KEY=v0_your_key_here          # optional — for design-assist endpoint
PORT=3000                             # optional — defaults to 3000
SESSION_SECRET=change-me
ADMIN_COOKIE_SECRET=change-me

Running

node server.js

API Endpoints

Method Path Description
GET /health Health check
GET /api/styles List active interior styles
GET /api/blocks List visible content blocks
GET /api/menu Navigation menu links
GET /api/settings/public Non-secret site settings
GET /api/stats Dashboard statistics
POST /api/restage Generate renovated room image
POST /api/design-assist Get v0 design suggestions

POST /api/restage

curl -X POST http://localhost:3000/api/restage \
  -F "image=@room.jpg" \
  -F "user_style=Modern" \
  -F "structure=hough"

Response: { "outputUrl": "https://replicate.delivery/..." }

Admin Panel

AdminJS provides a full CRUD interface at /admin:

Section Description
Users & Access Admin & client accounts, role management
AI Styles Prompts, negative prompts, preview images, ordering
Content Blocks Hero, trust cards, CTA blocks with icons & config
Navigation Header menu links with visibility control
Settings API keys, branding, site configuration
Generations Full AI generation log (status, timing, errors)

Adding a New Style

  1. Navigate to /adminAI StylesCreate new
  2. Fill in: name, slug, prompt, negative prompt, preview image URL
  3. Set isActive: true and order
  4. The style card appears on the frontend automatically

Database

SQLite stored at data.db (auto-created on first run). No external DB required.

Models: User, Style, SiteBlock, Setting, Generation, MenuLink, ReplicateModel.

Security

  • Never commit .env or data.db
  • Change the default admin password after first login
  • API tokens can be managed from Admin → Settings → API Keys
  • Session secrets should be changed in production

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit with conventional messages: feat: add style preview
  4. Push and open a Pull Request

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors