How suprabhsharma/tavilo-ecommerce works
Tavilo is a multi-vendor marketplace: customers discover products, maintain carts and wishlists, check out once into vendor-specific sub-orders, then track fulfilment and review delivered purchases. Vendors manage stores, products and fulfilment; admins oversee vendors, roles and categories. The React SPA calls a FastAPI API backed by PostgreSQL, with authentication and role checks. The graph combines documented capabilities with relationships visible in sampled files and the source index; unsampled route details are not inferred.
Main entry points: App.jsx React app · apiClient.js API client · models.py PostgreSQL data · routes.py Cart and wishlist
Components 28
Customer and vendor web
- React app
frontend/src/App.jsx - Sign-in pages
frontend/src/pages/Auth.jsx - Browse catalog
frontend/src/pages/ProductListing.jsx - Cart and checkout
frontend/src/pages/Checkout.jsx - Order tracking
frontend/src/pages/Orders.jsx - Vendor portal
frontend/src/pages/VendorPortal.jsx - Admin portal
frontend/src/pages/AdminPortal.jsx - Guest sync
frontend/src/hooks/useGuestSync.js - API client
frontend/src/lib/apiClient.js - Session state
frontend/src/store/authStore.js
Commerce workflows
- Products and categories
backend/src/products/routes.py - Cart and wishlist
backend/src/cart/routes.py - Guest cart merge
backend/src/cart/merge_routes.py - Checkout and fulfilment
backend/src/orders/service.py - Purchase reviews
backend/src/reviews/routes.py - Vendor stores
backend/src/vendors/routes.py - Vendor services
backend/src/services/routes.py
Identity and operations
- Authentication
backend/src/auth/routers.py - Token and role guards
backend/src/auth/dependencies.py - Administration
backend/src/admin/routes.py - Audit log
backend/src/audit.py
Persistence and media
- PostgreSQL data
backend/src/db/models.py - Database sessions
backend/src/db/main.py - Image processing
backend/src/products/image_storage.py - Product image storage
backend/src/products/storage.py
Other components
- Customer
- Vendor
- Admin
Connections 41
- Customer → React app: uses
README.md - Vendor → React app: uses
README.md - Admin → React app: uses
README.md - React app → Sign-in pages: routes to
frontend/src/App.jsx - React app → Browse catalog: routes to
frontend/src/App.jsx - React app → Cart and checkout: routes to
frontend/src/App.jsx - React app → Order tracking: routes to
frontend/src/App.jsx - React app → Vendor portal: routes to
frontend/src/App.jsx - React app → Admin portal: routes to
frontend/src/App.jsx - React app → Guest sync: mounts
frontend/src/App.jsx - Sign-in pages → Session state: updates session
frontend/src/pages/Auth.jsx - React app → Session state: guards routes
frontend/src/App.jsx - Guest sync → Guest cart merge: merges guest data
frontend/src/hooks/useGuestSync.js - Cart and checkout → API client: requests API
- Browse catalog → API client: requests API
- Order tracking → API client: requests API
- Vendor portal → API client: requests API
- API client → Session state: reads session
frontend/src/lib/apiClient.js - API client → Products and categories: calls API
- API client → Cart and wishlist: calls API
- API client → Checkout and fulfilment: calls API
- API client → Vendor stores: calls API
- API client → Administration: calls API
- Authentication → Token and role guards: validates tokens
- Cart and wishlist → Token and role guards: requires identity
backend/src/cart/routes.py - Guest cart merge → Cart and wishlist: updates cart state
- Products and categories → PostgreSQL data: reads catalog
backend/src/products/routes.py - Cart and wishlist → PostgreSQL data: reads and writes
backend/src/cart/routes.py - Checkout and fulfilment → PostgreSQL data: commits orders
backend/src/orders/service.py - Purchase reviews → PostgreSQL data: stores reviews
backend/src/reviews/routes.py - Vendor stores → PostgreSQL data: reads and writes
backend/src/vendors/routes.py - Vendor services → PostgreSQL data: reads service data
backend/src/services/routes.py - Administration → Audit log: records actions
backend/src/admin/routes.py - Administration → PostgreSQL data: manages platform data
backend/src/admin/routes.py - Products and categories → Image processing: handles uploads
backend/src/products/routes.py - Image processing → Product image storage: stores variants
backend/src/products/image_storage.py - Database sessions → PostgreSQL data: opens sessions
backend/src/db/main.py - Products and categories → Database sessions: gets session
backend/src/products/routes.py - Cart and wishlist → Database sessions: gets session
backend/src/cart/routes.py - Checkout and fulfilment → Database sessions: gets session
backend/src/orders/routes.py - Vendor stores → Database sessions: gets session
backend/src/vendors/routes.py