https://github.com/ivan-montes/hex-cqrs-es-proof
REST API with Hexagonal Architecture, CQRS, Event Sourcing and Kafka
https://github.com/ivan-montes/hex-cqrs-es-proof
cqrs docker docker-compose event-sourcing hexagonal-architecture java kafka kafka-ui maven sonarqube spring swagger
Last synced: 3 months ago
JSON representation
REST API with Hexagonal Architecture, CQRS, Event Sourcing and Kafka
- Host: GitHub
- URL: https://github.com/ivan-montes/hex-cqrs-es-proof
- Owner: Ivan-Montes
- License: gpl-3.0
- Created: 2024-05-20T06:55:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-29T05:42:12.000Z (almost 2 years ago)
- Last Synced: 2025-09-20T11:44:32.281Z (9 months ago)
- Topics: cqrs, docker, docker-compose, event-sourcing, hexagonal-architecture, java, kafka, kafka-ui, maven, sonarqube, spring, swagger
- Language: Java
- Homepage:
- Size: 150 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# hex-cqrs-es-proof
REST API with Hexagonal Architecture, CQRS, Event Sourcing and Kafka
**Components**
- REST API with [OpenApi Swagger](https://swagger.io/) [8081]
- [Kafka](https://kafka.apache.org/) [9092] + [9093]
- [Kafka-UI](https://docs.kafka-ui.provectus.io/) [8080]
## Table of contents
- [Installation](#installation)
- [Usage](#usage)
- [It's not a bug, it's a feature](#features)
- [Maintainers](#maintainers)
- [License](#license)
## Installation
1. First of all clone or download the project.
1. Inside the main folder, you could find two docker-compose yaml files.
1. From there use the command line to start the project in dev or production mode
```
**Developer mode**
docker-compose -f docker-compose-dev.yml up -d
**Production mode**
docker-compose -f docker-compose-prod.yml up -d
```
The dev environment is ready for using with your IDE. The microservice attempts to communicate with Kafka using the local host. In production, it uses the archive Dockerfile to build an image of the project, so you wont need the IDE.
4. You could stop the project with any of these orders
```
**Developer mode**
docker-compose -f docker-compose-dev.yml down --rmi local -v
**Production mode**
docker-compose -f docker-compose-prod.yml down --rmi local -v
```
## Usage
First of all, please visit the REST API documentation. Replace ${port} for the suitable microservice port:
http://localhost:${port}/swagger-ui/index.html
[Kafka-UI](https://docs.kafka-ui.provectus.io/) allow you to check your [Kafka](https://kafka.apache.org/) server using a practical dashboard, so visit this url:
http://localhost:8080
## Features
#### :white_check_mark: Include two docker-compose yaml files for easy change of environment
#### :white_check_mark: Hexagonal Architecture following Clean Architecture principle
#### :white_check_mark: CQRS pattern with independent databases for Read or RW actions
#### :white_check_mark: Event Sourcing for persisting as an ordered sequence of events
## Maintainers
Just me, [Iván](https://github.com/Ivan-Montes) :sweat_smile:
## License
[GPLv3 license](https://choosealicense.com/licenses/gpl-3.0/)
---
[](https://www.java.com/es/)
[](https://https://maven.apache.org/)
[](https://spring.io)
[](https://github.com)
[](https://https://eclipse.org/)
[](https://www.sonarsource.com/products/sonarqube/downloads/)
[](https://www.docker.com/)
[](https://kafka.apache.org/)
[](https://choosealicense.com/licenses/gpl-3.0/)