Skip to content

v0.2.0 — MVP

Choose a tag to compare

@AlexGeryavenko AlexGeryavenko released this 13 Feb 04:50
· 24 commits to main since this release
86ffc19

v0.2.0 — MVP

Highlights

MVP payment gateway with full observability, resilience patterns, build-time quality enforcement, and API versioning.

What's Changed

Observability

  • Structured logging — JSON-formatted logs with correlation IDs and PCI-compliant masking ([PAYGATE-13])
  • Business metrics — payment_processed_total counter by status, bank_authorization_duration_seconds histogram ([PAYGATE-13])
  • Docker support — Dockerfile and docker-compose.yml with 6 services ([PAYGATE-13])
  • Monitoring stack — Prometheus, Grafana, and Tempo with pre-provisioned dashboards (Application, Business, Infrastructure, Alerts) ([PAYGATE-14])
  • Alerting — 5 Prometheus alert rules (HighBankErrorRate, HighRejectionRate, HighLatency, HighErrorRate, HighHeapUsage) routed through Alertmanager ([PAYGATE-15])

Resilience

  • Circuit breaker — Resilience4j bankClient instance; opens on configurable failure rate, returns 502 with structured error ([PAYGATE-16])
  • Rate limiting — Bucket4j per-IP token-bucket filter with separate GET/POST limits; returns 429 with Retry-After header ([PAYGATE-16])

Configuration & Quality

  • Externalized config — All settings driven by .env via spring-dotenv (23 variables across 8 categories) ([PAYGATE-17])
  • Quality gates — ./gradlew check enforces JaCoCo >= 80% line coverage, Google Java Style (Checkstyle), and SpotBugs + FindSecBugs ([PAYGATE-18])

Bug Fixes

  • API path versioning — Controller and rate limit filter now serve /v1/payment matching the OpenAPI spec ([PAYGATE-19])

Documentation

  • README rewrite — Services table, full configuration reference, resilience, monitoring, dashboards, and alerting sections ([PAYGATE-19])

Changelog

Task Type Description
PAYGATE-13 feat Add structured logging, metrics, and Docker support
PAYGATE-14 feat Add Prometheus, Tempo, and Grafana observability stack
PAYGATE-15 feat Add Prometheus alerting rules and Alertmanager
PAYGATE-16 feat Add circuit breaker and per-IP rate limiting
PAYGATE-17 chore Externalize config with spring-dotenv and .env
PAYGATE-18 feat Add build-time quality gates
PAYGATE-19 docs Update README and fix API path versioning

Services

Service Image Port(s)
payment-gateway (local build) 8090
bank_simulator bbyars/mountebank:2.8.1 8080, 2525
prometheus prom/prometheus:v2.48.0 9090
grafana grafana/grafana:10.2.2 3000
tempo grafana/tempo:2.3.1 3200, 4317, 4318
alertmanager prom/alertmanager:v0.26.0 9093

API Endpoints

Method Path Success Error
POST /v1/payment 200 400, 429, 502
GET /v1/payment/{id} 200 404, 429