https://github.com/dubems/bank-account
A dockerised application to enable creation of different types of account (CHECKING,SAVINGS and LOAN) and performing different types of transactions on them
https://github.com/dubems/bank-account
Last synced: about 1 year ago
JSON representation
A dockerised application to enable creation of different types of account (CHECKING,SAVINGS and LOAN) and performing different types of transactions on them
- Host: GitHub
- URL: https://github.com/dubems/bank-account
- Owner: dubems
- Created: 2021-05-08T21:58:08.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-08T22:03:39.000Z (about 5 years ago)
- Last Synced: 2025-02-12T14:17:54.301Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Project
A RESTful API for Bank Account creation and performing different actions of the different types of BankAccount.
CHECKING_ACCOUNT, SAVINGS_ACCOUNT and PRIVATE_LOAN_ACCOUNT
### Solution
Since the app is supposed to be stateless, the below design considerations were made:
* Repository methods are synchronized to ensure thread saftey
* Bank accounts are stored in Hashmap with IBAN as key for easy lookup (0(1))
### Technologies
This project is created with:
* Java version 11
* SpringBoot version 2.3.5.RELEASE
* RestAssured, Junit 5 and Mockito for Testing
* Docker for containerization
* Swagger for API documentation
### Installation and Running
The project can be run in two ways:
* Gradle
* Docker
#### Maven
To start the app using gradle, you'll need to run the command below:
```
./gradlew bootRun
```
#### Docker
To run the app as a docker container, we have to first package the jar by running the command below
```
./gradlew build
```
build the image using the Dockerfile using the command below
```
docker build ${project-dir} -t sample-tag
```
and then run the app in a container by using the command below:
```
docker run -p 8080:8080 sample-tag
```
App should be available at **localhost:8080**
### Documentation
The API documentation can be viewed in this path
**/swagger-ui.html**
### Testing
To run the tests that were created along with the submission, Kindly run the command below:
```
./gradlew clean test
```
### Production ready considerations(out of scope)
* Metrics and Alerts
### Side Note :)
* Since application is supposed to be stateless, we cannot get the ACID properties of a relational database to gaurantee `TRANSACTIONS`