BridgePay
A Klarna-style "Pay in 4" platform. A trained credit-risk model decides in real time whether to extend credit, the merchant is paid in full, and the platform collects the installments afterward.
Setup sheet
How the car is built, part by part- Power unit
- Java 21 and Spring Boot 4
- Chassis
- 7 independently deployable microservices behind Spring Cloud Gateway
- Bodywork
- Three Angular 21 apps with standalone components, signals and Tailwind
- Fuel system
- PostgreSQL with a schema per service, Flyway migrations and Redis
- Radio
- Kafka in KRaft mode, transactional outbox, idempotent consumers
- Strategy
- Logistic regression trained in scikit-learn, served through ONNX Runtime, AUC-ROC 0.82
- Safety
- Keycloak sign-in, and a circuit breaker on every external call
- Garage
- Docker images built by GitHub Actions, pushed to GHCR, running on k3s (ARM64)
Car layout
Frontend appServiceML or AI modelData storeExternal- Storefront to API Gateway
- Main app to API Gateway
- Main app to Keycloak, sign in
- API Gateway to Applicant service
- API Gateway to Application service
- API Gateway to Repayment reconciliation
- Application service to Credit risk engine, score
- Credit risk engine to Mock credit bureau
- Application service to Kafka event bus, outbox
- Kafka event bus to Repayment reconciliation
- Repayment reconciliation to Kafka event bus
- Kafka event bus to Notifications
- Repayment reconciliation to Paddle, installments
- Paddle to Repayment reconciliation, webhooks
Lap breakdown
- Sector 1, Architecture
Seven services, one gateway
Each service deploys on its own and owns its PostgreSQL schema. Spring Cloud Gateway handles routing, JWT validation, rate limiting and correlation IDs, so the services stay focused on the business flow.
- Sector 2, Data and AI
A model that explains itself
I trained a logistic regression on bureau-style features (AUC-ROC 0.82) and serve it through ONNX Runtime. Every decision stores per-feature contributions, which the ops review screen shows as an explanation chart.
- Sector 3, Delivery and integrations
Fails safe, never blind
Decisions and repayments travel over Kafka through a transactional outbox. Every external call has a circuit breaker, and any scoring failure sends the application to manual review. Paddle webhooks are verified, and failed events land in a retry queue.


