Skip to content

airman416/Stage-AI-Home-Design

Repository files navigation

StagedAI - Professional Virtual Staging App

StagedAI Logo

Transform empty rooms into stunning staged spaces instantly

Platform Swift SwiftUI License


πŸ“± Overview

StagedAI is a professional-grade virtual staging app designed for real estate agents and Airbnb hosts. Using cutting-edge AI technology, it transforms empty or poorly furnished rooms into beautifully staged spaces in seconds.

Key Features

  • πŸͺ„ AI-Powered Staging - Powered by Gemini Vision and Image Generation
  • 🎨 8+ Design Styles - From Scandi Clean to Modern Luxury
  • πŸ“Š Intensity Control - Fine-tune transformations from subtle to complete
  • πŸ“Ή Viral Export - Generate stunning before/after reveal videos
  • πŸ’Ύ Local-First - All data stored securely on device with SwiftData
  • πŸ’³ Premium Subscription - RevenueCat integration with 3-day free trial

πŸ—οΈ Architecture

Tech Stack

Component Technology
Frontend Swift, SwiftUI
Architecture MVVM
Local Persistence SwiftData
Configuration Firebase Remote Config
AI Vision Gemini Flash Latest
AI Generation Gemini 2.5 Flash Image
Payments RevenueCat
Video Export AVFoundation

Project Structure

StagedAI/
β”œβ”€β”€ StagedAIApp.swift           # App entry point
β”œβ”€β”€ ContentView.swift           # Main navigation
β”œβ”€β”€ Models/
β”‚   β”œβ”€β”€ Listing.swift           # SwiftData model
β”‚   β”œβ”€β”€ TransformationStyle.swift
β”‚   └── VisionAnalysis.swift
β”œβ”€β”€ Services/
β”‚   β”œβ”€β”€ GeminiService.swift     # AI integration
β”‚   β”œβ”€β”€ RemoteConfigManager.swift
β”‚   └── VideoGenerator.swift    # Viral export
β”œβ”€β”€ ViewModels/
β”‚   β”œβ”€β”€ HomeViewModel.swift
β”‚   β”œβ”€β”€ UploadViewModel.swift
β”‚   └── ResultViewModel.swift
β”œβ”€β”€ Views/
β”‚   β”œβ”€β”€ PaywallView.swift
β”‚   β”œβ”€β”€ HomeView.swift
β”‚   β”œβ”€β”€ UploadView.swift
β”‚   β”œβ”€β”€ ResultView.swift
β”‚   └── SettingsView.swift
β”œβ”€β”€ Utilities/
β”‚   └── Extensions.swift
└── Assets.xcassets/

πŸš€ Getting Started

Prerequisites

  • Xcode 15.0+
  • iOS 17.0+ device or simulator
  • Gemini API Key (get one at ai.google.dev)

Setup

  1. Clone the repository

    git clone https://github.com/yourusername/StagedAI.git
    cd StagedAI
  2. Open in Xcode

    open StagedAI.xcodeproj
  3. Configure API Key

    Recommended: Edit Config.swift

    Open StagedAI/Config.swift and set your Gemini API key:

    static let geminiAPIKey: String? = "YOUR_ACTUAL_API_KEY_HERE"

    Replace nil with your actual API key string (e.g., "AIzaSy..."). Get your API key at ai.google.dev.

    Alternative: Via Xcode Build Settings

    If you prefer not to hardcode the key:

    1. Select your project in the Project Navigator
    2. Select the StagedAI target
    3. Go to the Build Settings tab
    4. Click the + button β†’ Add User-Defined Setting
    5. Add:
      • Name: GEMINI_API_KEY
      • Value: Your actual Gemini API key
    6. The key will be substituted into Info.plist at build time
  4. Build and Run

    Select your target device and press ⌘R

Firebase Setup (Optional)

To enable Remote Config for dynamic style updates:

  1. Create a Firebase project at console.firebase.google.com
  2. Add an iOS app with your bundle identifier
  3. Download GoogleService-Info.plist and add to the project
  4. Add the Firebase SDK via Swift Package Manager
  5. Create a Remote Config parameter staging_styles with your style JSON

🎨 The Staging Agent Pipeline

How It Works

  1. Vision Analysis (gemini-flash-latest)

    • Analyzes room type, architectural features, and lighting
    • Outputs structured JSON for prompt construction
  2. Intensity Slider Logic

    • Low (0-30%): Refresh lighting and colors only
    • Medium (30-70%): Replace furniture, keep architecture
    • High (70-100%): Complete room restaging
  3. Image Generation (Gemini 2.5 Flash Image)

    • Constructs detailed prompt from analysis + style + intensity
    • Generates photorealistic 8K staged image

Example Prompt

Professional architectural photography of a Living Room. 
Keep the architectural shell (walls, floor, windows) exactly as is. 
Replace the current furniture with Scandi Clean furniture in the same arrangement. 
Feature exposed brick, hardwood floors, floor-to-ceiling windows. 
minimalist, white oak wood, neutral beige textiles, airy atmosphere. 
Lighting: Natural light from left side windows. 
8k resolution, wide angle, photorealistic, no artifacts.

πŸ“± Screens

1. Paywall View

  • Animated gradient background with floating orbs
  • Feature highlights with checkmarks
  • Monthly/Yearly plan selection
  • 3-day free trial CTA

2. Home View

  • Category icons (Interior, Garden, Kitchen, etc.)
  • Recommendation cards with gradient backgrounds
  • "Try It!" pill buttons

3. Upload View

  • Dashed-border upload card
  • Camera and Gallery buttons
  • "My Photos" carousel from SwiftData

4. Result View

  • Before/After slider with wipe effect
  • Intensity slider (0-100%)
  • Style and Color Palette selectors
  • Regenerate button
  • Save/Share action bar

πŸ“Ή Viral Export

The Share Reel feature generates a 4-second video with:

  • Resolution: 1080x1920 (9:16 for Stories/Reels)
  • Effect: Smooth wiper reveal from before β†’ after
  • Animation: Eased cubic timing
  • Watermark: "StagedAI" branding
// Generate share video
let videoURL = try await videoGenerator.generateWiperVideo(
    beforeImage: before,
    afterImage: after
) { progress in
    print("Progress: \(progress * 100)%")
}

πŸ’³ Monetization

RevenueCat Integration

// In production, integrate with RevenueCat:
Purchases.shared.purchase(package: selectedPackage) { transaction, info, error, cancelled in
    if let error = error {
        // Handle error
    } else if !cancelled {
        // Grant premium access
    }
}

Pricing

  • Free Trial: 3 days full access
  • Monthly: $9.99/month
  • Yearly: $79.99/year (Save 33%)

πŸ”§ Configuration

Remote Config Schema

{
  "staging_styles": [
    {
      "id": "scandi",
      "name": "Scandi Clean",
      "icon": "sofa",
      "prompt_modifier": "minimalist, white oak wood, neutral beige textiles, airy atmosphere"
    }
  ]
}

πŸ“„ License

This project is proprietary software. All rights reserved.


πŸ‘₯ Team

Built with ✨ for real estate professionals.


πŸ“ž Support

About

Instant interior design staging for real-estate agents, powered by Gemini.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages