Skip to content

rafa321563/WardrobeAssistant

Repository files navigation

Wardrobe Assistant - AI-Powered Style App

A comprehensive iOS application that helps users manage their wardrobe, create daily outfits, and receive AI-powered style recommendations.

Features

🎽 Wardrobe Management

  • Item Addition: Capture clothing items via camera or import from photo library
  • Smart Categorization: Automatic classification (tops, bottoms, shoes, accessories, etc.)
  • Metadata System:
    • Color recognition
    • Season tags (summer, winter, spring, fall, all-season)
    • Style categories (casual, formal, sportswear, business, evening, streetwear)
    • Material and brand tracking
    • Custom tags
  • Search & Filter: Advanced filtering by multiple attributes (category, color, season, style)
  • Organization: Virtual closet with custom categories and tags

👔 Outfit Creation & Styling

  • Visual Outfit Builder: Create combinations by selecting items from your wardrobe
  • Outfit Library: Save and categorize complete outfits
  • Occasion-based Organization: Organize outfits by occasion (work, casual, date, sports, etc.)
  • Outfit Rating: User feedback system for improvement
  • Seasonal Planning: Weather-appropriate outfit suggestions

🤖 AI-Powered Recommendations

  • AI Clothing Classifier: GPT-4o Vision analyzes garment photos (category, colors, materials, season, style, confidence)
  • AI Outfit Generator: Uses color theory, weather, and trend prompts to create stylish combinations
  • AI Stylist Chat: Conversational assistant that learns user preferences and suggests improvements
  • Daily Outfit Generator: Context-aware daily suggestions (AI-first with local fallback)
  • Smart Matching: Learns user preferences and suggests compatible items
  • Weather Integration: Automatic adjustments based on local weather conditions
  • Occasion-based & manual overrides: Outfits for specific events with user control

📊 Analytics & Insights

  • Usage Analytics: Track most/least worn items
  • Category Distribution: See your wardrobe breakdown by category
  • Style Distribution: Analyze your style preferences
  • Wear Statistics: Track how often you wear each item

📅 Calendar Integration

  • Outfit Planning: Plan outfits for upcoming events
  • Calendar View: Visual calendar to see planned outfits
  • Date-based Organization: Organize outfits by date

Technical Architecture

Models

  • ClothingItem: Core model for clothing items with all metadata
  • Outfit: Model for complete outfit combinations
  • WeatherData: Weather information for recommendations

ViewModels & Services

  • WardrobeViewModel: Manages wardrobe items, filtering, and search
  • OutfitViewModel: Handles outfit creation and management
  • RecommendationViewModel: AI-powered recommendation engine (AI + fallback)
  • OpenAIService: Shared OpenAI client with rate limiting & error handling
  • AIClothingClassifier: GPT-4o Vision client for clothing analysis
  • AIOutfitGenerator: GPT-based outfit planning
  • AIStyleAssistant: ObservableObject for chat experience
  • WeeklyOutfitGenerator: Builds weekly plans using AI suggestions

Views

  • HomeView: Dashboard with daily recommendations and quick stats
  • WardrobeView: Main wardrobe browsing interface
  • OutfitBuilderView: Visual outfit creation tool
  • RecommendationsView: AI style recommendations
  • AnalyticsView: Usage statistics and insights
  • CalendarView: Outfit planning calendar

Setup Instructions

Prerequisites

  • Xcode 15.0 or later
  • iOS 17.0 or later
  • Swift 5.9 or later

Required Keys & Permissions

OpenAI API Key

Add your OpenAI API key (GPT-4o mini with vision support) either as:

  • Environment variable: OPENAI_API_KEY=sk-...
  • Info.plist entry: OPENAI_API_KEY

Without the key the AI features gracefully fall back to local heuristics, but vision/classifier/chat will not work.

The app requires camera and photo library access. Add these keys to your Info.plist or build settings:

For Info.plist:

<key>NSCameraUsageDescription</key>
<string>We need access to your camera to take photos of your clothing items.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We need access to your photo library to import images of your clothing items.</string>

For Build Settings (if using GENERATE_INFOPLIST_FILE): Add these to your build settings:

  • INFOPLIST_KEY_NSCameraUsageDescription = "We need access to your camera to take photos of your clothing items."
  • INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "We need access to your photo library to import images of your clothing items."

Installation

  1. Clone or download the project
  2. Open WardrobeAssistant.xcodeproj in Xcode
  3. Configure the OpenAI API key (environment variable or Info.plist)
  4. Add the privacy permissions as described above
  5. Build and run on a simulator or device

Data Persistence

Currently, the app uses UserDefaults for data persistence. For production use, consider migrating to:

  • Core Data
  • CloudKit (for iCloud sync)
  • A backend database (PostgreSQL, MongoDB, etc.)

Future Enhancements

  • CloudKit integration for iCloud sync
  • Real weather API integration (OpenWeatherMap, WeatherKit)
  • Machine learning for better recommendations
  • Social features (share outfits, community feedback)
  • Shopping integration (identify wardrobe gaps, suggest purchases)
  • Maintenance reminders (cleaning and care notifications)
  • Advanced analytics with charts and graphs
  • Export/import functionality
  • Multiple wardrobe support
  • Outfit templates and style guides

Design Principles

The app follows Apple's Human Interface Guidelines:

  • 44pt x 44pt minimum touch targets
  • 11pt minimum text size for legibility
  • High contrast for accessibility
  • Proper spacing to prevent text overlap
  • High-resolution image support (@2x, @3x)

Architecture

  • MVVM Pattern: Separation of concerns with ViewModels
  • SwiftUI: Modern declarative UI framework
  • Combine: Reactive programming for data flow
  • Codable: Easy data serialization

License

This project is created for educational and personal use.

Credits

Built with SwiftUI and following Apple Design Guidelines.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages