This is a Spring Boot-based backend banking application that provides secure RESTful APIs for managing user accounts, cards, investments, and admin functionalities. It integrates JWT-based authentication, role-based access control, and follows a modular structure separating concerns across controllers, services, repositories, DTOs, and security layers.
- β JWT Authentication & Authorization
- π€ Role-based Access (Admin & Customer)
- πΌ Account Management
- π³ Card Services
- π Investment Tracking
- π§Ό DTO & Layered Architecture
- π Bootstrap Default Admin User on Startup
- π Get User by ID
- Admin can view users of all roles except other admins
- Customers can only view their own details
com.security.bank
βββ accounts
βββ admin
βββ cards
βββ config
βββ dto
βββ entity
βββ investments
βββ jwt
βββ repository
βββ Root
βββ security
βββ service
βββ user
βββ BankApplication.java
- Java 17+
- Maven
- MySQL or H2
- Postman for testing
git clone https://github.com/kumar9060/BankApp.git
cd BankApp
./mvnw spring-boot:runUse Postman or Swagger to test APIs (like /auth/login, /account/create, etc.)
Pull requests are welcome. For major changes, please open an issue first.
Made π» by Vikas Kumar