Skip to content

Sprint 01 Ledger Foundation

Tiana_ edited this page May 30, 2026 · 1 revision

Sprint 01 - Ledger Foundation (v0.1.0)

First sprint after documentation phase completes. Goal: ship the v0.1.0 release. Duration: 6 weeks (May 12 - June 23, 2026) Outcome: tag v0.1.0, public launch.

Sprint goal

Ship a working, tested, documented ledger service with sandbox bank, observability, and quickstart that gets a developer from git clone to "I posted my first transaction" in under 5 minutes.


Acceptance demo (the 5-minute quickstart that must work at end of sprint)

git clone https://github.com/tiana-code/fincore-engine
cd fincore-engine
docker compose up -d              # wait ~30 seconds
./scripts/demo.sh                  # creates accounts, posts transaction, verifies balance

# Output should show:
#   x Postgres ready
#   x Redpanda ready
#   x Keycloak ready
#   x Ledger Service ready
#   x Account A created (acc_01HX...)
#   x Account B created (acc_01HX...)
#   x Transaction posted (tx_01HX...)
#   x Account A balance: -100.00 EUR
#   x Account B balance:  100.00 EUR
#   x Time-travel balance at T-5s: 0.00 EUR (before posting)
#   x Reverse transaction: succeeded
#   x Final balances: 0.00 EUR each
#   x Idempotency check (post twice with same key): 1 transaction in DB
#
# Demo complete. Visit:
#   - Swagger UI:    http://localhost:8080/swagger-ui.html
#   - Grafana:       http://localhost:3000 (admin/admin)
#   - Keycloak:      http://localhost:8081 (admin/admin)

If this doesn't run cleanly on a fresh machine, the sprint is incomplete.


Week-by-week plan

Week 1 (May 12 - May 18) - Skeleton + Domain

Theme: Get the repo bootable. Domain layer ready.

Day Task Owner
Mon Repo skeleton: settings.gradle.kts, build.gradle.kts, gradle/libs.versions.toml, gradle wrapper Maintainer
Mon libs/fincore-core module: Money, Currency, AccountId, etc. Maintainer
Tue libs/fincore-events module: EventEnvelope, OutboxEvent Maintainer
Tue services/ledger module skeleton (Spring Boot 3.5 hello-world starts) Maintainer
Wed Liquibase changelog: schemas, base extensions Maintainer
Wed Liquibase changelog: ledger.accounts table Maintainer
Thu Domain layer: Account, Transaction, Entry classes with invariants Maintainer
Thu Domain unit tests Maintainer
Fri Liquibase: transactions, entries tables + indexes Maintainer
Fri The deferred trigger for SUM=0 invariant Maintainer
Sat Verify trigger works against direct JDBC inserts Maintainer

End-of-week milestone: Postgres up + ledger schema applied + domain tests green.

Week 2 (May 19 - May 25) - Application + Persistence

Theme: First real API call works.

Day Task
Mon JPA entities (AccountEntity, etc.) + repositories
Mon KSP + MapStruct mappers
Tue AccountServiceImpl (create, get, update)
Tue Account integration tests via Testcontainers
Wed account_balances materialized view + refresh
Wed BalanceServiceImpl + time-travel implementation
Thu TransactionServiceImpl.post
Thu First end-to-end test: post a transaction, verify balance
Fri TransactionServiceImpl.reverse
Fri Integration test for reverse

End-of-week milestone: post + reverse work end-to-end, balances correct.

Week 3 (May 26 - Jun 1) - REST API + Idempotency

Theme: Externally callable API.

Day Task
Mon DTO classes + Bean Validation
Mon AccountController (POST, GET, GET balance, GET entries, PATCH)
Tue TransactionController (POST, GET, POST reverse)
Tue GlobalExceptionHandler + RFC 7807
Wed IdempotencyService + IdempotencyFilter
Wed Idempotency integration tests (same key = same response)
Thu Idempotency concurrency test (100 threads, same key)
Thu Spring Security + Keycloak JWT validation
Fri Springdoc OpenAPI annotations matching api/openapi.yaml
Fri OpenAPI conformance test

End-of-week milestone: full REST API works, secured, idempotent.

Week 4 (Jun 2 - Jun 8) - Outbox + Observability

