How jmlopeze/comercializadora-andina works
Comercializadora Andina is a web system for managing a stationery wholesaler: users sign in, then consult sales indicators, manage products and orders, and view reports or their profile. The React client calls an Express REST API, whose resource routes apply validation and access controls and use MySQL for persistence. The README documents inventory movements, low-stock alerts, order cancellation with stock reintegration, and role-based access. Some route internals were not excerpted, so those capabilities are represented at the documented subsystem level; edges are limited to relationships shown in excerpts, the source index, or README.
Main entry points: App.jsx App and routes · server.js Express API server · cliente.js Axios API client · Dashboard.jsx Dashboard
Components 28
Web client
- App and routes
frontend/src/App.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - Product management
frontend/src/pages/Productos.jsx - Orders workflow
frontend/src/pages/Pedidos.jsx - Sales reports
frontend/src/pages/Reportes.jsx - Profile
frontend/src/pages/Perfil.jsx - Login
frontend/src/pages/Login.jsx - Axios API client
frontend/src/api/cliente.js - Orders table
frontend/src/components/OrdersTable.jsx - Sales chart
frontend/src/components/SalesChart.jsx - Shared UI
frontend/src/components/ui.jsx - Display formatting
frontend/src/utils/formato.js
Identity and access
- Session provider
frontend/src/context/AuthProvider.jsx - Session hook
frontend/src/context/useAuth.js - Authentication and profile
backend/src/routes/auth.js - JWT and role checks
backend/src/middleware/auth.js
Commerce API
- Express API server
backend/src/server.js - Products API
backend/src/routes/productos.js - Categories API
backend/src/routes/categorias.js - Orders API
backend/src/routes/pedidos.js - Inventory API
backend/src/routes/inventario.js - Reports API
backend/src/routes/reportes.js - Customers API
backend/src/routes/clientes.js
Persistence and shared services
- Input validation
backend/src/utils/validaciones.js - Error handling
backend/src/middleware/errores.js - MySQL connection pool
backend/src/db.js - MySQL database
backend/schema.sql
Other components
- Staff user
Connections 48
- Staff user → App and routes: uses
README.md - App and routes → Dashboard: routes to
frontend/src/App.jsx - App and routes → Product management: routes to
frontend/src/App.jsx - App and routes → Orders workflow: routes to
frontend/src/App.jsx - App and routes → Sales reports: routes to
frontend/src/App.jsx - App and routes → Profile: routes to
frontend/src/App.jsx - App and routes → Login: renders
frontend/src/App.jsx - App and routes → Session hook: reads session
frontend/src/App.jsx - Session provider → Session hook: provides context
frontend/src/context/useAuth.js - Login → Axios API client: calls
frontend/src/pages/Login.jsx - Dashboard → Axios API client: calls
frontend/src/pages/Dashboard.jsx - Product management → Axios API client: calls
frontend/src/pages/Productos.jsx - Orders workflow → Axios API client: calls
frontend/src/pages/Pedidos.jsx - Sales reports → Axios API client: calls
frontend/src/pages/Reportes.jsx - Profile → Axios API client: calls
frontend/src/pages/Perfil.jsx - Dashboard → Orders table: renders
frontend/src/pages/Dashboard.jsx - Orders workflow → Orders table: renders
frontend/src/pages/Pedidos.jsx - Dashboard → Sales chart: renders
frontend/src/pages/Dashboard.jsx - Sales reports → Sales chart: renders
frontend/src/pages/Reportes.jsx - Dashboard → Shared UI: uses
frontend/src/pages/Dashboard.jsx - Product management → Shared UI: uses
frontend/src/pages/Productos.jsx - Orders workflow → Shared UI: uses
frontend/src/pages/Pedidos.jsx - Sales reports → Shared UI: uses
frontend/src/pages/Reportes.jsx - Profile → Shared UI: uses
frontend/src/pages/Perfil.jsx - Dashboard → Display formatting: formats values
frontend/src/pages/Dashboard.jsx - Product management → Display formatting: formats values
frontend/src/pages/Productos.jsx - Orders workflow → Display formatting: formats values
frontend/src/pages/Pedidos.jsx - Sales reports → Display formatting: formats values
frontend/src/pages/Reportes.jsx - Profile → Display formatting: formats values
frontend/src/pages/Perfil.jsx - Axios API client → Express API server: HTTP JSON
README.md - Express API server → Authentication and profile: mounts routes
backend/src/server.js - Express API server → Products API: mounts routes
backend/src/server.js - Express API server → Categories API: mounts routes
backend/src/server.js - Express API server → Customers API: mounts routes
backend/src/server.js - Express API server → Orders API: mounts routes
backend/src/server.js - Express API server → Inventory API: mounts routes
backend/src/server.js - Express API server → Reports API: mounts routes
backend/src/server.js - Authentication and profile → MySQL connection pool: queries
backend/src/routes/auth.js - Authentication and profile → JWT and role checks: protects profile
backend/src/routes/auth.js - JWT and role checks → Error handling: raises API errors
backend/src/middleware/auth.js - Customers API → MySQL connection pool: queries
backend/src/routes/clientes.js - Products API → MySQL connection pool: queries
backend/src/routes/productos.js - Orders API → MySQL connection pool: queries
backend/src/routes/pedidos.js - Inventory API → MySQL connection pool: queries
backend/src/routes/inventario.js - Reports API → MySQL connection pool: queries
backend/src/routes/reportes.js - Categories API → MySQL connection pool: queries
backend/src/routes/categorias.js - Customers API → JWT and role checks: protects writes
backend/src/routes/clientes.js - Orders API → JWT and role checks: checks access
backend/src/routes/pedidos.js