Payflow is a transactional payments backend built using Java 25 and Spring Boot 4.x, designed to evolve from a baseline REST API into an enterprise-grade payment system with ACID guarantees, event-driven architecture, and observability.
The project is evolving through a phased implementation roadmap. See the full plan in Phased Roadmap.
| Phase | Description | Status |
|---|---|---|
| Phase 0 | Baseline REST API — User & Transaction CRUD with H2 in-memory storage | ✅ Complete |
| Phase 1 | Project hygiene — Spotless, Checkstyle, GitHub Actions CI | ✅ Complete |
| Phase 2 | Domain model hardening, DTO layer, validation, error handling | ⬜ Not Started |
| Phase 3+ | Concurrency control, Flyway, security, observability, and more | ⬜ Not Started |
- REST API: Basic CRUD endpoints for User registration and Transaction creation.
- Layered Architecture: Controller → Service → Repository pattern with Spring Data JPA.
- In-Memory Database: H2 with auto-generated schema for zero-dependency local development.
- Code Quality: Spotless (Eclipse formatter) + Checkstyle enforced at Maven
validatephase. - CI Pipeline: GitHub Actions workflow running
mvn clean verifyon push/PR tomain. - Actuator: Health, info, and metrics endpoints exposed.
The following features are planned and will be implemented across future phases:
- ACID transaction hardening with pessimistic locking and deadlock avoidance
- Balance ledger with double-entry bookkeeping for auditability
- DTO layer with input validation and RFC 7807 error responses
- PostgreSQL with Flyway-managed schema migrations
- Durable idempotency engine with SHA-256 payload hashing
- Transactional outbox pattern for reliable event streaming
- JWT authentication and authorization
- Resilience4j fault tolerance (rate limiting, retry, circuit breaker)
- Redis caching and distributed locking
- Kafka event streaming
- Structured logging with MDC trace correlation and Prometheus metrics
- Multi-stage Docker build with full-stack Docker Compose
- Kubernetes manifests with health probes and graceful shutdown
- Gen-AI spend insights with Spring AI
See System Architecture Guide for detailed design documentation.
| Doc | Description |
|---|---|
| 📘 System Architecture | Design patterns, concurrency control, observability |
| 🗓️ Phased Roadmap | Step-by-step evolution plan |
| 🌐 API Specification | Endpoints, payloads, validation rules, error formats |
| 📋 Conventions | Coding standards, Git workflow, testing rules |
| 📜 Architecture Decisions | Decision records with context and trade-offs |
- JDK 25 (Temurin recommended)
- Maven 3.9+
# Build and run tests
mvn clean verify
# Start locally (H2 in-memory, port 8080)
mvn spring-boot:run- H2 Console:
http://localhost:8080/h2-console- JDBC URL:
jdbc:h2:mem:payupidb - Credentials:
user/user
- JDBC URL:
docker-compose up --buildThis project is licensed under the MIT License — see the LICENSE file for details.