Senior Java Developer Hands-On Exercise
Objective:
Build a simplified Banking REST API using Java and Spring Boot.
Functional Requirements:
1. User Registration & Login
- Users can sign up with a username and password.
- Users can log in and receive a JWT token.
2. Account Operations
- Each user has a single account with a balance.
- Users can:
- View their account balance.
- Transfer money to another user's account.
- View a paginated list of past transactions.
3. Transaction Model
- Each transfer should create two entries:
- Debit from sender
- Credit to receiver
- Timestamp, amount, sender/receiver info, and status should be stored.
Technical Requirements:
- Java 17+
- Spring Boot (Spring Security, Spring Data JPA)
- H2 or PostgreSQL
Senior Java Developer Hands-On Exercise
- JWT-based authentication
- Unit tests (JUnit 5, Mockito)
- Clean modular architecture
- Swagger/OpenAPI (optional)
Bonus Points:
- Use MapStruct or manual DTO mappers
- Transactional consistency and error handling
- API rate-limiting (e.g., Bucket4j)
- Dockerize the application
Deliverables:
- GitHub repo or zipped project folder
- [Link] with:
- How to run the project
- API endpoints
- Test coverage info
Example API Endpoints:
POST /api/auth/register
POST /api/auth/login
GET /api/account/balance
POST /api/account/transfer
GET /api/account/transactions?page=0&size=10