How iamdineshreddy/localcart-connect works
Local-Kart is a role-based marketplace for buyers, sellers, administrators, and delivery partners. Users enter through authenticated routes, then browse products, manage a cart, and place or track orders; sellers manage listings and submit KYC, while administrators review products, KYC, fraud reports, and analytics. React Query hooks implement the sampled marketplace operations against Supabase. The graph includes documented routes and source-indexed feature areas; unsampled feature implementations are represented by their exact page paths, without inferring their internal calls.
Main entry points: client.ts Supabase client · App.tsx Role-based routes · seller Seller listings and earnings · buyer Browse and product pages
Components 25
Access and routing
- Role-based routes
src/App.tsx - Authentication
src/contexts/AuthContext.tsx
Buyer marketplace
- Browse and product pages
src/pages/buyer - Cart and checkout
src/pages/buyer/CartPage.tsx - Buyer order history
src/pages/buyer/OrdersPage.tsx - Wishlist
src/pages/buyer/WishlistPage.tsx - Buyer navigation
src/components/layout/BuyerLayout.tsx - Cart operations
src/hooks/useCart.ts
Seller operations
- Seller listings and earnings
src/pages/seller - Seller order management
src/pages/seller/SellerOrdersPage.tsx - Seller KYC submission
src/pages/seller/KYCPage.tsx - KYC workflows
src/hooks/useKYC.ts - Seller navigation
src/components/layout/SellerLayout.tsx
Administration and delivery
- Admin oversight
src/pages/admin - Fraud reports
src/hooks/useFraudReports.ts - Delivery dashboard
src/pages/delivery/DeliveryDashboard.tsx
Shared data services
- Product catalog
src/hooks/useProducts.ts - Order operations
src/hooks/useOrders.ts - Supabase client
src/integrations/supabase/client.ts - Supabase backend
- Product seed data
src/data/products.ts - Seller trust scoring
src/hooks/useTrustScore.ts - User location
src/hooks/useUserLocation.ts - Notifications
src/hooks/useNotifications.ts
Other components
- Marketplace users
Connections 35
- Marketplace users → Role-based routes: navigate
src/App.tsx - Role-based routes → Authentication: provides session
src/App.tsx - Role-based routes → Browse and product pages: routes to
src/App.tsx - Role-based routes → Seller listings and earnings: routes to
src/App.tsx - Role-based routes → Admin oversight: routes to
src/App.tsx - Role-based routes → Delivery dashboard: routes to
src/App.tsx - Authentication → Supabase client: auth calls
src/contexts/AuthContext.tsx - Supabase client → Supabase backend: queries
- Browse and product pages → Buyer navigation: uses layout
src/pages/buyer/CartPage.tsx - Cart and checkout → Cart operations: reads cart
src/pages/buyer/CartPage.tsx - Cart and checkout → Order operations: places orders
src/pages/buyer/CartPage.tsx - Browse and product pages → Product catalog: loads products
src/pages/buyer/ProductDetailPage.tsx - Browse and product pages → Cart operations: adds items
src/pages/buyer/ProductDetailPage.tsx - Browse and product pages → Wishlist: manages wishlist
- Buyer navigation → Cart operations: shows cart
src/components/layout/BuyerLayout.tsx - Buyer navigation → Notifications: loads alerts
src/components/layout/BuyerLayout.tsx - Buyer order history → Order operations: loads history
- Seller listings and earnings → Product catalog: manages listings
src/pages/seller/SellerDashboard.tsx - Seller listings and earnings → Seller navigation: uses layout
src/pages/seller/SellerDashboard.tsx - Seller listings and earnings → Order operations: loads orders
src/pages/seller/SellerDashboard.tsx - Seller listings and earnings → Seller trust scoring: loads score
src/pages/seller/SellerDashboard.tsx - Seller listings and earnings → KYC workflows: checks KYC
src/pages/seller/SellerDashboard.tsx - Seller KYC submission → KYC workflows: submits documents
src/pages/seller/KYCPage.tsx - Seller order management → Order operations: manages orders
- Admin oversight → Product catalog: reviews listings
src/pages/admin/AdminProductsPage.tsx - Admin oversight → Fraud reports: reviews reports
src/pages/admin/AdminFraudPage.tsx - Admin oversight → KYC workflows: reviews KYC
- Delivery dashboard → Order operations: loads assignments
src/pages/delivery/DeliveryDashboard.tsx - Cart operations → Supabase client: reads and writes
src/hooks/useCart.ts - Order operations → Supabase client: reads and writes
src/hooks/useOrders.ts - Product catalog → Supabase client: reads and writes
src/hooks/useProducts.ts - KYC workflows → Supabase client: reads and writes
src/hooks/useKYC.ts - Product seed data → Browse and product pages: supplies catalog
- Seller trust scoring → Supabase client: loads trust data
- User location → Cart and checkout: supports delivery
src/pages/buyer/CartPage.tsx