How analiarojas2929/elpinon works
Abarrotes is a grocery-commerce and store-management application: shoppers browse products, manage a cart, authenticate, and place or track orders; administrators manage catalog, inventory, orders, users, sales, and reporting. The frontend is a routed React application with shared authentication/cart state and REST services; the backend is a Django API organized around domain apps and persistent models. The supplied excerpts support frontend routing, service-to-client calls, and some model relationships. Backend endpoint wiring and several major screens were not sampled, so those links are left unverified.
Main entry points: App.tsx App routes · productos/models.py Products and categories · DashboardPedidosOnline.tsx Online orders · pedidos/models.py Orders and tracking
Components 27
Shopper experience
- Product catalog
frontend/src/components/public/ProductCatalogNew.tsx - Checkout
frontend/src/components/checkout/Checkout.tsx - Customer account
frontend/src/components/customer/CustomerDashboard.tsx
Store administration
- Online orders
frontend/src/components/admin/dashboard/DashboardPedidosOnline.tsx - Inventory dashboard
frontend/src/components/admin/dashboard/DashboardInventario.tsx - Product dashboard
frontend/src/components/admin/dashboard/DashboardProductos.tsx - User dashboard
frontend/src/components/admin/dashboard/DashboardUsuarios.tsx - Sales dashboard
frontend/src/components/admin/dashboard/DashboardVentas.tsx
Frontend foundation
- App routes
frontend/src/App.tsx - Auth state
frontend/src/context/AuthContext.tsx - Cart state
frontend/src/context/CartContext.tsx
API and services
- Dashboard metrics
backend/abarrotes_api/dashboard_stats.py - Auth service
frontend/src/services/authService.ts - HTTP client
frontend/src/services/apiClient.ts - Order service
frontend/src/services/pedidosService.ts - Product service
frontend/src/services/productosService.ts
Commerce domain
- Identity API
backend/auth_app/views.py - User profiles
backend/auth_app/models.py - Product API
backend/productos/views.py - Products and categories
backend/productos/models.py - Inventory API
backend/inventario/views.py - Inventory movements
backend/inventario/models.py - Order API
backend/pedidos/views.py - Orders and tracking
backend/pedidos/models.py - Sales records
backend/ventas/models.py - Payment handlers
backend/pagos/views.py
Other components
- Shopper
Connections 32
- Shopper → App routes: uses
frontend/src/App.tsx - App routes → Product catalog: routes to
frontend/src/App.tsx - App routes → Checkout: routes to
frontend/src/App.tsx - App routes → Customer account: routes to
frontend/src/App.tsx - App routes → Product dashboard: routes to
frontend/src/App.tsx - App routes → Inventory dashboard: routes to
frontend/src/App.tsx - App routes → User dashboard: routes to
frontend/src/App.tsx - App routes → Sales dashboard: routes to
frontend/src/App.tsx - App routes → Online orders: routes to
frontend/src/App.tsx - Auth state → Auth service: uses
frontend/src/context/AuthContext.tsx - Auth service → HTTP client: sends requests
frontend/src/services/authService.ts - Product service → HTTP client: sends requests
frontend/src/services/productosService.ts - Order service → HTTP client: sends requests
frontend/src/services/pedidosService.ts - Product catalog → Product service: loads products
- Checkout → Order service: submits orders
- Online orders → Order service: manages orders
frontend/src/components/admin/dashboard/DashboardPedidosOnline.tsx - Inventory dashboard → Inventory API: manages stock
- Product dashboard → Product API: manages catalog
- User dashboard → Identity API: manages users
- Sales dashboard → Sales records: views sales
- Online orders → Product service: loads products
frontend/src/components/admin/dashboard/DashboardPedidosOnline.tsx - Online orders → Dashboard metrics: loads metrics
- Identity API → User profiles: updates profiles
- Product API → Products and categories: reads catalog
- Inventory API → Inventory movements: reads and writes
backend/inventario/views.py - Inventory API → Products and categories: uses products
backend/inventario/views.py - Order API → Orders and tracking: manages orders
- Orders and tracking → Products and categories: references products
backend/pedidos/models.py - Orders and tracking → Sales records: references sales
backend/pedidos/models.py - Sales records → Products and categories: references products
backend/ventas/models.py - Payment handlers → Orders and tracking: verifies payments
- Products and categories → Inventory movements: derives stock
backend/productos/models.py