How caaaaa2562/pp3-api-catalogo works
This is a Node/Express catalog service backed by PostgreSQL. Clients browse active products and categories; administrators manage products and coupons; coupon lookup and purchase/return handling are also implemented in the application. The excerpts show route handlers querying PostgreSQL directly and authentication middleware used by the app. Some route bodies and integrations are unsampled, so the graph avoids inferring additional service-to-service connections.
Main entry points: app.js Route handlers · db.js Pool factory · server.js Service bootstrap · seed.js Catalog seed data
Components 13
HTTP API
- Route handlers
src/app.js - Request authentication
src/auth.js
Catalog Management
- Product browsing
src/app.js - Product administration
src/app.js - Category listing
src/app.js
Coupons and Orders
- Coupon administration
src/app.js - Coupon validation
src/app.js - Order and stock operations
src/app.js
Runtime and Persistence
- Service bootstrap
src/server.js - Pool factory
src/db.js - PostgreSQL
- Catalog seed data
scripts/seed.js
Other components
- API clients
Connections 19
- API clients → Route handlers: sends requests
src/app.js - Service bootstrap → Pool factory: creates pool
src/server.js - Service bootstrap → Route handlers: creates app
src/server.js - Route handlers → Request authentication: uses middleware
src/app.js - Route handlers → Product browsing: routes requests
src/app.js - Route handlers → Product administration: routes requests
src/app.js - Route handlers → Category listing: routes requests
src/app.js - Route handlers → Coupon administration: routes requests
src/app.js - Route handlers → Coupon validation: routes requests
src/app.js - Route handlers → Order and stock operations: handles operations
src/app.js - Product browsing → PostgreSQL: queries products
src/app.js - Product administration → PostgreSQL: writes products
src/app.js - Category listing → PostgreSQL: queries categories
src/app.js - Coupon administration → PostgreSQL: manages coupons
src/app.js - Coupon validation → PostgreSQL: checks coupon
src/app.js - Order and stock operations → PostgreSQL: updates stock
src/app.js - Pool factory → PostgreSQL: connects to
src/db.js - Catalog seed data → Pool factory: creates pool
scripts/seed.js - Catalog seed data → PostgreSQL: seeds records
scripts/seed.js