How mudelkun/louvo works
Louvo lets people browse a hairstyle catalogue, choose a cut and hair type, and preview the cut on their own photo. Its web and mobile clients use one API; previews run as background jobs, with results returned for comparison, saving, and sharing. The README documents catalogue imagery, credit balances and purchases, referrals, notifications, and short-lived photo storage. The graph preserves those product branches; sampled excerpts provide direct wiring evidence for mobile preview uploads and worker processing, while some web and auxiliary feature connections follow README documentation.
Main entry points: routes.ts HTTP routes · worker.ts Generation worker · catalog.ts Catalogue API · client.ts Mobile API client
Components 26
Web and mobile
- Mobile screens
app/(tabs)/index.tsx - Mobile API client
src/api/client.ts - Preview uploads
src/api/previews.ts - Web app
web/app/studio/page.tsx - Web API client
web/lib/api.ts - Catalogue browser
web/components/CatalogBrowser.tsx
API and generation
- HTTP routes
server/src/routes.ts - Preview jobs
server/src/tryOn.ts - Job state
server/src/jobs.ts - Generation worker
server/src/worker.ts - Postgres
server/src/db.ts - Transient storage
server/src/storage.ts - Image model adapter
server/src/fal.ts - Push notifications
server/src/push.ts
Catalogue and looks
- Catalogue API
server/src/catalog.ts - Catalogue routes
server/src/routes.ts
Credits and sharing
- Saved looks and shares
server/src/shares.ts - Credits and purchases
server/src/credits.ts - Checkout
server/src/checkout.ts
Other components
- Visitor
- fal.ai
- Private R2 bucket
- Catalogue CDN
- Stripe
- RevenueCat
- Mobile device
Connections 32
- Visitor → Web app: browses and submits
- Visitor → Mobile screens: chooses photo and style
- Web app → Web API client: requests data
- Web API client → HTTP routes: calls API
- Mobile screens → Mobile API client: requests data
- Mobile API client → HTTP routes: calls API
- Mobile API client → Preview uploads: submits preview
- Preview uploads → HTTP routes: creates job
- Preview uploads → Private R2 bucket: uploads photo
- HTTP routes → Preview jobs: dispatches job
- Preview jobs → Job state: creates and reserves
- Preview jobs → Transient storage: signs upload
- Transient storage → Private R2 bucket: presigns and deletes
- Generation worker → Job state: claims and updates
- Generation worker → Catalogue API: loads reference
- Generation worker → Transient storage: reads and writes images
- Generation worker → Image model adapter: requests generation
- Image model adapter → fal.ai: calls model
- Generation worker → Push notifications: requests ready notice
- Push notifications → Mobile device: sends notification
- Catalogue browser → Web API client: loads styles
- HTTP routes → Catalogue routes: serves reads
- Catalogue routes → Catalogue API: loads catalogue
- Catalogue API → Postgres: reads metadata
- Catalogue API → Catalogue CDN: resolves imagery
- HTTP routes → Credits and purchases: serves balances
- HTTP routes → Checkout: starts purchase
- Checkout → Stripe: creates checkout
- Stripe → HTTP routes: webhook
- RevenueCat → HTTP routes: webhook
- HTTP routes → Saved looks and shares: serves saved looks and shares
- Saved looks and shares → Postgres: stores look data