How lucorral/pp3-ecommerce-microservices works
This is an Express API gateway for an ecommerce microservices system. The frontend sends requests to the gateway, which authenticates protected requests and proxies user, catalog, and order operations to their respective services. Order creation and cancellation also coordinate order and inventory calls. The README documents JWT authentication, internal service tokens, and the three upstream services; excerpts show selected routes and coordination logic, so other route-level details are not expanded here.
Main entry points: app.js Gateway routes · server.js Server bootstrap
Components 12
Gateway runtime
- Server bootstrap
src/server.js - Gateway routes
src/app.js - Health checks
src/app.js
Identity and users
- JWT authentication
src/app.js - User routes
src/app.js
Commerce APIs
- Catalog routes
src/app.js - Order routes
src/app.js
Order coordination
- Order and stock workflow
src/app.js
Other components
- Frontend
- Users API
- Catalog API
- Orders API
Connections 13
- Frontend → Gateway routes: sends requests
README.md - Server bootstrap → Gateway routes: creates app
src/server.js - Gateway routes → Health checks: routes health checks
src/app.js - Gateway routes → JWT authentication: applies middleware
src/app.js - Gateway routes → User routes: routes user requests
src/app.js - Gateway routes → Catalog routes: routes catalog requests
src/app.js - Gateway routes → Order routes: routes order requests
src/app.js - User routes → Users API: proxies requests
src/app.js - Catalog routes → Catalog API: proxies requests
src/app.js - Order routes → Orders API: proxies requests
src/app.js - Order routes → Order and stock workflow: creates and cancels
src/app.js - Order and stock workflow → Orders API: updates orders
src/app.js - Order and stock workflow → Catalog API: moves stock
src/app.js