# Project export: ReAbode

This document was generated by HackStack to give an AI agent context about a hackathon project. Sections are labeled with their provenance; content marked as truncated was cut to keep this document small.

## Project metadata

- Hackathon: Cal Hacks 12.0
- Tagline: An AI Interior designer providing real time suggestions and feedback, with the snap of a photo.
- Devpost: https://devpost.com/software/chicken-adobo
- GitHub: https://github.com/NoahChhan/Reabode
- Video: https://www.youtube.com/embed/-6c6SwFHyCU?enablejsapi=1&hl=en_US&rel=0&start=&version=3&wmode=transparent
- Team: 4 GitHub contributor(s) — NoahChhan (18 commits), edwin yue (7 commits), zararahim (5 commits), Ena Macahiya (2 commits)

## Devpost submission (written by the team)

### Inspiration

As college students who recently moved away from home, we each faced the same struggle of turning a bare, unfamiliar apartment into a space that truly felt like ours. We wanted our rooms to reflect our personalities, but designing within a student budget and without a clear vision made it challenging. We often found ourselves asking: “What furniture fits this space?” “Will this color scheme actually look good?” “Can I afford this aesthetic?” These questions inspired us to build a tool that bridges vision and practicality. Our inspiration came from the shared frustration of browsing endlessly through Pinterest boards or IKEA catalogs, trying to imagine how each piece would fit into our unique rooms. We wanted to make the process of interior design visual, personal, and budget-friendly, even for people with no design background.

### What it does

Our project is an AI-powered Room Blueprint and Recommendation System that helps users design their spaces with confidence and creativity. Users upload photos of their rooms from one or multiple angles. The backend analyzes the images to identify the room type, dimensions, and color scheme. A recommendation engine matches these details to curated IKEA products, taking into account style preferences, color palettes, and budget. The user receives personalized furniture recommendations with direct purchase links and a generated room blueprint showing how the pieces can fit together. This combination of computer vision and product matching helps turn vague inspiration into actionable design choices. What We Learned We learned how to combine computer vision, machine learning, and structured product data into a cohesive user experience. Beyond the technical skills, we discovered the importance of usability and accessibility—powerful technology only matters if people can easily use it to improve their daily lives. Next Steps Our next steps focus on expanding and enhancing the experience: Pinterest Integration: Allow users to import mood boards and inspiration photos directly as style references. Generative AI Visualization: Use generative models to simulate redesigned rooms and preview how selected furniture would look. Multi-Store Expansion: Add support for other furniture retailers and local stores to provide more variety and price flexibility. AR Preview: Enable users to walk through their redesigned space in augmented reality to visualize scale and layout in real time. Closing Thoughts This project began as a way to make our new apartments feel like home, but it has grown into something that could help anyone design a space that reflects who they are. By blending AI, design, and accessibility, we aim to make interior design more personal, affordable, and visual—one room at a time.

## README (from the GitHub repository)

# Reabode AI Interior Designer 🏠✨

An AI-powered mobile app that analyzes your room photos and provides personalized furniture and decor recommendations from real retailers like IKEA and Target.

## 🚀 Features

- **AI Room Analysis**: Upload room photos and get instant style analysis
- **Smart Recommendations**: Get personalized product suggestions based on your space
- **Real Product Links**: Direct links to IKEA, Target, and other retailers
- **Mood Board Creation**: Visualize your design ideas
- **Real-time Collaboration**: Work with friends and family on designs
- **Mobile-First**: Built with React Native for iOS and Android

## 🛠️ Tech Stack

### Mobile App (React Native + Expo)

- **Framework**: React Native 0.81.5 with Expo SDK 54
- **Navigation**: React Navigation 6 (Stack & Bottom Tabs)
- **UI Components**: React Native Paper 5.11.0
- **Camera**: Expo Camera 17.0.8 & Expo Image Picker 17.0.8
- **Gestures**: React Native Gesture Handler & Reanimated
- **Icons**: React Native Vector Icons 10.0.0
- **Fonts**: Custom fonts (Poppins, Moonlight) via Expo Font
- **State Management**: React Hooks & Context API
- **TypeScript**: Full TypeScript support

