C
CuratorAI
Documentation Admin
๐Ÿงช API Test Dashboard

Test API Endpoints

Test API endpoints and run automated tests

๐ŸŽฏ What is CuratorAI?

CuratorAI is like having a personal fashion stylist in your pocket! Think of it as a smart assistant that helps you:

  • ๐Ÿ“ธ Organize your wardrobe - Keep track of all your clothes digitally
  • ๐Ÿ‘” Create perfect outfits - Get AI-powered suggestions for what to wear
  • ๐Ÿ›’ Shop smarter - Save items you like to your cart
  • ๐Ÿ“ฑ Share your style - Post outfits and get inspired by others
  • ๐Ÿ“š Build lookbooks - Create collections of your favorite outfits

๐Ÿ—๏ธ How Does It Work? (The Big Picture)

Imagine CuratorAI as a smart filing cabinet with different drawers. Each drawer holds different types of information:

๐Ÿ‘ค Users (The People)

Every person who uses CuratorAI has their own account. Think of it like a personal profile where you store your information, preferences, and style choices.

๐Ÿ‘• Wardrobe (Your Closet)

Each user has a Wardrobe - this is like your digital closet. Inside your wardrobe, you can add individual clothing items (tops, pants, shoes, etc.). Each item remembers details like color, size, brand, when you bought it, and even how many times you've worn it!

๐Ÿ‘” Outfits (Complete Looks)

An Outfit is a combination of clothing items that go well together. For example, "Blue Jeans + White T-Shirt + Sneakers" makes one outfit. Outfits can be created by you or suggested by AI. Each outfit has details like what occasion it's for (casual, formal, work), what season it's best for, and style tags.

๐Ÿ›’ Shopping Cart (Items You Want to Buy)

When you see an outfit you like, you can add individual items from that outfit to your Shopping Cart. It's just like shopping online - you can see prices, sizes, and purchase links. The cart calculates totals, shipping, and can apply discount codes.

๐Ÿ“š Lookbooks (Outfit Collections)

A Lookbook is like a photo album, but for outfits! You can create themed collections (like "Summer Vacation Looks" or "Work Outfits") and add multiple outfits to each lookbook. You can share lookbooks with others or keep them private.

๐Ÿ“ฑ Social Feed (Sharing & Inspiration)

The Social Feed is where users share their outfits, get likes, leave comments, and discover new styles. Think of it like Instagram, but specifically for fashion outfits!

๐Ÿ”— How Everything Connects

Here's how all these pieces fit together:

๐Ÿ‘ค User

The person using the app

  • Has one Wardrobe
  • Can create many Outfits
  • Has one Shopping Cart
  • Can create many Lookbooks
  • Can post to Social Feed
โ†“

๐Ÿ‘• Wardrobe

Your digital closet

  • Belongs to one User
  • Contains many Wardrobe Items
  • Items can be used in Outfits
โ†“

๐Ÿ‘” Outfit

A complete look

  • Created by one User
  • Contains many Outfit Items
  • Can be added to Lookbooks
  • Can be posted to Social Feed
  • Items can be added to Cart
โ†“

๐Ÿ›’ Shopping Cart

Items you want to buy

  • Belongs to one User
  • Contains many Cart Items
  • Cart Items come from Outfit Items
๐Ÿ’ก Key Insight: When you create an outfit, you're essentially saying "these items look good together." Later, if you want to buy any of those items, you can add them to your cart. The system remembers which outfit each cart item came from, so you can always go back and see the full look!

๐ŸŒ API Endpoints (How Apps Talk to the System)

An API endpoint is like a door into the system. When a mobile app or website wants to get information or make changes, it "knocks on the door" (sends a request) and the system responds.

๐Ÿ” Authentication Endpoints

These handle logging in, signing up, and managing your account. Like the front door to your account!

/api/v1/auth/login/ - Log in with email/password
/api/v1/auth/register/ - Create new account
/api/v1/auth/me/ - View/update your profile
/api/v1/auth/oauth/google/ - Sign in with Google account
/api/v1/auth/oauth/facebook/ - Sign in with Facebook account
/api/v1/auth/refresh/ - Refresh your access token
๐Ÿ‘• Wardrobe Endpoints

