In progress
Mini Banking Transaction System
A Spring Boot banking core that models account transfers as first-class transactions. The focus is correctness under concurrency: two users cannot double-spend the same balance, and competing updates fail safely instead of silently overwriting each other.
- Java
- Spring Boot
- Spring Data JPA
- PostgreSQL
Highlights
- Optimistic locking with JPA @Version so stale writes are rejected instead of overwriting committed balances.
- Pessimistic locking via SELECT FOR UPDATE on the rows that participate in a transfer.
- Deadlock prevention by locking accounts in a deterministic order before mutating balances.
- Service-layer @Transactional boundaries so debit and credit commit as a single atomic unit.
- PostgreSQL as the source of truth for accounts, ledgers, and transaction history.