App System authentication integration and rollout instructions: docs/app-system-auth.md.
FitMatch AI is a production-ready Next.js App Router MVP for AI-powered fashion recommendations. Users can:
- sign in with Microsoft via Supabase Auth
- upload or capture clothing photos
- extract item metadata with OpenAI vision
- save items into a private digital wardrobe
- take a style quiz and store a persistent profile
- generate multi-style outfit suggestions
- save generated outfits for later review
- Next.js 16 App Router + TypeScript
- Tailwind CSS 4
- Supabase Auth, Database, and Storage
- OpenAI API for image analysis and outfit generation
Copy .env.local.example to .env.local and fill in:
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
OPENAI_API_KEY=
OPENAI_TEXT_MODEL=gpt-4o-mini
OPENAI_VISION_MODEL=gpt-4o-mini
OPENAI_IMAGE_MODEL=gpt-image-1- Run the SQL in supabase/schema.sql in your Supabase SQL editor.
- In Supabase Auth, enable the Microsoft provider. Supabase labels this provider as
azure. - Add the callback URL:
https://YOUR_DOMAIN/auth/callback
http://localhost:3000/auth/callback
- Confirm the private storage bucket
fitmatch-wardrobeexists if you manage buckets manually. - Add your Supabase service role key to
SUPABASE_SERVICE_ROLE_KEYso server-side uploads can write to Storage reliably.
npm install
npm run devThen open http://localhost:3000.
The app currently passes:
npm run lint
npm run buildPOST /api/analyze-imagePOST /api/generate-outfitPOST /api/generate-outfit-imageGET/POST /api/user/profileGET/POST /api/wardrobePATCH/DELETE /api/wardrobe/[id]GET/POST /api/outfits
- OpenAI API errors (missing key, quota exceeded) are logged and surfaced transparently so developers and users receive clear actionable feedback.
- Wardrobe and AI lookbook images are securely stored in private Supabase Storage buckets and served via signed URLs.