Spring Bank is a RESTful web service that provides banking services. It is built using Spring Boot, Spring Data JPA, PostgreSQL, and Docker.
The easiest way to run the application is with Docker.
docker-compose up -d
Alternatively, you can run the application with Maven.
- Java 22 or later (it's compatible with Java 17, but you may need to update the
sourceCompatibility
andtargetCompatibility
in thebuild.gradle
file) - Maven 3.8.1 or later
mvn spring-boot:run
The application will be available at http://localhost:8080.
The Adminer will be available at http://localhost:8081.
- Create a new account
- Get account details
- Deposit money
- Withdraw money
- Transfer money between accounts
The following Entity-Relationship Diagram (ERD) shows the relationships between the entities in the application:
classDiagram
class User {
uuid id
string name
string username
roles role
string password
datetime created_at
datetime updated_at
}
class Agency {
uuid id
uuid bank_id
int number
string address
datetime created_at
datetime updated_at
}
class Account {
uuid id
uuid user_id
uuid agency_id
int number
float balance
datetime created_at
datetime updated_at
}
class Bank {
uuid id
string name
string code
datetime created_at
datetime updated_at
}
class Transaction {
uuid id
uuid account_id
float value
transaction_type type
string description
datetime created_at
datetime updated_at
}
User "1" -- "n" Account : owns
Agency "1" -- "n" Account : has
Bank "1" -- "n" Agency : has
User "1" -- "n" Transaction : makes
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.