Skip to content

Repository files navigation

🏦 FinStream!

Enterprise Banking & Loan Platform

A resilient, event-driven core banking microservices backend and administrative control panel β€” demonstrating production-grade enterprise integration patterns, workflow orchestration, and fault-tolerant telemetry.

Java Spring Boot Camunda Apache Kafka Resilience4j PostgreSQL Elasticsearch Docker React TypeScript Tailwind CSS Vite Maven

License PRs Welcome Status


πŸ“– Overview

FinStream is a reference implementation of a resilient, event-driven core banking microservices backend paired with an administrative compliance control tower. It's built to demonstrate production-ready patterns for enterprise financial systems: enterprise integration patterns (EIP), workflow orchestration via Camunda 8, circuit-breaker fault tolerance, and Kafka-based dead-letter recovery β€” all observable in real time through a live dashboard.

Rather than just describing these patterns, FinStream ships with two interactive resiliency simulations (circuit breaker trip + DLQ recovery) so you can watch the system degrade gracefully and self-heal, end to end.

Screenshot 2026-07-15 at 2 18 58β€―PM

πŸ—οΈ System Architecture

                                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                   β”‚   Compliance Control       β”‚
                                   β”‚   Tower (React + Vite)      β”‚
                                   β”‚   :5173                     β”‚
                                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                  β”‚ REST
                                                  β–Ό
                                   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                   β”‚      API Gateway            β”‚
                                   β”‚         :8080                β”‚
                                   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β–Ό                        β–Ό                       β–Ό
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚ Account Management       β”‚  β”‚  Loan Workflow Service    β”‚  β”‚ Notification & Audit     β”‚
          β”‚ Service Β· :8083           β”‚  β”‚  Service Β· :8081           β”‚  β”‚ Service Β· :8082           β”‚
          β”‚ (Balances, KYC)            β”‚  β”‚ (Camunda 8 / Zeebe,         β”‚  β”‚ (Kafka consumer,           β”‚
          β”‚ PostgreSQL                  β”‚  β”‚  Resilience4j Circuit       β”‚  β”‚  DLQ routing)               β”‚
          β”‚                              β”‚  β”‚  Breaker, Credit Bureau)    β”‚  β”‚                              β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                    β”‚ publishes events               β”‚ consumes
                                                    β–Ό                                β”‚
                                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
                                       β”‚      Apache Kafka           β”‚β—€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚   (+ Zookeeper coord.)       β”‚
                                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                      β–Ό
                                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                       β”‚   loan-audit-stream.DLT    β”‚
                                       β”‚   (Dead Letter Queue)       β”‚
                                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧩 Microservices Directory

Service Port Responsibility
πŸšͺ api-gateway 8080 Routes external requests to backing modules
πŸ‘€ account-management-service 8083 Manages account balances & KYC status (PostgreSQL)
πŸ’³ loan-workflow-service 8081 Embeds Camunda 8 (Zeebe); executes Credit Bureau calls behind Resilience4j Circuit Breakers; publishes transaction events to Kafka
πŸ”” notification-audit-service 8082 Consumes transactional streams from Kafka; routes exceptions to a Dead Letter Queue (DLQ)
πŸ›‘οΈ compliance-control-tower 5173 Vite + React + TypeScript + Tailwind CSS v4 administrative dashboard

πŸ› οΈ Tech Stack

Layer Technologies
Backend Java 21 Β· Spring Boot 3.3.x (Spring Web, Spring Data JPA, Spring AOP) Β· Camunda 8 (Zeebe) Β· Spring Kafka Β· Resilience4j Β· Maven
Frontend React.js Β· TypeScript Β· Tailwind CSS v4 Β· Vite Β· Lucide React
Databases & Infra PostgreSQL 16 Β· Apache Kafka Β· Elasticsearch Β· Zookeeper Β· Docker Compose

πŸš€ Run Guide

Prerequisites

  • Java JDK 21
  • Maven 3.9+
  • Node.js 18+ & npm
  • Docker Desktop

Step 1 β€” Spin Up Infrastructure

Stand up PostgreSQL, Kafka brokers, and Zeebe containers from the project root:

docker compose up -d

Step 2 β€” Compile & Run Backend Services

Build all submodules from the parent directory:

# Compile and run unit tests
mvn clean test

# Package JARs
mvn clean package -DskipTests

Then run each Spring Boot microservice in its own terminal:

# Terminal 1: Account Service
cd account-management-service && mvn spring-boot:run

# Terminal 2: Loan Service
cd loan-workflow-service && mvn spring-boot:run

# Terminal 3: Audit Service
cd notification-audit-service && mvn spring-boot:run

# Terminal 4: API Gateway Router
cd api-gateway && mvn spring-boot:run

Step 3 β€” Run the Dashboard UI

cd compliance-control-tower
npm install
npm run dev

Navigate to http://localhost:5173 (or 5174 if 5173 is occupied).


πŸ§ͺ Resiliency Scenarios to Test

πŸ”΄ Scenario A β€” Resilience4j Circuit Breaker Trip

Step Action
1 Open the dashboard β€” the Circuit Breaker telemetry indicator reads CLOSED (healthy)
2 Inject a new transaction β€” the system queries the external Bureau API and completes successfully
3 Toggle "Simulate Circuit Failover" to degrade downstream service health
4 The Circuit Breaker badge trips to OPEN β€” FAILOVER ACTIVE
5 Submit a new application β€” the service intercepts the call and runs the fallback scorer, safely defaulting the applicant's rating to 600 to prevent risk leakage

🟑 Scenario B β€” Kafka Dead Letter Queue (DLQ) Recovery

Step Action
1 In the simulator panel, set the customer Account ID to "poison-pill"
2 Submit the transaction
3 The serializer aspect intercepts the value and throws a parsing exception
4 Instead of blocking processing threads, notification-audit-service isolates the payload and routes it to the loan-audit-stream.DLT topic, safely committing the offset

These two scenarios demonstrate graceful degradation (fail-safe defaults over hard failure) and fault isolation (poison messages don't block the pipeline) β€” two of the core resiliency guarantees the platform is built around.


🧠 Engineering Patterns Demonstrated

  • Circuit Breaker Pattern (Resilience4j) β€” prevents cascading failure when the external Credit Bureau API degrades
  • Dead Letter Queue Pattern (Kafka) β€” isolates malformed/poison messages without halting stream processing
  • Workflow Orchestration (Camunda 8 / Zeebe) β€” models the loan approval process as an explicit, observable BPMN workflow
  • Event-Driven Architecture (Kafka) β€” decouples transaction publishing (loan service) from consumption (audit service)
  • API Gateway Pattern β€” single entry point routing to independently deployable microservices
  • Aspect-Oriented Programming (Spring AOP) β€” cross-cutting concerns like serialization interception

πŸ—ΊοΈ Roadmap

  • Distributed tracing across services (OpenTelemetry)
  • Centralized log aggregation via Elasticsearch + Kibana
  • Authentication/authorization layer for the API Gateway (OAuth2 / Keycloak)
  • Kubernetes deployment manifests as an alternative to Docker Compose
  • Automated chaos-testing suite for additional resiliency scenarios

⚠️ Disclaimer

FinStream is a reference / educational implementation built to demonstrate enterprise banking architecture patterns. It is not a production financial system and should not be used to process real financial transactions or real customer data.


🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


Built with 🏦 and a genuine appreciation for graceful degradation.

About

An enterprise core banking and loan platform reference stack. Features Spring Boot 3.x microservices, Java 21, API Edge routing, Camunda 8 Zeebe workflow orchestration, Apache Kafka event auditing with DLQ error recovery, Resilience4j Circuit Breakers

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages