How pavloshaparenko/pumba_services works
Pumba_services is a small commerce-oriented API repository. Its demonstrated request path is an HTTP client reaching the Node server, through request handling and route dispatch, to health or category handlers; category requests read active rows from PostgreSQL. The tree also indicates commerce schema areas for products, orders, addresses, wishlists, brands, attributes, and categories, but the README is uninformative and those migrations were not sampled. Edges reflect only shown code or source-index references; the broader schema is included without speculative runtime links.
Main entry points: pipeline.ts Request pipeline · pool.ts PostgreSQL pool · server.ts Startup and shutdown · router.ts Route dispatch
Components 16
API runtime
- Startup and shutdown
apps/api/src/server.ts - Environment config
apps/api/src/config/env.ts
HTTP handling
- HTTP server
apps/api/src/http/server.ts - Request pipeline
apps/api/src/http/pipeline.ts - CORS handling
apps/api/src/http/cors.ts - Route dispatch
apps/api/src/http/router.ts - Health handler
apps/api/src/http/handlers/health.ts - Not-found handler
apps/api/src/http/handlers/notFound.ts - HTTP error handler
apps/api/src/http/errorHandler.ts - Application error
apps/api/src/errors/AppError.ts
Commerce data
- Categories handler
apps/api/src/http/handlers/categories.ts - Category queries
apps/api/src/db/categories.ts - PostgreSQL pool
apps/api/src/services/pool.ts - Commerce schema
apps/api/migrations
Other components
- HTTP client
- PostgreSQL
Connections 17
- HTTP client → HTTP server: sends requests
- Startup and shutdown → Environment config: reads config
apps/api/src/server.ts - Startup and shutdown → PostgreSQL pool: checks and closes
apps/api/src/server.ts - Startup and shutdown → HTTP server: creates server
apps/api/src/server.ts - HTTP server → Request pipeline: passes requests
apps/api/src/http/server.ts - Request pipeline → CORS handling: applies CORS
apps/api/src/http/pipeline.ts - Request pipeline → Route dispatch: dispatches route
apps/api/src/http/pipeline.ts - Request pipeline → HTTP error handler: handles errors
apps/api/src/http/pipeline.ts - Route dispatch → Health handler: routes health
apps/api/src/http/router.ts - Route dispatch → Categories handler: routes categories
apps/api/src/http/router.ts - Categories handler → Category queries: loads categories
apps/api/src/http/handlers/categories.ts - Category queries → PostgreSQL pool: queries
apps/api/src/db/categories.ts - PostgreSQL pool → Environment config: uses settings
apps/api/src/services/pool.ts - PostgreSQL pool → PostgreSQL: queries database
- CORS handling → Environment config: reads origin
apps/api/src/http/cors.ts - HTTP error handler → Application error: checks type
apps/api/src/http/errorHandler.ts - Not-found handler → Application error: uses error type
apps/api/src/http/handlers/notFound.ts