This is a banking application built using Spring Boot and MySQL that provides functionalities for user and account management, transactions, and admin role-based access control.
- ✅ Create new user (JWT Authentication)
- ✅ View User Details (Balance, Account Number, Type)
- ✅ Delete Users
- ✅ Get all accounts of users
- ✅ Creats Accounts
- ✅ Retrieve account details
- ✅ Delete Accounts
- ✅ Deposit & Withdraw Money
- ✅ Transfer Funds between accounts
- ✅ View Transaction History
- ✅ Manage all Users & Accounts
- ✅ Approve or Monitor Transactions
- ✅ View All Users & Their Balances
- ✅ Dto's and Mappers to secure schema
- ✅ Spring Boot with MySQL for Backend
- ✅ Spring Security & JWT for Authentication
- ✅ Lombok & JPA (Hibernate) for Database Management
- ✅ Role-Based Access Control (ADMIN, MANAGER, SUPER_ADMIN)
- Backend: Java, Spring Boot, Spring Security, JWT
- Database: MySQL, Hibernate (JPA)
- Security: JWT Authentication, Password Encryption (BCrypt)
- API Documentation: Swagger
- Build Tool: Maven
git clone https://github.com/gyarsilalsolanki011/banking-app.git
cd banking-app
- Create a database in MySQL:
CREATE DATABASE banking_db;
- Update
application.properties
:
spring.datasource.url=jdbc:mysql://localhost:3306/banking_db
spring.datasource.username=root
spring.datasource.password=yourpassword
spring.jpa.hibernate.ddl-auto=update
mvn clean install
mvn spring-boot:run
Endpoint | Method | Description |
---|---|---|
/api/auth/register |
POST |
Register a new admin |
/api/auth/login |
POST |
Admin login & get JWT token |
Endpoint | Method | Description |
---|---|---|
/api/users/create |
POST |
create a new user |
/api/users/all-accounts/{id} |
GET |
Get all accounts by userId |
/api/users/{id} |
GET |
Get user details by userId |
/api/users/{id} |
DELETE |
Delete a user |
Endpoint | Method | Description |
---|---|---|
/api/accounts/create |
POST |
Create a new account |
/api/accounts/{id} |
GET |
Get account details by ID |
/api/accounts/{id} |
DELETE |
Delete an account |
Endpoint | Method | Description |
---|---|---|
/api/transactions/deposit/{id} |
POST |
Deposit money by accountId |
/api/transactions/withdraw/{id} |
POST |
Withdraw money by accountId |
/api/transactions/{id}/transfer/{id} |
POST |
Transfer funds accountId |
/api/transactions/account/{id} |
GET |
Get all transactions by accountId |
Endpoint | Method | Description |
---|---|---|
/api/admins/all-users |
GET |
Get all users |
/api/admins/all-accounts |
GET |
Get all accounts |
/api/admins/all-transactions |
GET |
Get all transactions |
/api/admins/{id} |
GET |
Get an admin by id |
/api/admins/delete/{id} |
GET |
delete admin by Id |
/api/admins/approve/{id} |
GET |
approve big withdrawals |
check out postman endpoints: Postman Collection
- This collection includes all the endpoints which are there in the banking app.
- Two endpoints are public and all the others are authenticated
- ADMIN: Full access to all functionalities.
- MANAGER: Can view and manage users and transactions.
- SUPER_ADMIN: Highest privileges with full control over the system.
Contributions are welcome! Follow these steps:
- Fork the repository
- Create a new branch (
feature-xyz
) - Commit your changes
- Push to the branch and open a Pull Request
This project is open-source under the MIT License.
For any queries, feel free to reach out:
- 📧 Email: gyarsilalsolanki011@gmail.com
- 🔗 LinkedIn: Your Profile
🚀 Happy Coding!