How sujpatel/ai-agent-clothes-frontend works
This is an Expo mobile wardrobe and outfit-assistance app. The principal flow is a user requesting a daily outfit, optionally refining it, and viewing the result; other routes support scanning clothes, managing wardrobe items, and tracking laundry. Shared contexts provide authentication, wardrobe state, and notifications, while API helpers attach credentials to backend requests. The map uses README-level product context and SOURCE INDEX references for unsampled route relationships; some route internals and backend behavior were not provided, so those links are omitted.
Main entry points: wardrobe-context.tsx Wardrobe state · index.tsx Outfit generation · api-fetch.ts Authenticated fetch · scan.tsx Clothing scan
Components 19
App experience
- App shell
app/_layout.tsx - Outfit generation
app/(tabs)/index.tsx - Clothing scan
app/(tabs)/scan.tsx - Style preferences
components/style-profile-modal.tsx - Sign-in
app/login.tsx
Wardrobe management
- Wardrobe browse
app/(tabs)/explore.tsx - Laundry tracking
app/(tabs)/laundry.tsx - Item editing
components/edit-item-modal.tsx - Authenticated photos
components/loadable-photo.tsx - Wardrobe state
context/wardrobe-context.tsx
Shared app services
- Auth state
context/auth-context.tsx - Notifications
context/toast-context.tsx - Photo auth headers
hooks/use-authed-photo-source.ts
API and authentication
- Authenticated fetch
config/api-fetch.ts - Backend address
config/api.ts - Supabase client
config/supabase.ts
Other components
- User
- Clothing backend
- Supabase Auth
Connections 30
- User → Outfit generation: requests outfit
app/(tabs)/index.tsx - Outfit generation → Authenticated fetch: fetches outfit
app/(tabs)/index.tsx - Outfit generation → Style preferences: opens preferences
app/(tabs)/index.tsx - Outfit generation → Photo auth headers: loads item photos
app/(tabs)/index.tsx - Outfit generation → Backend address: uses API address
app/(tabs)/index.tsx - User → Clothing scan: scans clothing
app/(tabs)/scan.tsx - Clothing scan → Wardrobe state: updates wardrobe
app/(tabs)/scan.tsx - Clothing scan → Authenticated fetch: calls backend
app/(tabs)/scan.tsx - Clothing scan → Backend address: uses API address
app/(tabs)/scan.tsx - User → Wardrobe browse: browses items
app/(tabs)/explore.tsx - Wardrobe browse → Wardrobe state: reads wardrobe
app/(tabs)/explore.tsx - Wardrobe browse → Item editing: opens editor
app/(tabs)/explore.tsx - Wardrobe browse → Authenticated photos: renders photos
app/(tabs)/explore.tsx - User → Laundry tracking: tracks laundry
app/(tabs)/laundry.tsx - Laundry tracking → Wardrobe state: updates availability
app/(tabs)/laundry.tsx - Item editing → Wardrobe state: saves changes
components/edit-item-modal.tsx - Wardrobe state → Authenticated fetch: sends item requests
context/wardrobe-context.tsx - Wardrobe state → Backend address: uses API address
context/wardrobe-context.tsx - Wardrobe state → Notifications: reports mutations
context/wardrobe-context.tsx - App shell → Auth state: provides auth
app/_layout.tsx - App shell → Notifications: provides notifications
app/_layout.tsx - App shell → Wardrobe state: provides wardrobe
app/_layout.tsx - Sign-in → Auth state: signs in
app/login.tsx - Auth state → Supabase client: uses client
context/auth-context.tsx - Supabase client → Supabase Auth: authenticates
- Authenticated fetch → Supabase client: gets session
config/api-fetch.ts - Authenticated fetch → Clothing backend: sends requests
config/api-fetch.ts - Backend address → Clothing backend: identifies service
config/api.ts - Authenticated photos → Photo auth headers: builds image source
components/loadable-photo.tsx - Photo auth headers → Auth state: reads session
hooks/use-authed-photo-source.ts