Skip to content
ziangitPublic

About

AI home-design web app: upload a room photo, pick a style, and get a photorealistic redesign with a before/after slider — powered by OpenAI GPT Image 2. Built with Next.js 16 + TypeScript.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

KozyAI

A web-based AI home-design tool inspired by CozyAI. Upload a photo of a room, pick a style, add optional details, and get a photorealistic AI redesign with a before/after comparison — powered by OpenAI GPT Image 2.

Screenshots

Scandinavian redesign (Standard quality)

The studio in action: an open-plan co-working space redesigned into a bright Scandinavian living room — light woods, white walls, wishbone chairs, a linen sofa, and soft natural light. The draggable before/after slider reveals the original office on the left and the AI redesign on the right, while the room's structure (column, exposed ceiling, wall art, and window light) is preserved.

KozyAI — Scandinavian living-room redesign with before/after slider

Industrial redesign (High quality)

The same room reimagined in an Industrial style at High quality — exposed brick, a raw concrete column, black metal pendant lamps with Edison bulbs, reclaimed-wood tables, and tan leather seating. The left control panel shows the full workflow: room type, style swatches, quality tier, and an optional free-text prompt.

KozyAI — Industrial living-room redesign at high quality

Features (MVP)

  • Photo upload (drag & drop) — PNG / JPEG / WebP, up to 10MB
  • Room type + style pickers (Scandinavian, Modern, Industrial, Japandi, and more)
  • Natural-language details to steer the redesign
  • GPT Image 2 redesign via the Images edit endpoint (preserves room architecture)
  • Before/after slider and one-click download
  • Local project history (IndexedDB — no account needed)

Getting started

  1. Install deps:
    npm install
  2. Add your OpenAI key:
    cp .env.example .env.local
    # edit .env.local and set OPENAI_API_KEY

    Your OpenAI org must have access to gpt-image-2 and, for image generation, may need API org verification.

  3. Run the dev server:
    npm run dev
    Open http://localhost:3000.

Architecture

  • src/app/page.tsx — the studio UI (upload, style, generate, history).
  • src/app/api/generate/route.ts — server route; validates input, keeps the API key server-side, calls the provider.
  • src/lib/providers/ — ImageProvider interface + gpt-image-2 implementation. Swap or add a model (e.g. Gemini) here without touching the rest of the app.
  • src/lib/prompt.ts — builds the redesign prompt from room type + style + description.
  • src/lib/constants.ts — room types and design styles (data-driven).
  • src/lib/history.ts — IndexedDB-backed local project history.

Roadmap (not yet built)

  • Brush-to-Edit (mask endpoint is already wired in the provider interface)
  • Reference-image / moodboard guidance (provider supports multiple inputs)
  • Declutter / Enhance presets, Outdoor mode
  • Accounts, cloud storage, and credits/billing

About

AI home-design web app: upload a room photo, pick a style, and get a photorealistic redesign with a before/after slider — powered by OpenAI GPT Image 2. Built with Next.js 16 + TypeScript.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages