Skip to content

playbookTV/modomo--Interior-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ReRoom - AI-Powered Interior Design App

"Snap. Style. Save." - Transform any room photo into a professional makeover in under 15 seconds, with every suggested item instantly shoppable at the best prices.

πŸ—οΈ Architecture Overview

ReRoom is built as a modern microservices application with:

  • Mobile App: React Native with Expo (iOS/Android)
  • Backend: Node.js microservices + Python AI service
  • AI Pipeline: Stable Diffusion XL + SAM2 + Depth-Anything-V2
  • Database: PostgreSQL + Redis + Qdrant (vector DB)
  • Infrastructure: Docker + Kubernetes

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and pnpm 9+
  • Python 3.11+ with pip
  • Docker and Docker Compose V2
  • Expo CLI: pnpm install -g @expo/cli
  • iOS: Xcode 14+ (macOS only)
  • Android: Android Studio + SDK

Install Docker

macOS:

# Install Docker Desktop
brew install --cask docker
# Or download from: https://docker.com/products/docker-desktop

Windows:

# Install Docker Desktop
winget install Docker.DockerDesktop
# Or download from: https://docker.com/products/docker-desktop

Linux (Ubuntu/Debian):

# Install Docker Engine
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

# Add your user to docker group
sudo usermod -aG docker $USER

# Install Docker Compose
sudo apt-get update
sudo apt-get install docker-compose-plugin

1. Clone and Setup

# Clone the repository
git clone <repository-url>
cd modomo

# Install dependencies
pnpm run setup

# Copy environment variables
cp .env.example .env
# Edit .env with your configuration

2. Start Development Environment

# Start all services (backend + databases)
pnpm run docker:up

# Start mobile app (in separate terminal)
pnpm run dev:mobile

# View logs
pnpm run docker:logs

3. Access Services

πŸ“± Mobile Development

# Start Expo development server
cd mobile
pnpm start

# Run on iOS Simulator
pnpm run ios

# Run on Android Emulator  
pnpm run android

# Run tests
pnpm test

# Build for production
pnpm run build

πŸ”§ Backend Development

# Start all backend services
pnpm run dev:backend

# Start individual services
pnpm run dev:auth      # Authentication service
pnpm run dev:photo     # Photo upload service
pnpm run dev:ai        # AI processing service

# Run migrations
pnpm run db:migrate

# Seed database
pnpm run db:seed

# Run tests
pnpm run test:backend

πŸ€– AI Service Development

# Navigate to AI service
cd backend/ai-service

# Install Python dependencies
pip install -r requirements.txt

# Start development server
uvicorn main:app --reload --port 8000

# Run AI processing tests
python -m pytest tests/

πŸ“Š Project Structure

modomo/
β”œβ”€β”€ mobile/                    # React Native app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ screens/          # Screen components
β”‚   β”‚   β”œβ”€β”€ services/         # API & business logic
β”‚   β”‚   β”œβ”€β”€ stores/           # Zustand state management
β”‚   β”‚   └── utils/            # Helper functions
β”‚   β”œβ”€β”€ app.json              # Expo configuration
β”‚   └── package.json
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ api-gateway/          # Request routing & rate limiting
β”‚   β”œβ”€β”€ auth-service/         # User authentication & management
β”‚   β”œβ”€β”€ photo-service/        # Image upload & optimization
β”‚   β”œβ”€β”€ ai-service/           # AI processing pipeline
β”‚   β”œβ”€β”€ product-service/      # Multi-retailer integration
β”‚   β”œβ”€β”€ analytics-service/    # Metrics & business intelligence
β”‚   └── database/             # Schemas & migrations
β”œβ”€β”€ shared/                   # Common types & utilities
β”œβ”€β”€ infrastructure/           # Kubernetes & deployment configs
β”œβ”€β”€ docs/                     # Technical documentation
└── scripts/                  # Development & deployment scripts

πŸ§ͺ Testing

# Run all tests
pnpm test

# Mobile tests
pnpm run test:mobile

# Backend tests  
pnpm run test:backend

# E2E tests
pnpm run test:e2e

# Test coverage
pnpm run test:coverage

πŸ” Code Quality

# Lint all code
pnpm run lint

# Format code
pnpm run format

# Type checking
pnpm run type-check

# Pre-commit hooks (automatic)
git commit -m "your message"

πŸ“¦ Build & Deployment

# Build all services
pnpm run build

# Build mobile app
pnpm run build:mobile

# Build Docker images
pnpm run build:backend

# Deploy to staging
pnpm run deploy:staging

# Deploy to production
pnpm run deploy:production

πŸ”§ Development Tools

Database Management

# Connect to PostgreSQL
psql postgresql://reroom:reroom_dev_pass@localhost:5432/reroom_dev

# Redis CLI
redis-cli -h localhost -p 6379

# View Qdrant collections
curl http://localhost:6333/collections

API Testing

# Health checks
curl http://localhost:3000/health
curl http://localhost:3001/health  # Auth service
curl http://localhost:3002/health  # Photo service
curl http://localhost:8000/health  # AI service

# Test authentication
curl -X POST http://localhost:3000/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "test@example.com", "password": "password"}'

πŸ› Troubleshooting

Common Issues

Docker services won't start:

# Clean up containers and volumes
docker compose down -v
docker system prune -f
pnpm run docker:up

"docker-compose: command not found":

# Install Docker Desktop (includes Compose V2)
# macOS: brew install --cask docker
# Windows: winget install Docker.DockerDesktop

# Or use 'docker compose' instead of 'docker-compose'
docker compose up -d

ESLint peer dependency warnings:

# Clean install to resolve peer dependencies
pnpm run clean
pnpm install

Mobile app won't connect to backend:

  • Check your IP address in .env (EXPO_PUBLIC_API_BASE_URL)
  • Ensure firewall allows connections on port 3000
  • Try pnpm run dev:mobile -- --tunnel

Database connection errors:

# Reset database
docker compose down
docker volume rm modomo_postgres_data
pnpm run docker:up
pnpm run db:migrate

AI service memory errors:

  • Ensure Docker has at least 8GB RAM allocated
  • Close other applications to free up memory
  • Use lighter AI models for development

Debugging

Mobile App:

  • Use Flipper for advanced debugging
  • Enable remote debugging in Chrome DevTools
  • Check Expo logs: npx expo logs

Backend Services:

# View specific service logs
docker compose logs -f auth-service
docker compose logs -f ai-service

# Debug Node.js services
node --inspect=0.0.0.0:9229 src/index.js

πŸ“š Documentation

πŸ” Security

  • All API endpoints require authentication (except health checks)
  • User photos are encrypted in transit and at rest
  • Automatic dependency vulnerability scanning
  • Rate limiting on all public endpoints
  • Input validation and sanitization

πŸ“ˆ Monitoring & Analytics

  • Health Checks: All services expose /health endpoints
  • Metrics: Prometheus metrics at /metrics
  • Logging: Structured JSON logs with correlation IDs
  • Error Tracking: Sentry integration for production
  • Analytics: Firebase Analytics for user behavior

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run quality checks: pnpm run lint && pnpm test
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

πŸ“„ License

This project is proprietary software. All rights reserved.

πŸ†˜ Support

  • Documentation: Check the docs/ directory
  • Issues: Create a GitHub issue
  • Emergency: Contact the development team

ReRoom - Transforming interior design with AI-powered price discovery 🏠✨

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors