How abnermedina123/sigo-autorepuestos works
SIGO Autorepuestos is a customer-facing auto-parts storefront with an admin console. The customer journey runs from browsing the catalog and product details, through cart and checkout, to order confirmation; account, order-history, and favorites features complement it. Admin users manage products, categories, stock, orders, customers, settings, and reports. Supabase supplies authentication, database access, and image storage; WhatsApp is an order/contact channel. The README is empty, so feature coverage is based on the source tree and indexed references; unsampled page internals and their exact calls are not inferred.
Main entry points: DataProvider.tsx Data provider · App.tsx Route application · Checkout.tsx Checkout · ProductCard.tsx Product card
Components 32
Storefront
- Route application
src/App.tsx - Catalog browsing
src/pages/customer/Catalog.tsx - Product details
src/pages/customer/ProductDetail.tsx - Product card
src/components/ui/ProductCard.tsx - Cart state
src/store/useStore.ts - Checkout
src/pages/customer/Checkout.tsx - Order confirmation
src/pages/customer/OrderConfirmation.tsx
Accounts
- Customer dashboard
src/pages/customer/Dashboard.tsx - Customer authentication
src/pages/customer/Auth.tsx - Auth callback
src/pages/customer/AuthCallback.tsx
Admin operations
- Admin overview
src/pages/admin/AdminDashboard.tsx - Product management
src/pages/admin/AdminProducts.tsx - Product editor
src/pages/admin/AdminProductForm.tsx - Inventory
src/pages/admin/AdminInventory.tsx - Order management
src/pages/admin/AdminOrders.tsx - Reports
src/pages/admin/AdminReports.tsx - Category management
src/pages/admin/AdminCategories.tsx - Customer management
src/pages/admin/AdminCustomers.tsx - Admin settings
src/pages/admin/AdminSettings.tsx
Application services
- Data provider
src/store/DataProvider.tsx - Data API
src/lib/api.ts - Auth service
src/lib/auth.ts - Analytics
src/lib/analytics.ts - Favorites
src/lib/favorites.ts - Local orders
src/lib/localOrders.ts - WhatsApp messaging
src/lib/whatsapp.ts - Image handling
src/lib/images.ts
External platform
- Supabase client
src/lib/supabase.ts - Database types
src/lib/database.types.ts - Supabase
- WhatsApp service
Other components
- Shopper
Connections 38
- Shopper → Route application: uses
src/App.tsx - Route application → Data provider: wraps routes
src/App.tsx - Route application → Catalog browsing: routes to
src/App.tsx - Route application → Customer authentication: routes to
src/App.tsx - Route application → Customer dashboard: routes to
src/App.tsx - Route application → Checkout: routes to
src/App.tsx - Catalog browsing → Product card: renders
src/pages/customer/Catalog.tsx - Product details → Product card: renders
src/pages/customer/ProductDetail.tsx - Product card → Cart state: adds items
src/components/ui/ProductCard.tsx - Product card → Favorites: toggles favorites
src/components/ui/ProductCard.tsx - Product card → Image handling: uses fallback
src/components/ui/ProductCard.tsx - Checkout → Cart state: reads cart
src/pages/customer/Checkout.tsx - Checkout → Data API: creates order
src/pages/customer/Checkout.tsx - Checkout → Local orders: uses
src/pages/customer/Checkout.tsx - Checkout → WhatsApp messaging: formats order
src/pages/customer/Checkout.tsx - WhatsApp messaging → WhatsApp service: opens message
- Customer authentication → Auth service: authenticates
src/pages/customer/Auth.tsx - Customer authentication → Data API: uses
src/pages/customer/Auth.tsx - Auth callback → Auth service: checks session
src/pages/customer/AuthCallback.tsx - Auth callback → Data API: loads data
src/pages/customer/AuthCallback.tsx - Customer dashboard → Favorites: reads favorites
src/pages/customer/Dashboard.tsx - Customer dashboard → Local orders: reads orders
src/pages/customer/Dashboard.tsx - Data provider → Data API: fetches and mutates
src/store/DataProvider.tsx - Data provider → Auth service: checks admin
src/store/DataProvider.tsx - Data API → Supabase client: queries through
src/lib/api.ts - Auth service → Supabase client: authenticates through
src/lib/auth.ts - Supabase client → Supabase: connects
- Supabase client → Database types: types client
src/lib/supabase.ts - Admin overview → Data provider: uses data
src/pages/admin/AdminDashboard.tsx - Admin overview → Analytics: uses reports
src/pages/admin/AdminDashboard.tsx - Reports → Analytics: builds reports
src/pages/admin/AdminReports.tsx - Product management → Data provider: manages products
src/pages/admin/AdminProducts.tsx - Product editor → Data provider: saves products
src/pages/admin/AdminProductForm.tsx - Inventory → Data provider: updates stock
src/pages/admin/AdminInventory.tsx - Order management → Data provider: manages orders
src/pages/admin/AdminOrders.tsx - Category management → Data provider: manages categories
- Customer management → Data provider: manages customers
- Admin settings → Data provider: uses data