ARCHITECTURE.md · one possible design

Where the photo goes

1
Browseruser device
The user uploads a garment photo.
2
App serveryour backend
Stores the photo in image storage and makes the vision API call. The API key lives here, never in frontend code.
3
Vision model APIoutside service
Receives the photo and returns suggested categories.
4
User review
The user confirms or corrects the suggestion. If the call fails, they choose a category manually.
5
Databaseyour backend
Saves the garment record and its tags.
Web app: Next.jsHosting: VercelDatabase: PostgreSQL via SupabasePhotos: Supabase Storage

Fictional example for illustration. Not a required stack, and not a built app.