### Frontend Web (Next.js)

- **Framework**: Next.js 16.0.0 with React 19.2.0
- **Styling**: Tailwind CSS 4.0 with PostCSS
- **TypeScript**: TypeScript 5.x with strict type checking
- **Linting**: ESLint 9 with Next.js configuration
- **Build**: Next.js built-in bundling and optimization

### Backend (FastAPI + Python)

- **API Framework**: FastAPI 0.104.1 with automatic OpenAPI docs
- **Server**: Uvicorn 0.24.0 with ASGI support
- **AI Services**: Google Gemini AI (google-generativeai 0.3.2)
- **Image Processing**: Pillow 10.2.0+ for image manipulation
- **Web Scraping**: Selenium 4.15.2 with WebDriver Manager
- **Data Validation**: Pydantic 2.8.2 for request/response models
- **Authentication**: Python-JOSE with cryptography
- **Security**: Passlib with bcrypt for password hashing
- **Environment**: Python-dotenv for configuration management
- **HTTP Client**: Requests 2.31.0 for external API calls
- **CORS**: FastAPI CORS middleware for cross-origin requests

### Development & Build Tools

- **Package Management**: npm with package-lock.json
- **Concurrent Development**: concurrently 8.2.2 for parallel dev servers
- **TypeScript**: TypeScript 5.x across all TypeScript projects
- **Babel**: Babel preset Expo for React Native compilation
- **Linting**: ESLint with Next.js and React Native configurations

## 🏗️ Project Architecture

### Multi-Platform Structure

This project consists of three main applications working together:

1. **Mobile App** (`/mobile`) - Primary user interface

   - React Native with Expo for iOS/Android
   - Camera integration for room photo capture
   - Real-time AI analysis and product recommendations
   - Offline-first design with local storage

2. **Web Frontend** (`/frontend`) - Administrative dashboard

   - Next.js with Tailwind CSS for modern web interface
   - Project management and analytics
   - Content management for product catalogs

3. **Backend API** (`/backend`) - Core services
   - FastAPI with automatic API documentation
   - AI-powered room analysis using Google Gemini
   - Product scraping and recommendation engine
   - RESTful API serving both mobile and web clients

### Key Features Implemented

- **Room Blueprint Generation**: Computer vision pipeline for 2D room layouts
- **AI Room Analysis**: Style detection and furniture identification
- **Product Recommendations**: IKEA scraping and matching algorithms
- **Real-time Processing**: Live image analysis and instant feedback
- **Cross-platform Sync**: Shared API backend for consistent data

## 📱 Mobile App Features

### Core Screens

- **Home**: Project overview and quick actions
- **Camera**: Room photo capture and gallery selection
- **Analysis**: Room dimensions and style preferences
- **Recommendations**: Product suggestions with filtering
- **Profile**: Settings and preferences

### Key Components

- Camera integration with image capture
- Swipeable product cards
- Real-time room analysis
- Product filtering and search
- Favorites and shopping cart

### Quick Start

1. **Install Dependencies**

   ```bash
   npm run install:all
   ```

2. **Start Development Servers**

   ```bash
   npm run dev
   ```

   This starts both the FastAPI backend (port 8000) and Expo mobile app.

3. **Access the App**
   - **Mobile**: Scan QR code with Expo Go app
   - **Backend API**: http://localhost:8000
   - **API Docs**: http://localhost:8000/docs

### Manual Setup

#### Backend

```bash
cd backend
pip install -r requirements.txt
python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000
```

#### Mobile App

```bash
cd mobile
npm install
expo start
```


## 🔌 API Endpoints

### Core Endpoints

- `POST /analyze-room` - Analyze room images with AI
- `POST /recommendations` - Get product recommendations
- `GET /projects` - List design projects
- `POST /projects` - Create new project
- `POST /products/search` - Search products
- `POST /mood-board` - Create mood board
- `POST /collaboration/join` - Join collaboration room



## 📦 Dependencies

### Mobile (React Native)

- **Core**: Expo SDK 54, React Native 0.81.5, React 19.1.0
- **Navigation**: React Navigation 6 (Native, Stack, Bottom Tabs)
- **UI**: React Native Paper 5.11.0, Vector Icons 10.0.0
- **Camera**: Expo Camera 17.0.8, Expo Image Picker 17.0.8
- **Gestures**: React Native Gesture Handler 2.28.0, Reanimated 4.1.1
- **Media**: Expo AV 16.0.7, Expo Linear Gradient 15.0.7
- **Utilities**: Expo Font 13.0.3, Expo Haptics 15.0.7, Expo Status Bar 3.0.8
- **Development**: TypeScript 5.1.3, Babel Core 7.20.0

### Frontend Web (Next.js)

- **Core**: Next.js 16.0.0, React 19.2.0, React DOM 19.2.0
- **Styling**: Tailwind CSS 4.0, PostCSS 4.0
- **TypeScript**: TypeScript 5.x, Node Types 20, React Types 19
- **Linting**: ESLint 9, ESLint Config Next 16.0.0

### Backend (Python)

- **API**: FastAPI 0.104.1, Uvicorn 0.24.0, Pydantic 2.8.2
- **AI**: Google Generative AI 0.3.2 (Gemini)
- **Image Processing**: Pillow 10.2.0+
- **Web Scraping**: Selenium 4.15.2, WebDriver Manager 4.0.1
- **Security**: Python-JOSE 3.3.0, Passlib 1.7.4
- **Utilities**: Python-dotenv 1.0.0, Requests 2.31.0, Python-multipart 0.0.6

### Development Tools

- **Concurrency**: concurrently 8.2.2 for parallel development
- **Package Management**: npm with lock files across all projects

## 🚀 Deployment

### Mobile App

```bash
# Build for production
npx expo start --tunnel

# Deploy to app stores
expo build:android
expo build:ios
```

### Backend API

```bash
# Production server
cd backend
uvicorn main:app --host 0.0.0.0 --port 8000
```

### Key Advantages

- **Faster Development**: Visual testing of AI features
- **Better UX**: Mobile-optimized interactions
- **Easier Debugging**: See what's happening in real-time
- **Impressive Demos**: Working mobile app with AI features

## 📄 License

MIT License - see LICENSE file for details


## Detected evidence (automated analysis)

Indexed codebase: 46 recognized source files, 5027 KB.
- CSS (language) — detected in the code
- FastAPI (technology) — detected in the code
- JavaScript (language) — detected in the code
- Next.js (technology) — detected in the code
- Python (language) — detected in the code
- React (technology) — detected in the code
- Tailwind CSS (technology) — detected in the code
- TypeScript (language) — detected in the code
- Google Gemini (technology) — claimed on Devpost, not found in the code

## Codebase structure (from repository index)

### Files (64 of 64)

```
.gitignore
backend/demo_pipeline.py
backend/main.py
backend/package.json
backend/processing.py
backend/README.md
backend/requirements.txt
backend/room_analysis_pipeline.py
backend/routes/recommend_products.py
backend/services/gemini_service.py
backend/services/ikea_scraper.py
backend/services/match_utils.py
backend/services/product_service.py
backend/show_urls.py
backend/test_pipeline.py
frontend/.gitignore
frontend/eslint.config.mjs
frontend/next.config.ts
frontend/package.json
frontend/postcss.config.mjs
frontend/README.md
frontend/src/app/globals.css
frontend/src/app/layout.tsx
frontend/src/app/page.tsx
frontend/src/components/Button.tsx
frontend/src/components/Card.tsx
frontend/src/components/Input.tsx
frontend/src/services/api.ts
frontend/tsconfig.json
mobile/.expo/devices.json
mobile/.expo/README.md
mobile/.gitignore
mobile/app.json
mobile/App.tsx
mobile/assets/fonts/moonlight/readme.txt
mobile/assets/fonts/poppins/OFL.txt
mobile/babel.config.js
mobile/design-system.json
mobile/package.json
mobile/react-native-vector-icons.d.ts
mobile/src/assets
mobile/src/components/GlobalErrorModal.tsx
mobile/src/components/ImageUploadMenu.tsx
mobile/src/components/LiveKitCamera.tsx
mobile/src/components/MeasurementForm.tsx
mobile/src/components/README.md
mobile/src/components/WelcomeScreen.tsx
mobile/src/hooks/useErrorOverlay.tsx
mobile/src/screens/BlueprintPreviewScreen.tsx
mobile/src/screens/CameraScreen.tsx
mobile/src/screens/HomeScreen.tsx
mobile/src/screens/ProfileScreen.tsx
mobile/src/screens/RecommendationsScreen.tsx
mobile/src/screens/RoomAnalysisScreen.tsx
mobile/src/screens/TestErrorScreen.tsx
mobile/src/services/api.ts
mobile/src/theme/theme.ts
mobile/src/types/index.ts
mobile/tsconfig.json
package.json
README.md
ROOM_BLUEPRINT_MVP.md
test_backend.py
TESTING_GUIDE.md
```

### Dependencies

- backend/requirements.txt: fastapi@==0.104.1, google-generativeai@==0.3.2, passlib[bcrypt]@==1.7.4, pillow@>=10.2.0, pydantic@==2.8.2, python-dotenv@==1.0.0, python-jose[cryptography]@==3.3.0, python-multipart@==0.0.6, requests@==2.31.0, selenium@==4.15.2, uvicorn[standard]@==0.24.0, webdriver-manager@==4.0.1
- frontend/package.json: @tailwindcss/postcss@^4, @types/node@^20, @types/react@^19, @types/react-dom@^19, eslint@^9, eslint-config-next@16.0.0, next@16.0.0, react@19.2.0, react-dom@19.2.0, tailwindcss@^4, typescript@^5
- mobile/package.json: @babel/core@^7.20.0, @expo/ngrok@^4.1.3, @react-navigation/bottom-tabs@^6.5.0, @react-navigation/native@^6.1.0, @react-navigation/stack@^6.3.0, @types/react@~19.1.10, babel-preset-expo@^54.0.6, expo@^54.0.20, expo-av@~16.0.7, expo-camera@~17.0.8, expo-font@~13.0.3, expo-haptics@~15.0.7, expo-image-picker@~17.0.8, expo-linear-gradient@~15.0.7, expo-status-bar@~3.0.8, react@19.1.0, react-native@0.81.5, react-native-gesture-handler@~2.28.0, react-native-paper@^5.11.0, react-native-reanimated@~4.1.1, react-native-safe-area-context@~5.6.0, react-native-screens@~4.16.0, react-native-swipe-cards@^0.1.0, react-native-vector-icons@^10.0.0, react-native-worklets@0.5.1, typescript@^5.1.3
- package.json: concurrently@^8.2.2

### Recent commits (newest first)

- created testing pipeline for development
- created testing pipeline for development
- Remove TEAM_TASKS.md - no longer needed for hackathon
- Update README for hackathon presentation - transform from dev mode to product showcase
- updated the readme.md
- created a webscraper
- created a webscrapper
- Merge pull request #5 from NoahChhan/zararahim/ui-polish-v2
- Update bottom nav bar to beige background and replace navigation icons
- WelcomeScreen
- Add base64 support for tab bar icons
- Removed dark mode from main branch
- Fix duplicate React imports in App.tsx
- Merge frontend engineer's UI with our key fixes
- WIP: Frontend engineer's tab bar styling with Material Icons fallback
- Merge pull request #4 from NoahChhan/zararahim/mobile-ui-polish
- Merge branch 'main' into zararahim/mobile-ui-polish
- Merge team updates - keep our camera fixes and error handling approach
- Fix camera navigation, remove dark mode, restore backend communication
- created a pipeline which connects with gemmini request pipeline

## Key source files (fetched from GitHub, selected and truncated for size)

### ROOM_BLUEPRINT_MVP.md

```markdown
# 🏠 Room Blueprint Generator MVP

An AI-powered mobile app that generates 2D room blueprints from camera images and user measurements.

## 🎯 MVP Features Completed

### ✅ Frontend (React Native/Expo)

- **Image Upload Menu**: Choose between 1, 2, or 3-5 photo capture modes
- **LiveKit Camera Component**: Capture high-quality room images with camera controls
- **Measurement Form**: Input wall length, ceiling height, unit selection, and room type
- **Blueprint Preview**: Display generated blueprint with save/share functionality
- **Navigation Integration**: Seamlessly integrated into existing app navigation

### ✅ Backend (FastAPI)

- **Image Processing Pipeline**: OpenCV-based edge detection and feature extraction
- **Blueprint Generation**: 2D top-down view with scaled dimensions
- **RESTful API**: `/generate-blueprint` endpoint with multipart form data
- **Error Handling**: Graceful fallbacks and comprehensive error responses
- **Temporary Storage**: Secure handling of uploaded images

### ✅ Computer Vision Features

- **Edge Detection**: Canny edge detection for wall identification
- **Line Detection**: Hough transform for wall line extraction
- **Corner Detection**: Harris corner detection for room geometry
- **Feature Classification**: Walls, doors, windows, and corners
- **Scale Integration**: Real-world measurements applied to blueprint

## 🚀 Quick Start

### 1. Start the Backend

```bash
cd backend
pip install -r requirements.txt
python main.py
```

Backend runs on: http://localhost:8000

### 2. Start the Mobile App

```bash
cd mobile
npm install
npx expo start
```

### 3. Test the Integration

```bash
python test_backend.py
```

## 📱 User Flow

1. **Select Capture Mode**: Choose 1, 2, or 3-5 photos based on room complexity
2. **Capture Images**: Use camera to take room photos from different angles
3. **Input Measurements**: Provide wall length, ceiling height, and room type
4. **Generate Blueprint**: AI processes images and creates scaled 2D blueprint
5. **View & Share**: Preview blueprint with measurements and save/share options

## 🛠️ Technical Architecture

### Frontend Components

```
mobile/src/
├── components/
│   ├── LiveKitCamera.tsx      # Camera capture with LiveKit
│   ├── ImageUploadMenu.tsx    # Mode selection and image preview
│   └── MeasurementForm.tsx    # User input form
├── screens/
│   └── BlueprintPreviewScreen.tsx  # Results display
└── App.tsx                    # Main navigation and state
```

### Backend Services

```
backend/
├── main.py                    # FastAPI application
├── processing.py              # Computer vision pipeline
└── requirements.txt           # Python dependencies
```

## 🔧 API Endpoints

### POST `/generate-blueprint`

**Description**: Generate 2D room blueprint from images and measurements

**Request**:

- `files`: List of image files (1-5 images)
- `wallLength`: Wall length measurement
- `ceilingHeight`: Ceiling height measurement
- `unit`: Measurement unit ("meters" or "feet")
- `
[truncated — 3636 more characters]
```

### TESTING_GUIDE.md

```markdown
# 🧪 Reabode Testing Guide

## 📁 Project Structure Overview

```
Reabode/
├── backend/                    # FastAPI Backend
│   ├── main.py                # Main API server
│   ├── services/              # Business logic
│   │   └── product_service.py # Product matching algorithm
│   ├── data/                  # Data files
│   │   └── ikea_products.json # 50 IKEA products database
│   └── test_*.py              # Test files
├── mobile/                    # React Native Mobile App
│   ├── App.tsx               # Main app component
│   └── src/                  # Mobile app source code
└── frontend/                  # Next.js Web App (legacy)
```

## 🧪 Test Files Explained

### **Backend Test Files**

#### 1. `test_product_service.py` - **Comprehensive ProductService Testing**

**What it does:** Tests the core product matching algorithm with various scenarios
**When to use:** When you want to verify the ProductService is working correctly
**How to run:**

```bash
cd backend
python test_product_service.py
```

**What it tests:**

- ✅ Product loading (50 products)
- ✅ Budget filtering (low/medium/high)
- ✅ Room type matching (living room, bedroom, etc.)
- ✅ Style matching (modern, traditional, etc.)
- ✅ Color matching (white, brown, etc.)
- ✅ Comprehensive matching with all criteria

#### 2. `test_recommendations_api.py` - **API Endpoint Testing**

**What it does:** Tests the `/recommendations` API endpoint with real HTTP requests
**When to use:** When you want to test the full API integration
**How to run:**

```bash
cd backend
python test_recommendations_api.py
```

**What it tests:**

- ✅ API health check
- ✅ Modern living room recommendations
- ✅ Traditional bedroom recommendations
- ✅ Industrial office recommendations
- ✅ HTTP request/response handling

#### 3. `test_interactive.py` - **Interactive Testing Interface**

**What it does:** Provides a step-by-step interactive menu for testing different scenarios
**When to use:** When you want to manually test different combinations
**How to run:**

```bash
cd backend
python test_interactive.py
```

**What it does:**

- 🎯 Interactive menu for room type selection
- 🎨 Style preference input
- 🌈 Color preference input
- 💰 Budget selection
- 📊 Custom recommendation limits

#### 4. `quick_test.py` - **Quick Command Line Testing**

**What it does:** Fast command-line testing with predefined scenarios
**When to use:** When you want to quickly test specific scenarios
**How to run:**

```bash
# Default test
cd backend
python quick_test.py

# Custom test
python quick_test.py bedroom traditional brown low
python quick_test.py kitchen modern black high
```

**What it tests:**

- 🏠 Room type matching
- 🎨 Style matching
- 🌈 Color matching
- 💰 Budget filtering

#### 5. `test_curl.sh` - **cURL API Testing**

**What it does:** Tests the API using cURL commands (requires jq for formatting)
**When to use:** When you want to test the API from command line
**How to run:**

```bash
cd backend
./test_curl.sh
```
[truncated — 4194 more characters]
```

### package.json

```
{
  "name": "reabode-ai-interior-designer",
  "version": "1.0.0",
  "description": "AI-powered interior design mobile app with React Native and FastAPI",
  "scripts": {
    "dev": "concurrently \"npm run dev:backend\" \"npm run dev:mobile\"",
    "dev:backend": "cd backend && python -m uvicorn main:app --reload --host 0.0.0.0 --port 8000",
    "dev:mobile": "cd mobile && expo start",
    "install:all": "npm run install:backend && npm run install:mobile",
    "install:backend": "cd backend && pip install -r requirements.txt",
    "install:mobile": "cd mobile && npm install",
    "build:mobile": "cd mobile && expo build:android && expo build:ios",
    "start:backend": "cd backend && python -m uvicorn main:app --host 0.0.0.0 --port 8000",
    "test:backend": "cd backend && python -m pytest",
    "lint:mobile": "cd mobile && npm run lint"
  },
  "devDependencies": {
    "concurrently": "^8.2.2"
  },
  "keywords": [
    "ai",
    "interior-design",
    "mobile-app",
    "react-native",
    "fastapi",
    "claude",
    "chroma",
    "composio",
    "livekit"
  ],
  "author": "Reabode Team",
  "license": "MIT"
}
```

### backend/requirements.txt

```
fastapi==0.104.1
uvicorn[standard]==0.24.0
python-multipart==0.0.6
pydantic==2.8.2
python-jose[cryptography]==3.3.0
passlib[bcrypt]==1.7.4
python-dotenv==1.0.0
pillow>=10.2.0
requests==2.31.0
google-generativeai==0.3.2
selenium==4.15.2
webdriver-manager==4.0.1
```

### backend/package.json

```
{
  "name": "reabode-backend",
  "version": "1.0.0",
  "description": "FastAPI backend for Reabode",
  "scripts": {
    "dev": "uvicorn main:app --reload --host 0.0.0.0 --port 8000",
    "start": "uvicorn main:app --host 0.0.0.0 --port 8000",
    "install": "pip install -r requirements.txt"
  },
  "keywords": [
    "fastapi",
    "python",
    "backend"
  ],
  "author": "",
  "license": "MIT"
}

```

### frontend/package.json

```
{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint"
  },
  "dependencies": {
    "react": "19.2.0",
    "react-dom": "19.2.0",
    "next": "16.0.0"
  },
  "devDependencies": {
    "typescript": "^5",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "@tailwindcss/postcss": "^4",
    "tailwindcss": "^4",
    "eslint": "^9",
    "eslint-config-next": "16.0.0"
  }
}

