A secure, role-based online banking backend built using Java, Spring Boot, and JWT Authentication. It supports user registration, login, money transfers, and loan management. Designed for both Customer and Admin roles.
This project simulates a core banking system. It includes complete REST APIs for:
- User registration & login
- Money transfers between users
- Loan application and repayment system
- Admin functionalities like user overview and loan approvals
- Java 17
- Spring Boot 3
- Spring Security (JWT)
- JPA + Hibernate
- MySQL
- Swagger (OpenAPI)
- SonarCloud
- Postman (for API testing)
- Register and log in securely using JWT tokens
- View account info, balance, and loan status
- Deposit, withdraw, and transfer money
- Apply for different types of loans
- Repay loan with real-time updates
- View total users, system-wide balance
- Approve or reject loan applications
- Create other admin accounts securely
POST /login– Login with credentialsPOST /public/register-user– User RegistrationPOST /login/register-admin– Admin Registration
GET /user/info– Get user account infoPOST /user/deposit– Deposit moneyPOST /user/withdraw– Withdraw moneyPOST /user/transfer– Transfer moneyPOST /user/loan/apply– Apply for a loanGET /user/loan/status– View loan statusPOST /user/loan/repay– Repay loan amount
GET /admin/summary/balance– View total system moneyGET /admin/summary/users– View total number of usersGET /admin/loans/pending– View pending loan applicationsPUT /admin/loans/{loanId}/approve– Approve a loanPUT /admin/loans/{loanId}/reject– Reject a loan
User: id, accountNumber, roles, balance, etc.Loan: id, accountNumber, loanType, amount, interestRate, status, amountPaidTransaction: id, fromAccount, toAccount, amount, timestamp
Visit: http://localhost:8080/swagger-ui.html
- Clone the repo
git clone https://github.com/yourusername/banking-app.git
cd banking-app