- A core banking system: Make and keep track of monetary transactions.
- Asynchronous architecture: Never lose any updates, guaranteed alerts.
-
Navigate to the project root:
cd cbs
-
Build the jar file using gradle:
./gradlew clean build
-
Navigate away from project root:
cd ..
-
Build a Docker image for the application:
docker build -t cbs .
-
Start the application using Docker Compose:
docker-compose up --build
-
Shutdown the application using Docker compose
docker-compose down -v
Database tables will be created automatically
-
To see the API doc use the following link when the app is running.
-
To see the message queues use the following link when the app is running. Here are the rabbitmq login details (if you're asked for it): username:
guest
password:guest
Build test reports can be found on this page
Screenshot of test coverage from intellij
Coverage test reports can be found on this page
Here are the feedbacks I got for this task:
- Nice project setup
- Nice error handling and error response
- Validations are done
- Correct data types
- Nice use of enums
- I like that there are integration test
Could have created two mappers/repositories separately for accounts and transactionsSuccessResponse could have used generic for data to have better type definitionWhat can be the dark side of using Lombok too extensively?Endpoints are not REST-fulSystem out is not really the best approach on logging...Too much logic on controller levelNo locking... What would happen in case of concurrent same account transactions?Much easier and cleaner would be to use db sequence for unique id instead of a central Java function.And even if you use Java function, create a Util class with static function for it instead of having it part of a certain service...Quite a few TODOs still around the project and a lot of comments, which is not considered clean code.- Test coverage is not met (while the services are covered quite nicely, you have quite a bit of code on controller level, which is not covered at all)
- Fix the dislikes majorly and handle them per commit.
- Implemented Dislike 9 instead of 8.
- Build the test coverage...