https://github.com/rafaelfgx/microservices
Clean Architecture, Event-Driven Architecture, Clean Code, SOLID Principles, Resilience, Idempotency, Folder-by-Feature, Patterns (Mediator, Result, Strategy, Outbox, Retry, Circuit Breaker), Java, Spring Boot, Kong, Keycloak, Kafka, MongoDB, Redis, Elastic, Kibana, Swagger, Docker.
https://github.com/rafaelfgx/microservices
circuit-breaker-pattern clean-architecture clean-code elasticsearch event-driven-architecture java kafka keycloak kong mediator-pattern mongodb outbox-pattern redis retry-pattern solid spring-boot strategy-pattern
Last synced: 4 months ago
JSON representation
Clean Architecture, Event-Driven Architecture, Clean Code, SOLID Principles, Resilience, Idempotency, Folder-by-Feature, Patterns (Mediator, Result, Strategy, Outbox, Retry, Circuit Breaker), Java, Spring Boot, Kong, Keycloak, Kafka, MongoDB, Redis, Elastic, Kibana, Swagger, Docker.
- Host: GitHub
- URL: https://github.com/rafaelfgx/microservices
- Owner: rafaelfgx
- License: mit
- Created: 2025-05-16T12:19:34.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-09T11:56:43.000Z (4 months ago)
- Last Synced: 2025-06-09T12:46:09.316Z (4 months ago)
- Topics: circuit-breaker-pattern, clean-architecture, clean-code, elasticsearch, event-driven-architecture, java, kafka, keycloak, kong, mediator-pattern, mongodb, outbox-pattern, redis, retry-pattern, solid, spring-boot, strategy-pattern
- Language: Java
- Homepage:
- Size: 1.3 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
# Microservices


## Architecture and Principles
- [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
- [Event-Driven Architecture](https://martinfowler.com/articles/201701-event-driven.html)
- [Common Closure Principle](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
- [Common Reuse Principle](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
- [Separation of Concerns](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)
- [Clean Code](https://www.oreilly.com/library/view/clean-code-a/9780136083238)
- [SOLID Principles](https://www.baeldung.com/solid-principles)
- [Resilience](https://docs.microsoft.com/en-us/azure/architecture/resiliency)
- [Idempotency](https://restfulapi.net/idempotent-rest-apis)## Design Patterns
- [Mediator Pattern](https://refactoring.guru/design-patterns/mediator)
- [Result Pattern](https://www.codingexplorations.com/blog/mastering-the-result-pattern-in-software-development)
- [Strategy Pattern](https://refactoring.guru/design-patterns/strategy)
- [Outbox Pattern](https://www.geeksforgeeks.org/outbox-pattern-for-reliable-messaging-system-design/)
- [Retry Pattern](https://www.geeksforgeeks.org/circuit-breaker-vs-retry-pattern)
- [Circuit Breaker Pattern](https://www.geeksforgeeks.org/circuit-breaker-vs-retry-pattern)## Technologies and Tools
- [Java](https://www.oracle.com/java)
- [Spring Boot](https://spring.io/projects/spring-boot)
- [Kong](https://konghq.com)
- [Keycloak](https://www.keycloak.org)
- [OAuth2](https://oauth.net/2)
- [JWT](https://jwt.io)
- [Kafka](https://kafka.apache.org)
- [MongoDB](https://www.mongodb.com)
- [Redis](https://redis.io/)
- [Elastic](https://www.elastic.co)
- [Swagger](https://swagger.io)
- [Docker](https://www.docker.com)
- [Kubernetes](https://kubernetes.io)## Docker
`docker compose up --detach --build --remove-orphans`
## Tools
**Kong:** `http://localhost:8002`
**Keycloak:** `http://localhost:8005`
**Kafka:** `http://localhost:9000`
**Mongo:** `http://localhost:27018`
**Redis:** `http://localhost:6380`
**Logs:** `http://localhost:5601/app/management/data/index_management/data_streams`
**APM:** `http://localhost:5601/app/apm/services`
## Keycloak
**Username:** `admin`
**Password:** `password`
**Users**
- **Admin**
- **Username:** `admin`
- **Password:** `P@$$w0rd`
- **User**
- **Username:** `user`
- **Password:** `P@$$w0rd`> [!IMPORTANT]
> The **authservice** client needs the **manage-users** role assigned in **Keycloak** to be able to create users.
>
> `Manage Realms` **->** `microservices` **->** `Clients` **->** `authservice` **->** `Service Accounts Roles` **->** `Assign Role` **->** `manage-users`## Services
### AuthService
**Localhost:** `http://localhost:8010`
**Docker:** `http://localhost:9010`
**Kong:** `http://localhost:8000/authservice`

### ConfigurationService
**Localhost:** `http://localhost:8015`
**Docker:** `http://localhost:9015`
**Kong:** `http://localhost:8000/configurationservice`

### CustomerService
**Localhost:** `http://localhost:8020`
**Docker:** `http://localhost:9020`
**Kong:** `http://localhost:8000/customerservice`

### ProductService
**Localhost:** `http://localhost:8025`
**Docker:** `http://localhost:9025`
**Kong:** `http://localhost:8000/productservice`

### OrderService
**Localhost:** `http://localhost:8030`
**Docker:** `http://localhost:9030`
**Kong:** `http://localhost:8000/orderservice`

### PaymentService
**Localhost:** `http://localhost:8035`
**Docker:** `http://localhost:9035`
**Kong:** `http://localhost:8000/paymentservice`
