https://github.com/kamarros/rates-cqrs-model
CQRS-ES Api model. Get currency rates - only show or export this to file (for example .csv). This API uses an external nbp.API.
https://github.com/kamarros/rates-cqrs-model
cqrs-application docker-compose java-11 mongodb spring-boot spring-kafka
Last synced: 5 months ago
JSON representation
CQRS-ES Api model. Get currency rates - only show or export this to file (for example .csv). This API uses an external nbp.API.
- Host: GitHub
- URL: https://github.com/kamarros/rates-cqrs-model
- Owner: kamarros
- Created: 2023-04-14T13:50:56.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-23T13:19:06.000Z (about 3 years ago)
- Last Synced: 2025-10-13T12:33:55.414Z (9 months ago)
- Topics: cqrs-application, docker-compose, java-11, mongodb, spring-boot, spring-kafka
- Language: Java
- Homepage:
- Size: 69.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Rates-CQRS-model
CQRS-ES Api model. Get currency rates - only show or export this to file (for example .csv).
This API uses an external nbp.API.
# Tasks naming
COMMAND[CMD] [#numberTask] feat/chore/refactor/fix
COMMON[COM] [#numberTask] feat/chore/refactor/fix
QUERY[QRY] [#numberTask] feat/chore/refactor/fix
# Work and start project:
## Preparing environment
**Prerequisites:**
To start, you need three things: **MySQL** database, **MongoDB** and **Kafka**. Running this project requires installing docker, maven and java jdk 11.
### Very important: If you need _NETWORK_ for docker please execute command:
`sudo docker network create --attachable -d bridge ratesNet`
(ratesNet it's name which can be change)
a) **MongoDB** is used by _COMMAND API_
- open MongoDB Compass and create new database/collection
- use docker and execute command:
`sudo docker run -it -d --name mongo-container -p 27017:27017 --network ratesNet --restart always -v`
b) **MySQL** is used by _QUERY API_
- open MySQL database on your local environment and create new database
- use docker and execute command:
`sudo docker run -it -d --name mysql-container -p 3306:3306 --network ratesNet -e MYSQL_ROOT_PASSWORD=ratesRootPsw --restart always -v mysql_data_container:/var/lib/mysql mysql:latest`
c) **Apache Kafka**:
- create new file or use exists file docker-compose.yml path:
**docker**/docker-compose.yml
- entry to folder path and execute command `docker-compose up -d`