Dressly is a modern web application that uses artificial intelligence to act as your virtual personal stylist. It helps you discover and build outfits that match your unique style, body type, color preferences, and budget.
- 🎯 AI-Powered Style Quiz - Answer 6 quick questions about your style preferences
- 🤖 Personalized Recommendations - Get AI-generated outfit suggestions and styling tips using Google Gemini
- 🛍️ Product Integration - Browse real H&M products matching your style (up to 12 curated items)
- 🔐 User Authentication - Sign up/login with JWT authentication to save preferences
- ❤️ Wishlist - Save your favorite products for later shopping
- 📱 Responsive Design - Works beautifully on desktop, tablet, and mobile
- 🎨 Modern UI - Clean interface built with React 19 + TypeScript + TailwindCSS
- 💾 Data Persistence - All data stored securely in MongoDB
- React 19 + TypeScript
- Vite
- TailwindCSS
- Axios
- FastAPI (Python)
- MongoDB
- Google Gemini AI
- H&M API (RapidAPI)
- Node.js 18+
- Python 3.9+
- MongoDB account
-
Navigate to the backend directory:
cd backend -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
.envfile (use.env.exampleas template):cp .env.example .env
-
Fill in your environment variables:
MONGODB_URI: Your MongoDB connection stringGEMINI_API_KEY: Google Gemini API keyRAPIDAPI_KEY: RapidAPI key for H&M integration
-
Run the server:
uvicorn main:app --reload
The API will be available at
http://127.0.0.1:8000
-
Navigate to the frontend directory:
cd front-end -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The app will be available at
http://localhost:5173
Dressly/
├── backend/
│ ├── api/ # HTTP route handlers
│ │ ├── auth.py # Authentication endpoints
│ │ ├── quiz.py # Quiz & recommendations
│ │ └── wishlist.py # Wishlist management
│ ├── models/ # Data models
│ │ ├── quiz.py # Quiz input models (Pydantic)
│ │ └── database.py # Database models (MongoDB)
│ ├── services/ # Business logic & integrations
│ │ ├── ai_model.py # Google Gemini AI
│ │ ├── database.py # MongoDB connection
│ │ └── hm_client.py # H&M API client
│ ├── utils/ # Utilities
│ │ └── auth.py # JWT & password hashing
│ ├── main.py # FastAPI app entry point
│ └── requirements.txt # Python dependencies
└── front-end/
├── src/
│ ├── components/
│ │ ├── Login.tsx # Login/Signup page
│ │ ├── QuizForm.tsx # 6-step quiz interface
│ │ ├── Results.tsx # AI recommendations & products
│ │ └── Wishlist.tsx # Saved products page
│ ├── lib/
│ │ ├── api.ts # Axios API client
│ │ └── quizSteps.tsx # Quiz configuration
│ └── App.tsx # Main app with routing
└── package.json
Note: Backend routers are mounted with prefixes in backend/main.py:
- Authentication routes are available under
/auth - Quiz routes are available under
/quiz - Wishlist routes are available under
/wishlist
POST /auth/signup- Create a new user accountPOST /auth/login- Authenticate user and get JWT tokenGET /auth/me- Get current user profile (requires auth)
POST /quiz/submit- Submit quiz answers, receive AI recommendations and product suggestions
POST /wishlist- Add product to authenticated user's wishlist (body: product details)GET /wishlist- Get authenticated user's saved productsDELETE /wishlist/{product_code}- Remove item from authenticated user's wishlist
GET /- API health check and version info
.env file to version control. It contains sensitive credentials.