How zebangeth/ai-closet works
Main Components
A. Client-Side (Mobile App)
• UI Layer
• Screens (6 main screens identified in /src/screens)
• Components (organized by feature: clothing, outfit, virtualTryOn, common)
• State Management Layer
• Context Providers (ClothingContext, OutfitContext, VirtualTryOnContext)
• Data Layer
• AsyncStorage
• File System Storage
• Services Layer
• Background Removal Service
• Clothing Categorization Service
• Virtual Try-On Service
B. External AI Services
• Background Removal API (Birefnet)
• GPT-4 API (for categorization)
• Kolors by Kwai API (for virtual try-on)
┌─────────────────────────────────────────────┐
• UI Layer │
• ┌─────────┐ ┌─────────┐ ┌────────────┐ │
• Screens │ │ Views │ │ Components │ │
• ┘ └─────────┘ └────────────┘ │
• ┤
• State Management Layer │
• ┌─────────────────────────────────────────┐│
• React Context Providers ││
• ┘│
• ┤
• Services Layer │
• ┌─────────┐ ┌─────────┐ ┌────────────┐ │
• BG │ │Category │ │ Virtual │ │
• Removal │ │ API │ │ Try-On │ │
• ┘ └─────────┘ └────────────┘ │
• ┤
• Data Layer │
• ┌─────────────┐ ┌──────────────────┐ │
• AsyncStorage │ │ File System │ │
• ┘ └──────────────────┘ │
• ┘
Important Relationships
• Data flow between screens and context providers
• Service integration with external APIs
• Storage mechanisms for different types of data
• Future cloud integration points
• AWS API Gateway
• Lambda Functions
• DynamoDB
• S3 Storage
Additional Details
• Annotations for key features like drag-and-drop in outfit canvas
• Cost-related information for AI services
• Rate limiting points for future implementation
• Where user credits will be checked in the future architecture