How valdircezar/formacao-backend-expert works
Project Type and Purpose
• This is a backend-focused microservices system built with Spring Boot and Spring Cloud.
• Purpose: Provide a “Backend Expert” training platform demonstrating a full microservices ecosystem, including authentication, user/order management, messaging, centralized configuration, service discovery, and a BFF layer.
a. API Gateway
b. Helpdesk BFF
c. Service Discovery (Eureka)
d. Config Server
e. Auth Service API
f. User Service API
g. Order Service API
h. Email Service
i. Shared Commons Library (hd-commons-lib) – not a deployed component but note its usage in service code
j. RabbitMQ Broker
k. Databases – one per service (e.g., MongoDB Atlas or Amazon RDS instances)
Relationships and Interactions
• External client → API Gateway (routes requests)
• API Gateway → Helpdesk BFF for UI-oriented endpoints
• Helpdesk BFF → Auth/User/Order services via Feign clients (synchronous HTTP)
• Order Service → User Service (via Feign client) to enrich order data
• Auth Service issues JWT tokens; BFF and API Gateway apply JWTAuthorizationFilters
• Services register with Service Discovery; Gateway and BFF use Discovery to locate them
• Config Server serves configuration (bootstrap.yml/application.yml) to all services at startup
• Order Service publishes “order-created” messages to RabbitMQ
• Email Service listens on RabbitMQ queue, processes messages, and sends emails
• Each service interacts with its own database
Architectural Patterns and Principles
• Microservices with single responsibility per service
• API Gateway pattern for routing, authentication, load balancing
• Backend-for-Frontend (BFF) pattern to tailor APIs to clients
• Centralized Configuration (Spring Cloud Config)
• Service Discovery (Eureka)
• Synchronous inter-service calls via Feign + load balancing
• Asynchronous messaging via RabbitMQ for decoupling
• JWT-based stateless authentication
• Shared library for DTOs, enums, exceptions to ensure common contracts
Technologies/Frameworks to annotate
• Spring Boot, Spring Cloud Gateway (or Netflix Zuul) for API Gateway
• Spring Cloud Config Server
• Spring Cloud Netflix Eureka (Service Discovery)
• Spring Security + JWT
• Spring Cloud OpenFeign for HTTP clients
• RabbitMQ
• Databases (MongoDB Atlas or RDS)
• Docker & Docker-Compose for orchestration