Digital Wallet & Transaction Ledger Engine
A fintech wallet backend with double-entry ledger accounting, idempotency keys, pessimistic locking, and transaction + wallet state machines.

Personal Project
2026
Fintech / Backend
Spring Boot · MySQL JWT
Challenge
Fintech applications need bulletproof transaction handling — duplicate charges on retry, race conditions on concurrent transfers, and inconsistent balances are real production problems. The challenge was to build a wallet backend that handles all of these correctly from day one, using proper financial patterns.
Results
Built a fully functional fintech wallet backend implementing production-grade patterns — double-entry ledger, idempotency, pessimistic locking, and state machines — all as a first-year MCA student.
2
State machines implemented
✓
Idempotency safe
0
Balance inconsistencies


Process
Double-Entry Ledger: Every transfer creates paired debit and credit entries. Balance is always computed from aggregation — never stored directly — eliminating any possibility of balance drift.
Idempotency Keys: Implemented idempotency keys with unique DB constraint and cached response return to prevent duplicate charges on retry — a core fintech pattern used in production payment systems.
Pessimistic Locking: Used pessimistic locking on daily limit checks to prevent race conditions in concurrent transfer requests — ensures limits are never exceeded even under high load.
State Machines: Designed transaction state machine (INITIATED → PROCESSING → COMPLETED / FAILED / REVERSED) and wallet state machine (ACTIVE → FROZEN → CLOSED) with full actor audit logging.
Tech Stack: Java 17 · Spring Boot 3 · Spring Security · Spring Data JPA · MySQL · JWT · Swagger UI · Railwa
Conclusion
This project demonstrates real fintech engineering patterns — not just a basic wallet, but a system that handles the hard problems: duplicate prevention, concurrent access, and consistent balance computation. Every design decision maps to a real production concern.