Back to all projects

Maks wallet

A digital wallet backend with test money, and the base for my bachelor thesis on reliable event delivery.

Status
In progress. Registration, JWT login and the current-user endpoint are done
Tests
40 test methods, CI with format and coverage gates (80% lines, 70% branches)
Stack
Java 25, Spring Boot 4.1, Spring Security, PostgreSQL 17, Flyway, Testcontainers
Code on GitHub
one database transactionaccount A −10.00account B +10.00sum = 0outbox: transfer.completedKafka, later

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

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.