How esca6585dev/modahouse works
ModaHouse is a fashion-discovery and social-commerce product: users explore and publish image/video ideas, save them to boards, find items by text or image, and interact with creators and businesses; purchases proceed through cart, checkout, and order tracking. The web client uses a typed same-origin API client and proxy to the Go REST backend, which owns domain routes and persists data. README capabilities also include reels, stories, AI assistance, business listings, reviews, and administration. Mobile is documented as Flutter, but the supplied tree exposes only its Android shell, so its runtime flow is not mapped.
Main entry points: api.ts Typed API client · router.go REST routes · main.go HTTP server · PhotoSearchButton.tsx Photo search
Components 28
Web experience
- Web application
frontend/app/layout.tsx - Typed API client
frontend/lib/api.ts - Session state
frontend/lib/auth.tsx - API proxy
frontend/app/api/[...path]/route.ts
Discovery and social
- Feed and reels
frontend/app/page.tsx - Create content
frontend/app/create/page.tsx - Pin details
frontend/app/pin/[id]/page.tsx - Boards
frontend/app/board/[id]/page.tsx - Text search
frontend/components/SearchBar.tsx - Photo search
frontend/components/PhotoSearchButton.tsx - Visual results
frontend/app/visual/page.tsx - Profiles and stories
frontend/app/u/[username]/page.tsx - Reels
frontend/app/reels/page.tsx
Business and commerce
- Cart and checkout
frontend/app/checkout/page.tsx - Orders
frontend/app/orders/page.tsx - Business listings
frontend/app/business/page.tsx - Admin panel
frontend/app/admin/page.tsx
API and services
- HTTP server
backend/cmd/server/main.go - REST routes
backend/internal/api/router.go - Domain handlers
backend/internal/api - AI assistant
backend/internal/ai/ai.go - Visual search
backend/internal/visual/visual.go
Persistence and media
- Domain models
backend/internal/models/models.go - Relational database
backend/internal/database/database.go - Upload storage
backend/internal/storage/storage.go
Other components
- Visitor
- Database service
- AI provider
Connections 30
- Visitor → Web application: uses
- Web application → Feed and reels: renders
- Feed and reels → Typed API client: requests feed
- Create content → Typed API client: submits content
- Pin details → Typed API client: loads pin
- Boards → Typed API client: loads boards
- Text search → Photo search: offers
frontend/components/SearchBar.tsx - Photo search → Visual results: opens
frontend/components/PhotoSearchButton.tsx - Photo search → Typed API client: stores photo
- Visual results → Typed API client: requests matches
- Profiles and stories → Typed API client: loads profile
- Reels → Typed API client: loads videos
- Session state → Typed API client: calls auth
frontend/lib/auth.tsx - Cart and checkout → Typed API client: submits checkout
- Orders → Typed API client: loads orders
- Business listings → Typed API client: uses business API
- Admin panel → Typed API client: uses admin API
- Typed API client → API proxy: fetches
frontend/lib/api.ts - API proxy → REST routes: proxies requests
frontend/app/api/[...path]/route.ts - HTTP server → REST routes: starts
backend/cmd/server/main.go - REST routes → Domain handlers: routes to
backend/internal/api/router.go - REST routes → Upload storage: serves files
backend/internal/api/router.go - REST routes → AI assistant: configures AI
backend/internal/api/router.go - Domain handlers → Visual search: dispatches search
- Domain handlers → Domain models: uses domain data
- HTTP server → Relational database: opens
backend/cmd/server/main.go - Relational database → Domain models: migrates schema
backend/internal/database/database.go - Relational database → Database service: connects
- HTTP server → Upload storage: initializes
backend/cmd/server/main.go - AI assistant → AI provider: requests assistance