Manage your digital closet - add items, view them, update details.

/api/v1/wardrobe/items/ - List all your clothes
/api/v1/wardrobe/items/create/ - Add a new item
/api/v1/wardrobe/items/<id>/update/ - Update an item
๐Ÿ‘” Outfit Endpoints

Create, view, and manage your outfits.

/api/v1/outfits/ - List all outfits
/api/v1/outfits/ (POST) - Create new outfit
/api/v1/outfits/<id>/ - View specific outfit
๐Ÿ›’ Cart Endpoints

Manage your shopping cart - add items, update quantities, apply discounts.

/api/v1/cart/<user_id>/ - View your cart
/api/v1/cart/<user_id>/items/ - Add item to cart
/api/v1/cart/<user_id>/promo/ - Apply discount code
๐Ÿ“š Lookbook Endpoints

Create and manage your outfit collections.

/api/v1/lookbooks/ - List all lookbooks
/api/v1/lookbooks/create/ - Create new lookbook
/api/v1/lookbooks/<id>/ - View specific lookbook
๐Ÿ“ฑ Social Endpoints

Share outfits, like posts, comment, and see what others are wearing.

/api/v1/social/posts/ - Create a post
/api/v1/social/feed/ - View your feed
/api/v1/social/posts/<id>/like/ - Like a post
๐Ÿ”” Notification Endpoints

Get notifications for likes, saves, comments, and follows. Notifications are automatically created when someone interacts with your content.

/api/v1/notifications/<user_id>/ - List your notifications
/api/v1/notifications/<user_id>/unread-count/ - Get unread count
/api/v1/notifications/<id>/read/ - Mark as read
/api/v1/notifications/<user_id>/preferences/ - Manage preferences
/api/v1/notifications/<user_id>/diagnostics/ - System diagnostics
/api/v1/notifications/test/create/ - Create test notification (POST)
โš ๏ธ Important:

Notifications are created for all activities, including your own actions (cart updates, wardrobe changes, outfit creation). This helps you track all your activity!

๐Ÿ”„ How Requests Work (Step by Step)

When you use the app, here's what happens behind the scenes:

1. You Tap a Button
Example: "Add to Cart" button in the app
2. App Sends Request
The app sends a message to the server: "Add this item to user 123's cart"
3. Server Checks Permission
The server verifies: "Is this user logged in? Do they have permission?"
4. Server Processes Request
The server finds the user's cart, adds the item, calculates new totals
5. Server Sends Response
The server sends back: "Success! Item added. Your cart now has 3 items, total: $149.99"
6. App Updates Display
Your app shows the updated cart with the new item

๐Ÿ’พ Data Storage (Where Everything Lives)

All the information is stored in a database - think of it as a super-organized filing cabinet that can find information instantly.

Database Tables (Like Filing Drawers)

users

Stores all user accounts - names, emails, passwords (encrypted), preferences

wardrobes

One entry per user - links to their wardrobe items

wardrobe_items

All individual clothing items - each item knows which wardrobe it belongs to

outfits

All created outfits - each knows which user created it

outfit_items

Individual items within outfits - each knows which outfit it belongs to

shopping_carts

One cart per user - stores totals, shipping info, discount codes

cart_items

Items in carts - each knows which cart and which outfit item it came from

lookbooks

All lookbook collections - each knows which user created it

social_posts

All posts shared on the social feed - each knows which user posted it

๐Ÿ”‘ Important Concept: Each table is like a spreadsheet. Rows are individual records (like one outfit), and columns are properties (like title, description, color). The relationships between tables (like "this outfit belongs to this user") are maintained through special ID numbers.

๐Ÿค– AI Features

CuratorAI uses artificial intelligence to make smart recommendations:

๐ŸŽจ Style Recommendations

The AI analyzes your wardrobe, past outfit choices, and style preferences to suggest new outfit combinations you might like. It learns from what you wear and what you save!

๐Ÿ” Visual Search

You can upload a photo of an outfit you like, and the AI will find similar items or outfits in the system. It's like Google Image Search, but for fashion!

๐Ÿ“Š Color & Style Analysis

The AI can analyze images to extract color palettes, identify styles (casual, formal, bohemian, etc.), and suggest complementary pieces.

๐Ÿ” Authentication Methods

