Microservices demo project.
- Event-Driven Architecture - Kafka messaging between services
- SAGA Pattern - Distributed transaction management
- API Gateway - Centralized routing and authentication
- CQRS & Event Sourcing - Command/Query separation
- JWT Authentication - Stateless security
- Service Discovery - Dynamic service registration
- Circuit Breakers - Resilience patterns
- Domain-Driven Design - Clear service boundaries
- User Service (Spring Boot) - Authentication & user management
- Order Service (Spring Boot) - Order creation & management
- API Gateway (Spring Cloud Gateway) - Routing & JWT validation
- Kafka - Event-driven messaging
- Payment Service (Go) - Stripe integration & payment processing
- Notification Service (Node.js) - CQRS/Event Sourcing notifications
# Copy environment template
cp .env.example .env
# Start all services
docker-compose up -dEndpoints:
- API Gateway: http://localhost:8080
- Kafka UI: http://localhost:8090
Register user:
curl -X POST http://localhost:8080/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password123"}'Login and get JWT:
curl -X POST http://localhost:8080/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password123"}'Create order (replace YOUR_JWT_TOKEN):
curl -X POST http://localhost:8080/orders \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"items": [
{"productId": "widget-1", "quantity": 2},
{"productId": "gadget-2", "quantity": 1}
]
}'