Switch It Up is a fashion virtual-wardrobe and stylist marketplace prototype.
The app idea:
- users sign in and set size, height, waist, shoe size, and fit preferences
- users upload photos of clothes into a virtual wardrobe
- the app creates a virtual body/lookalike styling canvas
- a production version can use a guided 360 body video to improve avatar sizing
- normal users can ask stylists to remix existing clothes or suggest replacements
- stylists can build credibility through posts, likes, comments, followers, and helped clients
- malls/shops can list clothes, and stylists can send wishlist outfits to users
- competitions let multiple stylists submit outfits for a paid prize
- Production-style responsive frontend shell
- Apple-inspired glass app layout with sidebar, setup progress, virtual styling canvas, and compact controls
- Interactive wardrobe filters, selected fit state, 360 scan completion state, and stylist request state
- Normal/stylist account toggle
- Wardrobe photo-card simulation
- Virtual-you outfit preview
- Style request workflow
- SwitchAI v1 local stylist brain with outfit scoring, explanations, mall suggestions, stylist matching, and feedback learning
- SwitchAI training registry and scripts for real fashion datasets
- Local JSON backend API with persistent profile, wardrobe, scan, role, style request, wishlist, stylist upgrade, social, messaging, mall registration, and competition state
- Real wardrobe, mall, stylist, and social feed images stored in
assets/photos/ - Stylist marketplace cards
- Mall wishlist panel
- Social proof feed
- Styling competition card
- Python style-matching engine with tests
- CSV sample style report
- GitHub Pages demo
Full app with backend:
python3 server.pyOpen:
http://127.0.0.1:5180
Static frontend only:
python3 -m http.server 5180Open:
http://127.0.0.1:5180
python3 -m unittest discover -s tests -vDataset registry:
python3 tools/dataset_inventory.py --approved-onlyDownload approved dataset shards:
python3 tools/download_training_datasets.py --dataset fashion_mnist --max-shards 1 --executeBuild the broader approved local corpus with capped downloads:
python3 tools/download_training_datasets.py --max-shards 20 --max-shard-bytes 200000000 --max-total-bytes 700000000 --execute --write reports/training/multi_dataset/download_execute.json
python3 tools/report_training_corpus.py --write reports/training/multi_dataset/corpus_report.jsonTrain the first vision classifier with managed dependencies:
uv run tools/train_switch_ai_vision.py --dataset zalando-datasets/fashion_mnist --config fashion_mnist --max-train-samples 2000 --max-eval-samples 500 --epochs 1Train a dependency-free real-data baseline and save metrics/graphs:
python3 tools/train_fashion_mnist_baseline.pyContinue training with a stronger NumPy softmax classifier:
/Users/user/.cache/codex-runtimes/codex-primary-runtime/dependencies/python/bin/python3 tools/train_fashion_mnist_softmax.pySee docs/training.md.
GET /api/healthGET /api/statePOST /api/profile/rolePOST /api/profile/measurementsPOST /api/stylist/upgradePOST /api/wardrobePOST /api/outfit/selectPOST /api/scanPOST /api/style-requestsPOST /api/ai/stylePOST /api/ai/feedbackPOST /api/wishlistPOST /api/social/postsPOST /api/social/reactPOST /api/messagesPOST /api/mall/registerPOST /api/competitionsPOST /api/competitions/entriesPOST /api/stylists/followPOST /api/reset
Live app:
https://switchitup.vercel.app
Deployment files:
vercel.jsonroutes/api/*to the Python serverless entrypoint inapi/index.pyapi/index.pyreuses the local backend handlerapp.jsreads the optional<meta name="switchitup-api-base">value and automatically points GitHub Pages tohttps://switchitup.vercel.appserver.pyuses local JSON by default and switches to Supabase persistence whenSUPABASE_URLandSUPABASE_SERVICE_ROLE_KEYare configured- Each browser gets a persistent
session_*id in local storage; the API uses that header to isolate the user state row locally and in Supabase
Supabase setup:
- Create the table with
supabase/schema.sql. - Set Vercel environment variables:
SUPABASE_URLSUPABASE_SERVICE_ROLE_KEYfor a production private backend key; this MVP can also run with the Supabase publishable/anon key plus the single-row RLS policies insupabase/schema.sql- optional
SWITCHITUP_SUPABASE_TABLE, defaultswitchitup_state - optional
SWITCHITUP_STATE_ID, defaultproduction, used when no validX-SwitchItUp-Sessionheader is present
- Redeploy Vercel.
Until Supabase is configured, Vercel uses /tmp JSON state as a live MVP fallback.
- Atomic JSON writes with schema migration for newly added state keys
- Supabase/Postgres JSONB state adapter for hosted, per-browser session persistence
- Session-scoped SwitchAI memory for recommendations, feedback, color/category/material preferences, and formality bias
- Request body size limit for upload-heavy JSON requests
- Security headers for local API responses
- Configurable data path, host, port, and CORS origin through environment variables
- Upload validation for PNG, JPEG, and WebP data URLs, including size and file signature checks; local mode writes files, hosted Supabase mode persists validated data URLs in the session state
- Input validation for measurements, stylist plans, mall emails, competition prizes, and social actions
- Unit coverage for SwitchAI recommendations, feedback learning, wardrobe uploads, style requests, wishlist actions, social posts, messages, mall registration, competitions, follows, and measurement updates
Image sources are documented in docs/image-credits.md.
PYTHONPATH=. python3 tools/export_sample_report.pyThe current app is a functional full-stack MVP with a local JSON backend. A real public production version would replace the JSON store with a managed database, add consent-based body image capture, secure photo storage, product catalog integrations, payments, identity verification for stylists and malls, moderation, privacy controls, and clear AI safety rules.