π Slides: Figma Design
π Project Assets: Google Drive Folder
- About
- Features
- Technology Stack
- Getting Started
- Usage
- API Endpoints
- Project Structure
- Configuration
- Development
- Deployment
- Contributing
- License
An AI-powered fashion styling application that provides personalized clothing recommendations using computer vision and natural language processing. Users can upload photos and receive styling advice focused on tops and bottoms, with integrated product search capabilities.
- AI Fashion Stylist: Conversational interface powered by Gemini 2.5 Flash via OpenRouter
- Auto-Style Mode: β¨ NEW - Automatically generates moodboards from styling advice with gender-aware product searches
- Image Analysis: Upload photos to receive personalized styling recommendations
- Product Search: Integration with Amazon product catalog via RapidAPI
- Moodboard Creation: Visual collections of selected clothing items with virtual try-ons
- Multi-Modal Chat: Support for both text and image inputs in conversations
- Streaming AI Responses: Real-time conversation with markdown formatting
- Image Validation: AI-powered photo quality assessment
- Persistent State: Cross-session data storage using Zustand
- Responsive Design: Mobile and desktop optimized interface
- Next.js 15 with App Router and TypeScript
- React 18 with server and client components
- Tailwind CSS for styling and responsive design
- Zustand for state management with persistence
- React Markdown for formatted AI responses
- Lucide Icons for UI iconography
- Vercel AI SDK for streaming AI interactions
- Amazon Product API via RapidAPI for product data
- Custom API routes for chat, image validation, and moodboard generation
- Server actions for form handling and data processing
- Gemini 2.5 Flash model via OpenRouter for fashion expertise
- Vision capabilities for image analysis and styling recommendations
- Tool calling for product search integration
- Custom system prompts optimized for fashion styling
- Node.js 18.0 or later
- npm or yarn package manager
- RapidAPI account for Amazon product access
- Clone the repository:
git clone <repository-url>
cd open-ai-stylist- Install dependencies:
npm install- Configure environment variables:
Create a
.env.localfile with the following:
OPENROUTER_API_KEY=your_openrouter_api_key_here
FASHN_API_KEY=your_fashn_api_key_here
# Real-Time Amazon Data API Credentials
RAPIDAPI_KEY=your_rapidapi_key_here
RAPIDAPI_HOST=real-time-amazon-data.p.rapidapi.com- Start the development server:
npm run dev- Open http://localhost:3000 in your browser
- Navigate to the onboarding page to upload approved model photos
- Photos are validated using AI for styling suitability
- Approved photos are stored for use in styling conversations
- Start a new chat session
- Upload a photo or describe your styling needs
- Receive personalized recommendations for tops and bottoms
- Browse suggested products with real-time Amazon pricing
- Select items to create moodboards
- Select products during conversations
- Create themed collections with AI-generated titles
- View products in responsive grid layouts
- Access direct purchase links for selected items
The Auto-Style feature automatically creates moodboards from styling conversations:
- Enable Auto-Style: Click the sparkles β¨ button in the chat input area
- Get Styling Advice: Have a normal conversation with the AI stylist
- Automatic Processing: When the AI provides styling advice, Auto-Style:
- Analyzes the advice to detect gender context (men/women/unisex)
- Extracts key clothing items mentioned
- Performs gender-aware product searches
- Generates virtual try-ons with your model photos
- Creates a complete moodboard automatically
- Instant Results: Receive notifications when your auto-generated moodboards are ready
- Gender-Aware Search: Automatically detects and uses appropriate gender-specific search terms
- Smart Product Selection: AI chooses the most relevant items from styling advice
- Creative Moodboard Titles: AI generates compelling, context-appropriate board names
- Virtual Try-Ons: Automatically applies your model photos to products
- Background Processing: Non-blocking operation that doesn't interrupt conversations
- Zero Manual Effort: Complete styling boards created without user intervention
Main chat interface supporting both text and image inputs
- Method: POST
- Input: Message array with text/image content
- Output: Streaming AI responses with tool calls
- Features: Context awareness, product search integration
Image quality validation for styling purposes
- Method: POST
- Input: Base64 encoded image data
- Output: Validation result with feedback
- AI Model: Vision-enabled analysis
Moodboard creation and product categorization
- Method: POST
- Input: Selected products and user preferences
- Output: Categorized collections with metadata
β¨ NEW - Auto-Style background processing endpoint
- Method: POST
- Input: AI styling advice text
- Processing: Gender detection, product search, virtual try-ons
- Output: Complete moodboards with try-on images
- Features: Isolated infrastructure, non-blocking operation
Notification system for completed moodboard processing
- Method: GET/POST
- Function: Polling endpoint for auto-generated moodboard completion
- Integration: Works with both manual and auto-generated moodboards
src/
βββ app/ # Next.js App Router pages
β βββ api/ # API route handlers
β βββ chat/ # Chat interface pages
β βββ gallery/ # Moodboard gallery
β βββ onboarding/ # Photo upload flow
β βββ store/ # Zustand state management
βββ components/ # Reusable React components
β βββ aceternity/ # Third-party UI components
β βββ ui/ # Custom UI components
βββ lib/ # Utility functions and services
OPENROUTER_API_KEY: Authentication key for OpenRouter API (replaces LLAMA_API_KEY)FASHN_API_KEY: Authentication key for Fashion API servicesRAPIDAPI_KEY: Authentication key for Amazon product APIRAPIDAPI_HOST: API host endpoint for product search
The application uses Gemini 2.5 Flash via OpenRouter with custom system prompts optimized for:
- Fashion styling expertise
- Focus on tops and bottoms (excluding accessories)
- Professional styling advice
- Product recommendation workflow
- TypeScript for type safety
- ESLint configuration for code standards
- Component-based architecture
- Error boundary implementation
- Zustand store with persistence
- Modular state slices for different features
- Cross-component state sharing
- Local storage integration
- Tailwind CSS utility classes
- Custom component styling
- Responsive design patterns
- Dark/light theme support
The application is optimized for Vercel deployment:
vercel --prodEnsure all environment variables are configured in your deployment platform:
RAPIDAPI_KEYRAPIDAPI_HOST
MIT License - see LICENSE file for details
We welcome contributions! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow TypeScript best practices
- Ensure code passes ESLint checks
- Add tests for new features
- Update documentation as needed
- Follow the existing code style
Found a bug or have a feature request? Please open an issue with:
- Clear description of the problem/feature
- Steps to reproduce (for bugs)
- Expected behavior
- Screenshots (if applicable)
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ by the StyleList Team
Star β this repository if you find it helpful!
