The Account Manager application is a simple Spring Boot application that provides RESTful APIs to manage account balances and transfer money between accounts. This application uses an H2 file database for data persistence.
- Java 22
- Spring Boot 3
- Maven
- Flyway
- H2 Database
- Java Development Kit (JDK) 22
- Maven
- IntelliJ IDEA
git clone git@github.com:oseifrimpong/account-manager.git
cd account-manager
- Open IntelliJ IDEA.
- Click on
File -> Open
and select theaccount-manager
project directory.
- Navigate to the Maven tool window (
View -> Tool Windows -> Maven
). - Click on
Reload All Maven Projects
to ensure all dependencies are downloaded. - Once the project is built successfully, you can proceed to run it.
- Navigate to
src/main/java/com/acmebank/accountmanager/AccountManagerApplication.java
. - Right-click on the
AccountManagerApplication
class and selectRun 'AccountManagerApplication'
.
- The application will start on port
8000
with context path/api
. - You can access the H2 console at
http://localhost:8000/api/h2-console
.
-
URL:
/api/accounts/{accountNumber}/balance
-
Method:
GET
-
Response:
{ "status": "success", "message": "Balance retrieved successfully", "data": 1000000 }
-
URL:
/api/accounts/transfer
-
Method:
POST
-
Request Parameters:
fromAccountNumber
: Source account numbertoAccountNumber
: Destination account numberamount
: Amount to transfer
-
Response:
{ "status": "success", "message": "Transfer completed successfully", "data": null }
- URL:
http://localhost:8000/api/h2-console
- JDBC URL:
jdbc:h2:file:~/acmebankdb
- Username:
sa
- Password: (leave it blank)
- Add Open-API documentation for the API endpoints using Swagger.
- Implement a mechanism to handle concurrent transactions.
- Add authentication and authorization to the API endpoints.
- Create a Dockerfile to containerize the application.
- Add a new entity to handle account transactions, history, currency data and user accounts with roles.