How analuciahm27/admproyectos works
Eléctricos Generales is an internal sales and fulfillment system. Its main workflow runs from role-based sign-in and product selection through order creation, voucher upload/OCR, accounting review, warehouse dispatch, and stock updates. The graph separates these domain stages from the shared API, persistence, and real-time notification layer. Some frontend-to-API and stock-update details are documented only at a high level; those links cite the README rather than implying unshown implementation details.
Main entry points: App.jsx Routes and access · index.js Express and Socket.IO · pedidos.js Order API · vouchers.js Voucher OCR and review
Components 22
Web application
- Routes and access
frontend/src/App.jsx - Role navigation
frontend/src/components/Layout.jsx - Session context
frontend/src/context/AuthContext.jsx - Live event client
frontend/src/context/SocketContext.jsx - Dashboard
frontend/src/pages/DashboardPage.jsx - Login
frontend/src/pages/LoginPage.jsx
Sales and catalog
- Product catalog
frontend/src/pages/CatalogoPage.jsx - Order list
frontend/src/pages/PedidosPage.jsx - Order creation
frontend/src/pages/NuevoPedidoPage.jsx - Order detail and upload
frontend/src/pages/PedidoDetallePage.jsx - Product API
backend/src/routes/productos.js - Order API
backend/src/routes/pedidos.js
Voucher review
- Voucher OCR and review
backend/src/routes/vouchers.js - Accounting review
frontend/src/pages/ContabilidadPage.jsx
Warehouse dispatch
- Warehouse dispatch
frontend/src/pages/AlmacenPage.jsx - Dispatch and stock API
backend/src/routes/almacen.js
API and shared services
- Authentication API
backend/src/routes/auth.js - JWT and role guard
backend/src/middleware/auth.js - Express and Socket.IO
backend/src/index.js - Notification API
backend/src/routes/notificaciones.js - Application database
backend/prisma/schema.prisma
Other components
- Staff user
Connections 41
- Staff user → Routes and access: uses
frontend/src/App.jsx - Routes and access → Session context: provides session
frontend/src/App.jsx - Routes and access → Live event client: provides live events
frontend/src/App.jsx - Routes and access → Login: routes to
frontend/src/App.jsx - Routes and access → Role navigation: renders protected
frontend/src/App.jsx - Routes and access → Dashboard: routes to
frontend/src/App.jsx - Routes and access → Product catalog: routes to
frontend/src/App.jsx - Routes and access → Order list: routes to
frontend/src/App.jsx - Routes and access → Order creation: routes to
frontend/src/App.jsx - Routes and access → Order detail and upload: routes to
frontend/src/App.jsx - Routes and access → Accounting review: routes to
frontend/src/App.jsx - Routes and access → Warehouse dispatch: routes to
frontend/src/App.jsx - Login → Session context: signs in through
frontend/src/pages/LoginPage.jsx - Session context → Authentication API: requests session
frontend/src/context/AuthContext.jsx - Role navigation → Session context: reads session
frontend/src/components/Layout.jsx - Product catalog → Product API: loads catalog
README.md - Order creation → Order API: creates order
README.md - Order list → Order API: lists orders
README.md - Order detail and upload → Order API: loads order
frontend/src/pages/PedidoDetallePage.jsx - Order detail and upload → Voucher OCR and review: uploads voucher
frontend/src/pages/PedidoDetallePage.jsx - Accounting review → Voucher OCR and review: reviews voucher
README.md - Warehouse dispatch → Dispatch and stock API: confirms dispatch
README.md - Express and Socket.IO → Authentication API: mounts route
backend/src/index.js - Express and Socket.IO → Product API: mounts route
backend/src/index.js - Express and Socket.IO → Order API: mounts route
backend/src/index.js - Express and Socket.IO → Voucher OCR and review: mounts route
backend/src/index.js - Express and Socket.IO → Dispatch and stock API: mounts route
backend/src/index.js - Express and Socket.IO → Notification API: mounts route
backend/src/index.js - Authentication API → JWT and role guard: protects profile
backend/src/routes/auth.js - Order API → JWT and role guard: checks access
backend/src/routes/pedidos.js - Voucher OCR and review → JWT and role guard: checks access
backend/src/routes/vouchers.js - Authentication API → Application database: reads users
backend/src/routes/auth.js - Order API → Application database: reads and writes
backend/src/routes/pedidos.js - Voucher OCR and review → Application database: stores review data
backend/src/routes/vouchers.js - Dispatch and stock API → Application database: updates stock
README.md - Order API → Express and Socket.IO: emits order events
backend/src/routes/pedidos.js - Voucher OCR and review → Express and Socket.IO: emits review events
backend/src/routes/vouchers.js - Express and Socket.IO → Live event client: delivers live events
README.md - Live event client → Session context: reads user token
frontend/src/context/SocketContext.jsx - Accounting review → Live event client: uses live updates
frontend/src/pages/ContabilidadPage.jsx - Warehouse dispatch → Live event client: uses live updates
frontend/src/pages/AlmacenPage.jsx