How estigar95/electiva3 works
Project type and purpose
• This is a backend-only, monolithic REST API service written in Node.js/Express, with PostgreSQL as its data store.
• Its purpose is to implement a customer loyalty program: point wallets, promotions, challenges, rules for assigning and expiring points, etc., all exposed via HTTP endpoints (tested with Postman).
File structure
• Top level contains package.json, README.md, Git artifacts.
• src/index.js boots the Express server.
• src/config/config.js holds the DB connection parameters (loaded via environment variables).
• src/routers/* define Express routing per resource (cliente, bolsaPuntos, usoPuntos, conceptoUso, gamificacion, promocion, reglasAsignacion, vencimientoPuntos).
• src/controllers/* implement the business logic for each resource.
• No separate “service” or “model” layer folders—controllers talk directly to the DB via the “pg” module.
README for additional insights
• Confirms use of Express, pg, moment, nodemon.
• PostgreSQL is the sole external service.
• Interactions are purely via REST endpoints (CRUD-style).