Demo
Demo coming soon. A one-minute walkthrough of Maks wallet will go here.
Until then, the code and the README are on GitHub.
What it does
Maks will be a wallet where users hold accounts with test money, top up and send money to each other, while an admin reviews risky transfers. No real payments are involved. Right now the backend has its first slice: registration, JWT login and GET /api/users/me, plus a status endpoint and a Money value object stored as whole minor units.
Architecture
The plan is a Spring Boot backend with a double-entry ledger, a separate FastAPI risk service, a React frontend and Docker, later deployed to AWS. The API is designed up front in docs/api-overview.md, and the token strategy and other choices are recorded as ADRs. Docker Compose creates separate databases and owners for the wallet and the risk service.
The hard part
For the thesis: when a transfer completes, other parts of the system must hear about it. Saving the transfer and publishing an event to Kafka can’t happen in one transaction, so a crash between them loses the event without any visible error. The Transactional Outbox pattern writes the event to an outbox table in the same transaction as the transfer, and a separate process publishes it. My thesis builds both versions and injects failures to measure how often each one loses events.
Already in the code: login always runs a BCrypt check, even for unknown emails, so response timing doesn’t reveal which emails are registered.
Decisions
- Double-entry ledger: every transfer is two balanced entries, so money can’t appear or vanish by mistake.
- Money as a
longof minor units, never a floating-point number. - Short-lived access tokens, with the refresh token designed for an HttpOnly cookie (ADR 0005).
Testing
40 test methods so far, including a race test for concurrent duplicate registration and repository tests on real PostgreSQL. CI runs Spotless formatting and a JaCoCo gate of 80% lines and 70% branches on every push.
Next
Accounts and the ledger, then transfers with idempotency keys, then the outbox and the thesis experiments.