```

### mobile/package.json

```
{
  "name": "reabode-mobile",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "build:android": "expo build:android",
    "build:ios": "expo build:ios"
  },
  "dependencies": {
    "@expo/ngrok": "^4.1.3",
    "@react-navigation/bottom-tabs": "^6.5.0",
    "@react-navigation/native": "^6.1.0",
    "@react-navigation/stack": "^6.3.0",
    "babel-preset-expo": "^54.0.6",
    "expo": "^54.0.20",
    "expo-av": "~16.0.7",
    "expo-camera": "~17.0.8",
    "expo-font": "~13.0.3",
    "expo-haptics": "~15.0.7",
    "expo-image-picker": "~17.0.8",
    "expo-linear-gradient": "~15.0.7",
    "expo-status-bar": "~3.0.8",
    "react": "19.1.0",
    "react-native": "0.81.5",
    "react-native-gesture-handler": "~2.28.0",
    "react-native-paper": "^5.11.0",
    "react-native-reanimated": "~4.1.1",
    "react-native-safe-area-context": "~5.6.0",
    "react-native-screens": "~4.16.0",
    "react-native-swipe-cards": "^0.1.0",
    "react-native-vector-icons": "^10.0.0",
    "react-native-worklets": "0.5.1"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@types/react": "~19.1.10",
    "typescript": "^5.1.3"
  },
  "private": true
}

```

### backend/main.py

```python
from fastapi import FastAPI, HTTPException, UploadFile, File
from fastapi.middleware.cors import CORSMiddleware
from pydantic import BaseModel
from typing import List, Optional, Dict, Any
import uvicorn
import base64
import json
import os
from datetime import datetime
import uuid
from dotenv import load_dotenv

# Load environment variables
load_dotenv()

# Import Gemini service
from services.gemini_service import gemini_service
from services.product_service import product_service

# Import recommendation routes
from routes.recommend_products import router as recommend_router

app = FastAPI(title="Reabode AI Interior Designer API", version="1.0.0")

# Include recommendation routes
app.include_router(recommend_router)

# Configure CORS for mobile app
app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],  # Allow all origins for mobile development
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

# Pydantic models for AI Interior Designer
class RoomImage(BaseModel):
    id: str
    uri: str
    base64: Optional[str] = None
    timestamp: int

class RoomDimensions(BaseModel):
    length: float
    width: float
    height: float
    unit: str = "feet"

class MoodPreferences(BaseModel):
    style: List[str] = []
    colors: List[str] = []
    budget: str = "medium"  # low, medium, high
    adjectives: List[str] = []

class RoomAnalysis(BaseModel):
    roomType: str
    currentStyle: str
    colorScheme: List[str]
    furniture: List[str]
    improvements: List[str]
    confidence: float

class ProductRecommendation(BaseModel):
    id: str
    name: str
    brand: str
    price: float
    currency: str = "USD"
    imageUrl: str
    productUrl: str
    category: str
    style: str
    colors: List[str]
    dimensions: Optional[Dict[str, float]] = None
    matchScore: float
    description: str

class DesignProject(BaseModel):
    id: str
    name: str
    roomImages: List[RoomImage]
    dimensions: RoomDimensions
    moodPreferences: MoodPreferences
    analysis: Optional[RoomAnalysis] = None
    recommendations: List[ProductRecommendation] = []
    createdAt: int
    updatedAt: int

class RecommendationRequest(BaseModel):
    analysis: RoomAnalysis
    budget: str
    style: List[str]
    furniture_preferences: Optional[List[str]] = None
    additional_info: Optional[List[str]] = None

# In-memory storage (replace with database in production)
projects_db: Dict[str, DesignProject] = {}

@app.get("/")
async def root():
    return {"message": "Welcome to Reabode AI Interior Designer API"}

@app.get("/health")
async def health_check():
    return {"status": "healthy", "timestamp": datetime.now().isoformat()}

