This is a simple bank management system that allows you to create a bank account, deposit money, withdraw money, and check your balance.
- Clone the repository
- Open the project in your IDE
- Install the dependencies by running
mnv clean install
- Run the project
- Open your browser and go to
localhost:8080/swagger-ui.html
to see the API documentation
- Java 17
- Maven
- PostgresSql
The API documentation can be found at localhost:8080/swagger-ui.html
The database is a PostgresSql database. The database name is bank_management_system
and the username is _yourUserName_
and the password is _yourPassword_
. You can change the database name, username, and password in the application.properties
file.
POST /v1/customer
{
"firstName": "string",
"lastName": "string",
"email": "string",
"password": "string",
"phone": "string",
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
},
"nationalId": "string"
}
{
"firstName": "string",
"lastName": "string",
"nationalId": "string",
"email": "string",
"password": "string",
"phone": "string",
"isActive": true,
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
},
"accounts": []
}
PUT /v1/customer/{id}
{
"firstName": "string",
"lastName": "string",
"email": "string",
"password": "string",
"phone": "string",
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
}
}
{
"firstName": "string",
"lastName": "string",
"nationalId": "string",
"email": "string",
"password": "string",
"phone": "string",
"isActive": true,
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
},
"accounts": [
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
]
}
DELETE /v1/customer/{id}
{
"firstName": "string",
"lastName": "string",
"nationalId": "string",
"email": "string",
"password": "string",
"phone": "string",
"isActive": false,
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
},
"accounts": [
{
"accountNumber": "string",
"balance": 0,
"isActive": false,
"accountType": "SAVINGS",
"accountStatus": "INACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "INACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
]
}
GET /v1/customer/getCustomerById/{id}
{
"firstName": "string",
"lastName": "string",
"nationalId": "string",
"email": "string",
"password": "string",
"phone": "string",
"isActive": true,
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
},
"accounts": [
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
]
}
GET /v1/customer/{nationalId}
{
"firstName": "string",
"lastName": "string",
"nationalId": "string",
"email": "string",
"password": "string",
"phone": "string",
"isActive": true,
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
},
"accounts": [
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
]
}
GET /v1/customer
[
{
"firstName": "string",
"lastName": "string",
"nationalId": "string",
"email": "string",
"password": "string",
"phone": "string",
"isActive": true,
"address": {
"addressLine": "string",
"city": "string",
"state": "string",
"country": "string",
"zipCode": "string"
},
"accounts": [
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
]
}
]
POST /v1/account
{
"accountType": "SAVINGS",
"accountLimitType": "DAILY",
"customerId": 0
}
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
PUT /v1/account/{accountNumber}
{
"accountType": "SAVINGS",
"accountLimitType": "DAILY"
}
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
DELETE /v1/account/{accountNumber}
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
GET /v1/account
[
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
]
GET /v1/account/{accountNumber}
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
POST /v1/account/add/{accountNumber}
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
POST /v1/account/withdraw/{accountNumber}
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
POST /v1/account/transfer/{accountNumber}
{
"fromAccountNumber": "string",
"toAccountNumber": "string",
"amount": 0
}
{
"accountNumber": "string",
"balance": 0,
"isActive": true,
"accountType": "SAVINGS",
"accountStatus": "ACTIVE",
"accountLimit": 0,
"accountLimitType": "DAILY",
"accountLimitStatus": "ACTIVE",
"accountLimitAmount": 0,
"accountLimitStartDate": "2022-12-07",
"accountLimitEndDate": "2022-12-07"
}
- Spring Boot - The web framework used
- Maven - Dependency Management
- PostgreSQL - Database
- Swagger - API Documentation
- Docker - Containerization