Clever-Bank is a console-based banking application designed to manage multiple banks, users, and accounts, facilitating secure transactions, interest calculations, and generating detailed receipts.
It adheres to SOLID principles and ensures asynchronous operations in a multi-threaded environment, with a focus on code quality and maintainability.
- Deposit and withdrawal of funds.
- Transfers between clients of Clever-Bank and clients of other banks.
- Automatic interest charge on accounts at the end of the month.
- Generation and saving of checks for each transaction.
- Multithreading and deadlock protection.
- Java 17
- Maven
- PostgreSQL
- JDBC
- Lombok
- Servlets
- Docker
The application operates with the following entities:
- Bank: keeps accounts and users.
- User: owns one or more accounts.
- Account: used for money transactions.
- Transaction: Record of any account transaction.
- Install Homebrew (for installing other programs):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Maven using Homebrew:
brew install maven
- Check an installation:
mvn -v
- Install docker (https://docs.docker.com/engine/install/)
- Run docker app locally.
- Run docker-compose.yaml
- Run CleverBank.java
For a successful code compilation with lombok we need:
-
Turn on Annotation Processors: Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors.
-
Add this to pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<compilerVersion>1.8</compilerVersion>
<source>1.8</source>
<target>1.8</target>
<annotationProcessors>
<annotationProcessor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor
</annotationProcessor>
</annotationProcessors>
</configuration>
</plugin>
https://app.exchangerate-api.com/ - third API to get currency rates