https://github.com/mizcausevic-dev/payment-event-ledger-eos
Kafka exactly-once payments backend with Outbox Pattern, Debezium CDC, and idempotency tracking.
https://github.com/mizcausevic-dev/payment-event-ledger-eos
backend cdc debezium event-driven exactly-once fintech idempotency java kafka outbox-pattern payments spring-boot
Last synced: 13 days ago
JSON representation
Kafka exactly-once payments backend with Outbox Pattern, Debezium CDC, and idempotency tracking.
- Host: GitHub
- URL: https://github.com/mizcausevic-dev/payment-event-ledger-eos
- Owner: mizcausevic-dev
- Created: 2026-05-12T05:30:51.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-28T01:05:40.000Z (17 days ago)
- Last Synced: 2026-05-28T03:08:36.008Z (17 days ago)
- Topics: backend, cdc, debezium, event-driven, exactly-once, fintech, idempotency, java, kafka, outbox-pattern, payments, spring-boot
- Language: Java
- Homepage: https://kineticgain.com/
- Size: 1.6 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Payment Event Ledger EOS
Exactly-once payments backend that demonstrates the **Outbox Pattern**, CDC alignment, consumer checkpointing, and idempotency tracking without making local startup painful.
> **What this repo proves**
>
> It is possible to make payment correctness, replay confidence, and dual-write discipline legible to operators instead of hiding them behind Kafka buzzwords.
## Why this repo is good
- It targets a real fintech/platform problem instead of another generic API.
- It shows how to talk about **payment correctness**, not just Kafka buzzwords.
- It makes the dual-write problem visible through a payment lane, durable outbox records, and checkpoint evidence.
- It runs immediately in local simulation mode, then layers in `docker-compose` assets for `Postgres + Redpanda + Debezium`.
## Screenshots




## What it includes
- Spring Boot 3.5 / Java 21 service
- Operator-style HTML control surface at `/`
- JSON APIs for summary, payments, outbox, and analysis
- Local-first sample ledger
- Idempotency claim tracking and duplicate-blocking demo
- Dockerfile and Docker Compose
- GitHub Actions CI
- Architecture notes in [docs/architecture.md](./docs/architecture.md)
## Local run
```powershell
cd payment-event-ledger-eos
$env:JAVA_HOME = "C:\Program Files\Microsoft\jdk-21.0.11.10-hotspot"
$env:Path = "$env:JAVA_HOME\bin;$env:Path"
.\mvnw.cmd spring-boot:run
```
Open:
- `http://127.0.0.1:4337/`
- `http://127.0.0.1:4337/verification`
- `http://127.0.0.1:4337/docs`
If the port is busy:
```powershell
$env:PORT = "4341"
.\mvnw.cmd spring-boot:run
```
## Verification
```powershell
.\mvnw.cmd test
.\mvnw.cmd package
```
Key routes:
- `GET /api/dashboard/summary`
- `GET /api/payments/pay_90842`
- `GET /api/outbox`
- `GET /api/eos-verification`
- `POST /api/payments/submit`
- `POST /api/analyze/payment`
## Example payment analysis
```json
POST /api/analyze/payment
{
"paymentId": "pay_90842"
}
```
Returns a `Stable`, `Watch`, or `Escalate` verdict plus the exact blockers still keeping the lane from broader rollout.
## Full event-stack assets
The app runs fine on its own, but the repo also ships with a fuller event-stack story:
```powershell
docker compose --profile event-stack up --build
```
That profile adds:
- `postgres`
- `redpanda`
- `debezium/connect`
## Repo anatomy
- [src/main/java/com/mizcausevic/paymenteventledgereos/controllers/PageController.java](./src/main/java/com/mizcausevic/paymenteventledgereos/controllers/PageController.java)
- [src/main/java/com/mizcausevic/paymenteventledgereos/controllers/LedgerController.java](./src/main/java/com/mizcausevic/paymenteventledgereos/controllers/LedgerController.java)
- [src/main/java/com/mizcausevic/paymenteventledgereos/services/LedgerService.java](./src/main/java/com/mizcausevic/paymenteventledgereos/services/LedgerService.java)
- [src/main/java/com/mizcausevic/paymenteventledgereos/data/SampleLedgerData.java](./src/main/java/com/mizcausevic/paymenteventledgereos/data/SampleLedgerData.java)
- [docker-compose.yml](./docker-compose.yml)
- [docs/architecture.md](./docs/architecture.md)