A banking API built with Spring Boot and Kotlin.
-
User Management
- User registration and authentication
- Email verification
- Password reset functionality
-
Account Management
- Personal account information
- Account status tracking
-
Transaction Management
- View transaction history
- Paginated transaction listings
-
Transfer Capabilities
- Money transfers between accounts
-
Customer Management
- Customer information handling
-
Request Processing
- Handle various banking requests
-
Backend
- Kotlin
- Spring Boot
- Spring Security
- Spring Data JPA
- PostgreSQL
- Thymeleaf
-
Build & Deployment
- Gradle
- Docker Compose
-
Testing
- JUnit 5
- TestContainers
- Spring Boot Test
- Mockito & MockK
- JDK 21
- Docker
- PostgreSQL (or use the provided Docker configuration)
-
Clone the repository:
git clone https://github.com/yourusername/hbank-api.git cd hbank-api -
Build the project:
./gradlew build -
Run with Docker Compose:
docker-compose upOr run locally:
./gradlew bootRun
The application uses Spring Boot's configuration system. Key configuration files:
application.propertiesorapplication.yml- Main configurationcompose.yaml- Docker Compose configuration
POST /api/v1/users/register- Register a new userPOST /api/v1/users/verify/email/send- Send verification emailPOST /api/v1/users/verify/email- Verify emailPOST /api/v1/users/password/forgot- Forgot passwordPOST /api/v1/users/password/reset- Reset password
GET /api/v1/accounts/personal- Get personal account information
POST /api/v1/transactions- Get paginated transaction history
The application implements Spring Security with OAuth2 for authentication and authorization. JWT tokens are used for maintaining user sessions.
Run tests with:
./gradlew test
./gradlew build
src
├── main
│ ├── kotlin
│ │ └── org
│ │ └── example
│ │ └── hbank
│ │ └── api
│ │ ├── config # Configuration classes
│ │ ├── controller # REST controllers
│ │ ├── mapper # Object mappers
│ │ ├── model # Data models
│ │ ├── repository # Data repositories
│ │ ├── request # Request DTOs
│ │ ├── response # Response DTOs
│ │ ├── service # Business logic
│ │ └── util # Utility classes
│ └── resources
│ ├── certificate # Security certificates
│ ├── database # Database scripts
│ ├── static # Static resources
│ └── templates # Thymeleaf templates
└── test
├── kotlin # Test classes
└── resources # Test resources
This project is licensed under the MIT License - see the LICENSE file for details.