Simple Cash Management System (mycms-backend) for POC.
A cash management system is used to forecast, track, and report corporate cash flows. The solution is especially helpful to manage cash flows (including in various currencies) across multiple, including international, company branches and across complex bank account structures.
ReactJs -> Axios HTTP request -> Spring Boot -> PostgreSQL/microservices
- (N/A)Inhouse Transfer (Transfer cash in Account within same bank)
- (N/A)Domestic Transfer (Transfer cash in Account with different bank and in same Country)
- (N/A)Telegraphic Transfer/Remittance (Transfer cash in Account with different bank and different country)
- (N/A)Service Payment
- (N/A)Currency Live Rate (Forex)
- Batch Job
Click on the microservice link to go to Spring Initialzr
Microservice | Description | Tomcat Port |
---|---|---|
springbootbackend | Base backend | http://localhost:50000 |
email-service | Email Consumer Service to consume order | http://localhost:50001 |
inhouse-service | Inhouse Transfers Consumer to store in db | http://localhost:50002 |
domestic-service | Domestic Transfers Consumer to store in db | http://localhost:50003 |
batch-job | Batch Job to store data into db | http://localhost:50004 |
Project Dependency | Version |
---|---|
Spring Boot |
2.7.8 |
Kafka |
3.2 |
spring-batch-core |
4.3.8 |
Keycloak |
21.1.1 |
In order to start the backend application. The Zookeeper and Kafka must be started first. See step below on how to start the project.
# compose Kafka container
$ cd docker/kakfa
$ docker compose up -d
- open terminal to start Kafka Zookeeper:
- cd /path/to/kafka_2.12-3.2.1
- For Window Powershell:
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
- For Linux/Mac:
bin/zookeeper-server-start.sh config/zookeeper.properties
- For Window Powershell:
- open new terminal to start Kafka server:
- For Window Powershell:
.\bin\windows\kafka-server-start.bat .\config\server.properties
- For Linux/Mac:
bin/kafka-server-start.sh config/server.properties
- For Window Powershell:
- Kafka broker is running at localhost:9092
- To list Kafka Topics:
- For Window Powershell:
.\bin\windows\kafka-topics.bat --bootstrap-server=localhost:9092 --list
- For Linux/Mac:
bin/kafka-topics.sh --bootstrap-server=localhost:9092 --list
- For Window Powershell:
- To delete Kafka Topic:
- for Linux/Mac:
./bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic inhouse-transfers
- for Linux/Mac:
- To read the message in topic:
- For Window Powershell:
.\bin\windows\kafka-console-consumer.bat --topic order-topics --from-beginning --bootstrap-server localhost:9092
- For Linux/Mac:
bin/kafka-console-consumer.sh --topic inhouse-transfers --from-beginning --bootstrap-server localhost:9092
- For Window Powershell:
- Now that all the kafka service is up and running. The main() method of each microservice can be started
open mycms-erd.xml in draw.io
- Back-End: Spring Boot Spring intializr
- Batch-Job: Spring Batch
- Database: PostgreSQL
Legend:
- BRN: Business Registration Number
- TRX_STATUS: 0 - fail, 1-success, 3-on hold
- CA/SA: Current Account/Saving Account
default username: user default password: zacktest
Authorization Server should be running before we can start the Resource Server application.
Authentication: refers to the process of verifying the identity of a user, based on provided credentials. A common example is entering a username and a password when you log in to a website. You can think of it as an answer to the question Who are you?. Authorization: refers to the process of determining if a user has proper permission to perform a particular action or read particular data, assuming that the user is successfully authenticated. You can think of it as an answer to the question Can a user do/read this?. Principle: refers to the currently authenticated user. Granted authority: refers to the permission of the authenticated user. Role: refers to a group of permissions of the authenticated user.
# compose MYCMS-Backend container
$ docker compose up -d
# compose and re-build container (only run when u change Dockerfile)
$ docker compose up --build -d
# compose Kafka container
$ cd /docker/kakfa
$ docker compose up -d
# to remove composed container
$ docker compose down