This project is a high-performance REST API built to process financial transactions and compute real-time statistics based on the last 60 seconds.
Developed as part of Itaú backend engineering challenge, the system focuses on:
- Performance (in-memory processing)
- Clean architecture
- Thread safety
- Real-time computation
Este projeto é uma API REST de alta performance para processamento de transações financeiras e cálculo de estatísticas em tempo real com base nos últimos 60 segundos.
O foco foi:
- Performance (dados em memória)
- Código limpo
- Concorrência segura
- Cálculo em tempo real
- Java 17
- Spring Boot
- Maven
- JUnit / MockMvc
- ConcurrentLinkedDeque
Creates a new transaction
{
"valor": 100.0,
"dataHora": "2026-04-16T20:00:00-03:00"
}Responses:
201 Created→ Success422 Unprocessable Entity→ Invalid data400 Bad Request→ Malformed JSON
Clears all transactions
200 OK
Returns statistics from last 60 seconds
{
"count": 5,
"sum": 500.0,
"avg": 100.0,
"min": 50.0,
"max": 200.0
}./mvnw spring-boot:runApp runs at:
http://localhost:8080
./mvnw test- Controller → handles HTTP layer
- Service → business rules
- DTO → validation and transport
- Model → core data
- In-memory storage (no DB)
- O(n) filtering limited to 60 seconds
- Thread-safe structure (
ConcurrentLinkedDeque) - Zero I/O bottlenecks
- Global exception handler (
@RestControllerAdvice) - Proper HTTP status codes
- Clear error responses
Caíque
This project demonstrates the ability to design and implement a robust backend system under constraints, focusing on performance, clarity, and real-world engineering practices.