Drip Advisor is an AI-powered fashion assistant that helps users find the perfect outfit from their wardrobe. This repository contains the backend code for the Drip Advisor application. The backend is built using Flask and deployed on Vercel.
https://drip-advisor-backend.vercel.app/
npm i -g vercel
vercel dev
Your Flask application is now available at http://localhost:3000.
Base URL: https://drip-advisor-backend.vercel.app
Most endpoints require JWT authentication. Include the JWT token in the Authorization header for all authenticated requests:
Authorization: Bearer <your_jwt_token>
- URL:
/users/signup
- Method: POST
- Authentication: Not required
- Body:
{ "email": "user@example.com", "password": "your_password", "name": "Your Name", "gender": "your_gender", "dob": "YYYY-MM-DD" }
- Response: User created message with ID
- URL:
/users/login
- Method: POST
- Authentication: Not required
- Body:
{ "email": "user@example.com", "password": "your_password" }
- Response: JWT access token
- URL:
/users/profile
- Method: GET
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Response: User profile data
- URL:
/users/profile
- Method: PUT
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Body:
{ "name": "Updated Name", "gender": "updated_gender", "dob": "YYYY-MM-DD" }
- Response: Profile updated message
- URL:
/users/profile
- Method: DELETE
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Response: Profile deleted message
- URL:
/users/preferences
- Method: POST
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Body:
{ "preferences": ["preference1", "preference2"] }
- Response: Preferences added message
- URL:
/add_clothing_item
- Method: POST
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Body: Form-data with 'image' file
- Response: Clothing item added message with ID
- URL:
/clothing_items
- Method: GET
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Body:
{ "clothing_item_id": "item_id_here" }
- Response: Clothing item details
- URL:
/outfits/generate
- Method: POST
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Body:
{ "weather_description": "sunny day with high humidity", "temperature": "27", "day_description": "Lunch with friends and meeting with nature club" }
- Response: Array of generated outfits
- URL:
/outfits/build
- Method: POST
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Body:
{ "weather_description": "sunny day with high humidity", "temperature": "27", "day_description": "Lunch with friends and meeting with nature club", "base_items_ids": ["66f049d6f6d2352521cf0221"] }
- Response: Array of generated outfits based on specified items
- URL:
/outfits
- Method: GET
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Response: Array of all user's outfits
- URL:
/outfits/<outfit_id>
- Method: GET
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Response: Specific outfit details
- URL:
/outfits/use/<outfit_id>
- Method: POST
- Authentication: Required
- Header:
Authorization: Bearer <your_jwt_token>
- Header:
- Response: Outfit used message (marks items as unavailable for 48 hours)
- URL:
/generate_tags
- Method: POST
- Authentication: Not required
- Body: Form-data with 'image' file
- Response: Generated description for the clothing item
- URL:
/gemini
- Method: POST
- Authentication: Not required
- Body:
{ "prompt": "Your question or prompt here" }
- Response: Gemini AI-generated response
All endpoints return appropriate error messages and status codes in case of failures. Check the response status code and error message for troubleshooting.