# roomGPT

> Next.js app that redesigns a room photo with AI using ControlNet on Replicate

- Repository: https://github.com/Nutlope/roomGPT
- Category: Image, video & audio
- Stars: 10,690 · Forks: 1,494 · Language: TypeScript · License: MIT
- Experience: Beginner friendly
- Page: https://ir.adyog.com/repos/nutlope/roomgpt/

RoomGPT takes a photo of a room and returns a redesigned version of it. It is the early, open-source version of the paid RoomGPT.io product, with login, payments and extra features removed.

You upload a photo, and a Next.js API route sends it to ControlNet, a model that generates new images guided by the structure of an input image. The model is hosted on Replicate, so you need a Replicate API key but no GPU. Bytescale stores the images.

Because the app is minimal, it works well as a reference for building an image-generation product on hosted models. Rate limiting is optional and uses an Upstash Redis database.

## What it does

- **Photo-to-room redesign**: Upload a photo of any room and get a generated variation back.
- **Hosted ControlNet model**: Generation runs on Replicate through a Next.js API route, so no local model setup is needed.
- **Image storage with Bytescale**: Uploaded images are stored with Bytescale.
- **Optional rate limiting**: Add an Upstash Redis database and two environment variables to limit usage. If you skip it, nothing else changes.
- **One-click Vercel deploy**: A deploy button clones the repo and asks for your Replicate API key.

## What you could build

- Run your own room-redesign demo with your own Replicate key.
- Study how a Next.js app calls a hosted image model through an API route.
- Fork it as a starting point for another image-to-image tool.
- Deploy a working AI app to Vercel in a few clicks.
- Add rate limiting to a public AI demo using Upstash Redis.

## Who it's for

Web developers and students who know basic Next.js and npm and want a small, working example of an AI image app.

## Get started

Clone the repo, create a Replicate account and copy your API token into a .env file as shown in .example.env, then install and run. The app is served at http://localhost:3000.

```
git clone https://github.com/Nutlope/roomGPT
```
```
npm install
```
```
npm run dev
```

Tags: image-generation, controlnet, nextjs, replicate, interior-design