# Room Analysis Endpoint
@app.post("/analyze-room", response_model=RoomAnalysis)
async def analyze_room(
    images: List[RoomImage],
    dimensions: RoomDimensions,
    moodPreferences: MoodPreferences
):
    """
    Analyze room images using Gemini AI to determine room type, style, and recommendations
    """
    try:
        # Use first image for analysis
        if not images or len(images) == 0:
            raise HTTPException(status_code=400, detail="No images provided")
        
        first_image = images[0]
        image_data = first_image.base64 or first_image.uri
        
        # Call Gemini service
        analysis_data = gemini_service.analyze_room_image(image_data)
        
        # Convert to RoomAnalysis model
        analysis = RoomAnalysis(
            roomType=analysis_data.get("roomType", "Unknown"),
            currentStyle=analysis_data.get("currentStyle", "Modern"),
            colorScheme=analysis_data.get("colorScheme", []),
            furniture=analysis_data.get("furniture", []),
            improvements=analysis_data.get("improvements", []),
            confidence=analysis_data.get("confidence", 0.8)
        )
        
        return analysis
        
    except Exception as e:
        print(f"Analysis error: {e}")
        raise HTTPException(status_code=500, detail=f"Analysis failed: {str(e)}")

# Product Recommendations
@app.post("/recommendations", response_model=List[ProductRecommendation])
async def get_recommendations(request: RecommendationRequest):
    """
    Get product recommendations based on room analysis using ProductService
    """
    try:
        # Get matched products using ProductService
        matched_products = product_service.match_products(
            room_type=request.analysis.roomType,
            style_preferences=request.style,
            color_preferences=request.analysis.colorScheme,
            budget=request.budget,
            furniture_preferences=request.furniture_preferences,
            additional_info=request.additional_info,
            limit=10
        )
        
        # Convert to ProductRecommendation models
        recommendations = []
        for product in matched_products:
            recommendation = ProductRecommendation(
                id=product['id'],
                name=product['name'],
                brand=product['brand'],
                price=product['price'],
                currency=product['currency'],
                imageUrl=product['imageUrl'],
                productUrl=product['productUrl'],
                category=product['category'],
                style=', '.join(product.get('style', [])),
                colors=product['colors'],
                dimensions=product.get('dimensions'),
                matchScore=product['matchScore'],
                description=product['description']
            )
            recommendations.append(recommendation)
        
        return recommendations
        
    except Exception as e:
        print(f"Recommendation error: {e}")
        raise HTTPException(status_code=500, detail=f"Recommendations failed: {str(e)}")

# Design Projects CRUD
@app.post("/projects", response_model=DesignProject)
async def create_project(project_data: dict):
    """Create a new design project"""
    project_id = str(uuid.uuid4())
  
[truncated — 2509 more characters]
```

### frontend/src/app/layout.tsx

```typescript
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "Create Next App",
  description: "Generated by create next app",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
      >
        {children}
      </body>
    </html>
  );
}

```

### mobile/src/types/index.ts

```typescript
export interface RoomImage {
  id: string;
  uri: string;
  base64?: string;
  timestamp: number;
}

export interface RoomDimensions {
  length: number;
  width: number;
  height: number;
  unit: 'feet' | 'meters';
}

export interface MoodPreferences {
  style: string[];
  colors: string[];
  budget: 'low' | 'medium' | 'high';
  adjectives: string[];
}

export interface RoomAnalysis {
  roomType: string;
  currentStyle: string;
  colorScheme: string[];
  furniture: string[];
  improvements: string[];
  confidence: number;
}

export interface ProductRecommendation {
  id: string;
  name: string;
  brand: string;
  price: number;
  currency: string;
  imageUrl: string;
  productUrl: string;
  category: string;
  style: string;
  colors: string[];
  dimensions?: {
    length: number;
    width: number;
    height: number;
  };
  matchScore: number;
  description: string;
}

export interface DesignProject {
  id: string;
  name: string;
  roomImages: RoomImage[];
  dimensions: RoomDimensions;
  moodPreferences: MoodPreferences;
  analysis: RoomAnalysis;
  recommendations: ProductRecommendation[];
  createdAt: number;
  updatedAt: number;
}


```

[33 more indexed source files omitted to keep this export small. The full file list is in the Codebase structure section above.]