How moralesseba/nexo-inventario works
NEXO is a containerized inventory REST API for managing store products. The main workflow is a client request entering the Express server, passing through product routes and controller validation/query logic, and reading or changing PostgreSQL product records; low-stock queries support replenishment. The app also exposes health and service metadata endpoints and centralizes 404/error responses. The sampled source establishes runtime wiring; other README-described delivery and infrastructure capabilities are intentionally excluded from this runtime architecture.
Main entry points: app.js Express app · server.js HTTP listener · db.js Postgres pool · config.js Runtime config
Components 9
API entry
- HTTP listener
src/server.js - Express app
src/app.js - Runtime config
src/config.js - Error handling
src/middleware/errorHandler.js
Inventory domain
- Product routes
src/routes/productos.routes.js - Product operations
src/controllers/productos.controller.js
Persistence
- Postgres pool
src/db.js - PostgreSQL
Other components
- API client
Connections 10
- API client → HTTP listener: sends HTTP
README.md - HTTP listener → Express app: serves
src/server.js - HTTP listener → Runtime config: reads settings
src/server.js - Express app → Product routes: mounts routes
src/app.js - Express app → Runtime config: reads version
src/app.js - Express app → Error handling: handles errors
src/app.js - Product routes → Product operations: dispatches requests
src/routes/productos.routes.js - Product operations → Postgres pool: queries
src/controllers/productos.controller.js - Postgres pool → Runtime config: builds connection
src/db.js - Postgres pool → PostgreSQL: executes SQL
README.md