An AI personal styling assistant. StyleBot holds a real conversation about what you want to wear, learns your taste through a visual style quiz and ongoing feedback, and recommends real, purchasable products pulled live from Google Shopping — while keeping track of your wardrobe, building outfits, and getting smarter about your preferences over time.
Built on a multi-step agentic loop (FastAPI + Claude) with a Next.js/React frontend.
- Conversational styling agent — a multi-step loop where Claude autonomously decides which of ~12 tools to call to answer a request (search products, read/update your profile, manage your wardrobe, build and critique outfits, analyze wardrobe gaps).
- Real product search — live, purchasable items via Google Shopping (SerpAPI), filtered by your budget and re-ranked against your profile and existing wardrobe.
- Taste modeling — a visual onboarding quiz scores you across four numeric style dimensions (energy, cultural reference, silhouette, color) to produce a coordinate-based style vector rather than a single category.
- Evolving preferences — the agent reflects on each conversation turn to extract implicit preferences, and a feedback-driven refinement system blends your original quiz vector with signals from what you like and dislike, so recommendations improve over time.
- Wardrobe & outfits — save items, assemble outfits, and get AI feedback on color harmony, occasion fit, and style coherence.
- Persistent memory — server-side conversation history with automatic summarization to stay within context limits.
main.py— app entry; wires routers, serves the built frontend, runsinit_db()on startupdatabase.py— SQLite schema and connection managementauth.py— JWT (HS256) auth + bcrypt password hashingagent/— the agentic coreloop.py— agentic loop (load history → call Claude → run tools → iterate); sync + SSE streamingtools.py/tool_handlers.py— tool schemas and their Python implementationssystem_prompt.py— dynamic system prompt built from the user's profile + wardrobe
routers/—auth,chat,wardrobe,profile,quiz,outfits,imageservices/— domain logicquiz_v2.py— stage-based visual quiz with vector scoringstyle_translator.py— turns a style vector into concrete brand/keyword/fit search guidancevector_refinement.py— feedback-driven style-vector refinementproduct_ranker.py— post-search re-ranking against profile, wardrobe, and feedbackshopping.py— Google Shopping search (SerpAPI) with per-user rate limitingvision_service.py— Google Cloud Vision image validation + Unsplash fallbackoutfit_service.py,profile_service.py,image_storage.py
Static-exported and served by the FastAPI app. Pages for landing, login, onboarding, chat, wardrobe, outfits, and profile, with streaming chat responses and product/quiz card rendering.
# 1. Backend deps
pip install -r requirements.txt
# 2. Configure environment
cp .env.example .env # fill in your keys (see below)
# 3. Build the frontend (output is served by the backend)
cd frontend && npm install && npm run build && cd ..
# 4. Run
uvicorn main:app --reload # → http://localhost:8000| Key | Required | Purpose |
|---|---|---|
ANTHROPIC_API_KEY |
yes | Claude API |
SERPAPI_KEY |
yes | Google Shopping product search |
SECRET_KEY |
yes | JWT signing (use a random 32+ char string) |
GOOGLE_VISION_API_KEY |
optional | Image validation for quiz/wardrobe images |
UNSPLASH_ACCESS_KEY |
optional | Fallback image search |
KIE_API_KEY |
optional | Image generation |
FastAPI · SQLite · Claude (Anthropic API) · SerpAPI · Google Cloud Vision · Next.js · React · TypeScript · Tailwind CSS · JWT/bcrypt auth
pytestThe codebase follows test-driven development — features and fixes are covered by tests in
tests/.