Code Monkey home page Code Monkey logo

mycms-backend's Introduction

Simple Cash Management System

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.

Event-Driven Microservice Architecture

myCMS-MS

ReactJs -> Axios HTTP request -> Spring Boot -> PostgreSQL/microservices

Module:

  1. (N/A)Inhouse Transfer (Transfer cash in Account within same bank)
  2. (N/A)Domestic Transfer (Transfer cash in Account with different bank and in same Country)
  3. (N/A)Telegraphic Transfer/Remittance (Transfer cash in Account with different bank and different country)
  4. (N/A)Service Payment
  5. (N/A)Currency Live Rate (Forex)
  6. Batch Job

Available Microservices

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

Project Dependency Version
Spring Boot 2.7.8
Kafka 3.2
spring-batch-core 4.3.8
Keycloak 21.1.1

Start Back-End Environment

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
  1. open terminal to start Kafka Zookeeper:
  2. cd /path/to/kafka_2.12-3.2.1
    1. For Window Powershell: .\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
    2. For Linux/Mac: bin/zookeeper-server-start.sh config/zookeeper.properties
  3. open new terminal to start Kafka server:
    1. For Window Powershell: .\bin\windows\kafka-server-start.bat .\config\server.properties
    2. For Linux/Mac: bin/kafka-server-start.sh config/server.properties
  4. Kafka broker is running at localhost:9092
  5. To list Kafka Topics:
    1. For Window Powershell: .\bin\windows\kafka-topics.bat --bootstrap-server=localhost:9092 --list
    2. For Linux/Mac: bin/kafka-topics.sh --bootstrap-server=localhost:9092 --list
  6. To delete Kafka Topic:
    1. for Linux/Mac: ./bin/kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic inhouse-transfers
  7. To read the message in topic:
    1. For Window Powershell: .\bin\windows\kafka-console-consumer.bat --topic order-topics --from-beginning --bootstrap-server localhost:9092
    2. For Linux/Mac: bin/kafka-console-consumer.sh --topic inhouse-transfers --from-beginning --bootstrap-server localhost:9092
  8. Now that all the kafka service is up and running. The main() method of each microservice can be started

ERD:

open mycms-erd.xml in draw.io

Tech Stack:

  1. Back-End: Spring Boot Spring intializr
  2. Batch-Job: Spring Batch
  3. 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.

Docker

# 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

mycms-backend's People

Contributors

dzakirinmd avatar dzakirin-muhammad avatar

Stargazers

 avatar Soon Yoong avatar

Watchers

 avatar

Forkers

syedmuhayyat98

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.