How axyratio/closetx works
ClosetX is a multi-vendor fashion marketplace mobile app with AI virtual try-on. The buyer journey runs from product discovery through cart, checkout, payment, order tracking, and reviews; seller and admin capabilities form separate operational branches. The map combines the documented product scope with the supplied source excerpts and tree. Several subsystems are represented at directory or router level because their implementation was not sampled, so uncertain internal calls are omitted.
Main entry points: app ClosetX app · main.py FastAPI application · api API clients · database.py PostgreSQL data
Components 26
Mobile app
- ClosetX app
client/app - Browse and search
client/app/(home) - Cart and checkout
client/app/(cart) - Orders and reviews
client/app/(profile) - Seller workspace
client/app/(seller) - Admin workspace
client/app/(admin) - Try-on screen
client/app/(tabs)/vton.tsx - API clients
client/api
Marketplace
- Catalog and marketplace APIs
server/app/routes - Product search
server/app/services/search_service.py - Review management
server/app/routes/review_router.py
Commerce operations
- Cart and order APIs
server/app/routes - Checkout logic
server/app/services/checkout_service.py - Stripe payment events
server/app/api/stripe_webhook.py - Order background tasks
server/app/tasks/order_tasks.py - Stripe
Virtual try-on
- Try-on service
server/app/services/vton_service.py - IDM-VTON service
Backend platform
- FastAPI application
server/app/main.py - Authentication
server/app/routes/auth_router.py - Auth logic
server/app/services/auth_service.py - Realtime connections
server/app/realtime/socket_manager.py - PostgreSQL data
server/app/db/database.py
Other components
- Buyer
- Seller
- Admin
Connections 38
- Buyer → ClosetX app: uses
- Seller → ClosetX app: uses
- Admin → ClosetX app: uses
- ClosetX app → Browse and search: opens
- ClosetX app → Cart and checkout: opens
- ClosetX app → Orders and reviews: opens
- ClosetX app → Seller workspace: opens
- ClosetX app → Admin workspace: opens
- ClosetX app → Try-on screen: opens
- Browse and search → API clients: requests catalog
- Cart and checkout → API clients: requests cart and checkout
- Orders and reviews → API clients: requests orders and reviews
- Seller workspace → API clients: requests seller functions
- Admin workspace → API clients: requests administration
- Try-on screen → API clients: requests try-on
- API clients → FastAPI application: calls API
- FastAPI application → Authentication: mounts
- FastAPI application → Catalog and marketplace APIs: mounts
- FastAPI application → Cart and order APIs: mounts
- FastAPI application → Review management: mounts
- FastAPI application → Auth logic: mounts
- Authentication → Auth logic: calls
- Auth logic → PostgreSQL data: reads and writes
- Catalog and marketplace APIs → Product search: searches products
- Product search → PostgreSQL data: queries catalog
- Review management → PostgreSQL data: reads and writes
- Cart and order APIs → Checkout logic: handles checkout
- Checkout logic → PostgreSQL data: reads and writes
- Checkout logic → Stripe: creates payment
- Stripe → Stripe payment events: sends webhook
- Stripe payment events → PostgreSQL data: updates payment and orders
- Order background tasks → PostgreSQL data: updates order state
- Order background tasks → Stripe: checks payment
- FastAPI application → Try-on service: mounts try-on routes
- Try-on service → IDM-VTON service: submits prepared images
- FastAPI application → Realtime connections: serves WebSockets
- Realtime connections → Buyer: broadcasts updates
- Realtime connections → Seller: broadcasts updates