Theme: Eventing in place. Metrics flowing.

Day Task
Mon outbox_events table + OutboxEventPublisher
Mon Outbox dispatcher worker (SELECT FOR UPDATE SKIP LOCKED)
Tue Kafka producer setup (Redpanda)
Tue Outbox integration test (publish on commit)
Wed Crash recovery test (kill dispatcher mid-batch)
Wed Logback structured JSON + MDC
Thu Micrometer + Prometheus exporter
Thu Custom business metrics (ledger.transactions.posted.total etc.)
Fri OpenTelemetry tracing + auto-instrumentation
Fri Grafana dashboard JSON (Ledger overview)

End-of-week milestone: events flow to Kafka, metrics + traces visible in Grafana.

Week 5 (Jun 9 - Jun 15) - Sandbox + Property Tests + Concurrency

Theme: Hardening. Confidence under chaos.

Day Task
Mon SandboxBankAdapter (success/fail/delay scenarios)
Mon Seed data script
Tue Property test: invariant holds for any sequence of valid posts
Tue Property test: invalid posts always rejected
Wed Concurrency test: 100 posters × 50 transactions
Wed Performance test: 1000 tx/sec sustained
Thu Chaos test setup (Toxiproxy injection)
Thu Chaos test: bank timeouts, DB slow queries, Postgres restart mid-tx
Fri Bug fixes from chaos / property test findings
Fri Final coverage check (>= 90% domain, >= 70% overall)

End-of-week milestone: invariants verified under random and concurrent inputs.

Week 6 (Jun 16 - Jun 23) - Operations + Polish + Release

Theme: Ship.

Day Task
Mon Dockerfile (multi-stage, distroless)
Mon Build + push image to GHCR (test)
Tue Helm chart deploy/helm/fincore-engine/
Tue helm lint + helm template clean
Wed Health probes (liveness, readiness)
Wed Graceful shutdown + outbox drain
Thu scripts/demo.sh polish - must run cleanly
Thu README polish + quickstart
Fri Final integration smoke (docker compose up && demo.sh)
Fri Tag v0.1.0, release CI runs (Docker, Helm, GitHub Release)
Sat Hacker News post: "Show HN: FinCore Engine - open-source fintech core"

Definition of Done (per task)

  • Code merged to main via PR
  • Code review passed (self-review + 24h cooling period)
  • CI green: build, test, lint, security scans
  • Code coverage targets met
  • Documentation updated (Wiki page + Code-Rules link)
  • OpenAPI spec updated if API changed
  • Integration test if user-facing
  • Property test if invariant-related
  • No new deps without ADR
  • SPDX header on new files
  • No PII in logs
  • Performance regression checked

Definition of Done (sprint)

  • All week 1-6 milestones met
  • docker compose up && ./scripts/demo.sh works on fresh laptop
  • Tag v0.1.0 published
  • CI release pipeline green (Docker pushed, Helm packaged)
  • Hacker News post submitted
  • Demo video recorded (optional, stretch goal)

Risks for this sprint

Risk Mitigation
Underestimated time on infrastructure (KSP, MapStruct, Testcontainers wiring) Skip Week 5 stretch goals if behind
Trigger deferred constraint behaves differently than expected Prove out in Week 1 deliberately
Property tests too slow for CI Reduce iterations to 100 in PR mode, full 1000 nightly
Chaos tests reveal real bugs Schedule fix time in Week 5; scope-cut Week 6 if critical
Solo burnout Strict 40h/week ceiling; weekend off mandatory

After v0.1.0

  • Cool-down: 1 week (no new features, only critical fixes)
  • Sprint 02 starts July 1 - Epic-02 Payments + Epic-03 Event Bus + Epic-05 Decision Engine

GitHub project tracking

This sprint maps to GitHub Project "FinCore Engine Roadmap" with:

  • Milestone: v0.1.0 - Ledger Foundation
  • Iteration field: Sprint 01 (May 12 - Jun 23, 2026)
  • Tasks: each line above = GitHub Issue with effort (XS/S/M/L), priority (P0/P1/P2), area (ledger/infra/docs/sandbox/obs)
  • Views: Backlog, Current Sprint, By Component, Roadmap

See Dev-Guides§3 for git flow.


Related

Clone this wiki locally