Loading repository data…
Loading repository data…
alexricardo02 / repository
(In progress) Production-grade REST API for personal finance tracking. Built with Spring Boot, PostgreSQL, Redis caching, JWT auth, rate limiting, and pagination.
A production-grade RESTful API for personal finance tracking, built with a focus on scalability, security, and performance. Goes beyond a simple CRUD — implements real-world backend engineering concepts including JWT authentication, Redis caching with per-user isolation, rate limiting, pagination, and a global exception handling strategy.
🌍 Live Frontend: expenses-incomes-frontend.vercel.app
Caching. Heavy read operations (monthly totals, date-range aggregations, category breakdowns) are cached in Redis with per-user key isolation. Any mutation for that user evicts only that user's cache entries via a non-blocking SCAN, never a global flush.
Currency conversion. Each income/expense stores both its original amount/currency and its converted amount in the user's primary currency, using the FX rate of its own transaction date. When a user changes their primary currency, the update publishes an event to RabbitMQ; a background listener recalculates the full transaction history using each transaction's original date, so past totals stay historically accurate instead of being skewed by today's rate.
Idempotency. Write endpoints accept an Idempotency-Key header. A unique DB constraint reserves the key atomically, so concurrent duplicate requests (e.g. a retried network call) return the original response instead of creating a duplicate record.
Exception handling. A single @ControllerAdvice converts every exception into a standardized error response with status, message, and timestamp.
| Layer | Technology |
|---|---|
| Framework | Java 17, Spring Boot 3 |
| Persistence | Spring Data JPA, Hibernate |
| Database | PostgreSQL |
| Cache | Redis |
| Messaging | RabbitMQ |
| Auth | JWT (jjwt), Spring Security |
| Rate limiting | Bucket4j |
| Resilience | Resilience4j (circuit breaker, retry) |
| Resend (HTTP API) | |
| Exports | Apache POI (Excel), Apache PDFBox (PDF) |
| Metrics | Micrometer + Prometheus |
| Validation | Jakarta Bean Validation |
| DevOps | Docker, Docker Compose |
| CI/CD | GitHub Actions (build, tests, license check, dependency vulnerability scan, secret scan, CodeQL) |
| Deployment | Render |
git clone https://github.com/alexricardo02/finance-tracker-backend.git
cd finance-tracker-backend
docker-compose up -d
This starts PostgreSQL, Redis, and RabbitMQ locally.
Copy src/main/resources/application.properties.example (or create application-local.properties) and set your database, Redis, RabbitMQ, JWT secret, and Resend API key. See docker-compose.yml for the local defaults each service expects.
mvn spring-boot:run
The API is available at http://localhost:8080.
mvn clean verify
Alex Brinckmann