A full-featured retail banking application built with Spring Boot, Thymeleaf, and Spring Security. This project simulates core banking functionalities, including user authentication, account management, and fund transfers.
The application is live at bank.subho.xyz
- User Management: Secure user registration and login with Spring Security.
- Account Management: View and manage savings and checking accounts.
- Fund Transfers: Transfer funds between own accounts or to other recipients.
- Transaction History: View a detailed history of all transactions.
- Admin Panel: Manage users and view system-wide activity.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Docker (Docker Compose is now included with Docker Desktop and Docker Engine; no separate installation is needed)
- Clone the repository:
git clone https://github.com/ohbus/retail-banking.git
- Navigate to the project directory:
cd retail-banking
- Go to the GitHub repository page.
- Click the green Code button, then select Download ZIP.
- Extract the ZIP file to your desired location.
- Open a terminal and navigate to the extracted
retail-banking
directory.
To start the application in a development environment, you can use the provided Docker Compose file to start a local MySQL database.
- Start the development database:
docker compose -f docker-compose.dev.yml up -d
- Run the application from your IDE:
- Open the project in your favorite IDE (e.g., IntelliJ IDEA).
- Run the
Application
class. Thedev
profile is active by default.
The application will be available at http://localhost:9998
.
To run the application in a production-like environment, use the following command:
docker compose -f docker-compose.prod.yml up -d --build
This will start the application and a MySQL database container in detached mode.
This project uses Liquibase to manage database schema changes. The migration scripts are located in the src/main/resources/db/changelog
directory.
When you make changes to the JPA entities, you can automatically generate a new migration script by running the following command:
mvn liquibase:diff -Dliquibase.diffChangeLogFile=src/main/resources/db/changelog/changes/<new-version>-<description>.yaml
Replace <new-version>
with the next version number (e.g., 002
) and <description>
with a brief description of the changes.
This project uses Testcontainers to automatically manage a MySQL container for testing. This ensures a consistent and reliable testing environment.
To run all tests, use the following command:
mvn clean verify
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please see the CONTRIBUTING.md file for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE file for details.
Subhrodip Mohanta - @SubhrodipMohanta - [email protected]
Project Link: https://github.com/ohbus/retail-banking