CuratorAI supports multiple ways to sign in, making it easy and secure:

๐Ÿ“ง Email & Password Login

The traditional way - create an account with your email and a secure password. Your password is encrypted and never stored in plain text.

๐Ÿ”ต Google Sign-In (OAuth)

Sign in quickly using your Google account! Instead of creating a new password, you can use your existing Google account. The system securely verifies your identity with Google and creates your CuratorAI account automatically. This is called "OAuth" - it's like having Google vouch for who you are.

Endpoint: /api/v1/auth/oauth/google/
What you need: A Google access token (obtained from Google Sign-In)

๐Ÿ“˜ Facebook Login (OAuth)

Sign in using your Facebook account! Similar to Google, you can use your existing Facebook account to quickly access CuratorAI. The system verifies your identity with Facebook and sets up your account automatically.

Endpoint: /api/v1/auth/oauth/facebook/
What you need: A Facebook access token (obtained from Facebook Login SDK)

๐Ÿ’ก Why OAuth? OAuth (Open Authorization) is a secure way to let you use your existing accounts (Google, Facebook) to sign in to other apps. You don't need to remember another password, and the app never sees your Google/Facebook password - it only gets permission to know who you are.

๐Ÿ”’ Security & Privacy

Your data is protected in several ways:

  • Authentication: You must log in to access your data. Your password is encrypted and never stored in plain text.
  • OAuth Security: When using Google/Facebook login, your credentials are verified by those providers - we never see your passwords.
  • Authorization: You can only access your own wardrobe, outfits, and cart. You can't see or modify other users' private data.
  • Privacy Settings: You control what's public (visible to others) and what's private (only you can see).
  • Secure Connections: All data is transmitted over encrypted connections (HTTPS).
  • JWT Tokens: After logging in, you receive secure tokens that prove your identity without sending your password with every request.

๐Ÿ“ˆ Performance & Scalability

The system is designed to handle many users efficiently:

  • Caching: Frequently accessed data is stored in fast memory for quick retrieval.
  • Database Indexing: Like an index in a book, the database has indexes to find information quickly.
  • Optimized Queries: The system retrieves only the data needed, not everything at once.
  • Image Optimization: Images are compressed and stored efficiently to save space and load faster.

๐Ÿงช Testing This System

This test dashboard lets you:

  • Test Endpoints: Try out any API endpoint to see how it works and what data it returns.
  • Run Automated Tests: Verify that all features work correctly by running automated test suites.
  • Debug Issues: See detailed information about requests and responses to troubleshoot problems.

Think of it as a control panel where you can interact with the system and see exactly what's happening behind the scenes!

Test API Endpoints

Select an endpoint from the list below or enter a custom path. Configure your request and see detailed results.

Loading endpoints...
Enter the full API path (e.g., /api/v1/auth/me/)
Enter JSON data for POST, PUT, or PATCH requests.
๐Ÿ’ก Image Uploads: Three options supported:
โ€ข File Upload: Use main_image_file, primary_image_file, cover_image_file, or image_file with multipart/form-data
โ€ข URL: Use main_image_url, primary_image_url, cover_image_url, or image_url with JSON
โ€ข Base64: Use main_image_base64, primary_image_base64, cover_image_base64, or image_base64 with JSON (data URI format: data:image/jpeg;base64,...)
Backend automatically converts files to base64 and saves both URL and base64. Responses include both image (URL) and image_base64 (base64 string).
JWT token for authenticated endpoints. Click "Get Token" to login with admin credentials and auto-generate. Token is automatically extracted from login responses. User ID is auto-extracted from token.
Status: Ready
Total Tests: 17
Last Run: Never
Accounts
  • test_sessions.py
  • test_password_reset_email.py
  • test_follow.py
  • test_authentication.py
Social
  • test_ranking.py
  • test_social_feed.py
  • test_safety.py
  • test_highlights.py
Lookbooks
  • test_lookbooks.py
Wardrobe
  • test_calendar_reminders.py
  • test_wardrobe.py
Outfits
  • test_purge_stock_images.py
  • test_outfits.py
  • test_recommendation_validation.py
Notifications
  • test_delivery.py
  • test_admin_api.py
  • test_emailing.py

Test Results