How geovanesv/order-user-microservices works
This is a NestJS user-and-order microservice demo. The main workflow creates a user over HTTP, persists it in PostgreSQL, publishes a user.created event through RabbitMQ, and has the order service consume and process it. The user service also exposes login, JWT-protected user lookup, and token-related endpoints. The README documents these capabilities; sampled source confirms the user creation, persistence, publishing, and consumer behavior. Some infrastructure wiring is documented but not all deployment configuration was sampled.
Main entry points: user.controller.ts User API · user.service.ts User management · auth.controller.ts Auth API · auth.service.ts Authentication
Components 14
User service
- User API
user-service/src/user/user.controller.ts - User management
user-service/src/user/user.service.ts - PostgreSQL
Authentication
- Auth API
user-service/src/auth/auth.controller.ts - Authentication
user-service/src/auth/auth.service.ts - Auth DTOs
user-service/src/auth/dto/auth.dto.ts - JWT guard
user-service/src/auth/jwt-auth.guard.ts - JWT strategy
user-service/src/auth/jwt.strategy.ts
Event transport
- RabbitMQ
- Event publisher
user-service/src/messaging/messaging.service.ts
Order service
- Event consumer
order-service/src/messaging/messaging.service.ts - Health endpoint
order-service/src/app.controller.ts - Health response
order-service/src/app.service.ts
Other components
- HTTP client
Connections 16
- HTTP client → User API: creates user
README.md - User API → User management: calls
user-service/src/user/user.controller.ts - User management → PostgreSQL: persists user
user-service/src/user/user.service.ts - User management → Event publisher: publishes event
user-service/src/user/user.service.ts - Event publisher → RabbitMQ: publishes message
user-service/src/messaging/messaging.service.ts - RabbitMQ → Event consumer: delivers event
README.md - Event consumer → Event consumer: processes user
order-service/src/messaging/messaging.service.ts - HTTP client → Auth API: requests login
README.md - Auth API → Authentication: calls
user-service/src/auth/auth.controller.ts - Authentication → User management: looks up user
user-service/src/auth/auth.service.ts - Authentication → Auth DTOs: returns token data
user-service/src/auth/auth.service.ts - HTTP client → User API: requests protected lookup
README.md - User API → JWT guard: guards lookup
user-service/src/user/user.controller.ts - Auth API → JWT guard: guards routes
user-service/src/auth/auth.controller.ts - HTTP client → Health endpoint: checks health
README.md - Health endpoint → Health response: calls
order-service/src/app.controller.ts