← All projects

Personal · 2026-07

Indonesian Banking Fraud Detection Dashboard

A real-time fraud detection pipeline for Indonesian banking transactions: a Python generator streams IDR transactions into Kafka, Spark Structured Streaming flags suspicious ones, Airflow and dbt build the marts in PostgreSQL, and a Streamlit dashboard shows the alerts. Runs fully locally with Docker Compose.

KafkaSpark StreamingAirflowdbtPostgreSQLMinIOStreamlitDocker
Indonesian Banking Fraud Detection Dashboard architecture

A self-initiated streaming project that mirrors the shape of a real bank data platform, using synthetic transactions only: no real customer data is involved.

Architecture

Transaction generator (Python, ~2 txn/sec in IDR)
  -> Kafka (financial.transactions)
       -> Spark Structured Streaming (fraud rules) -> PostgreSQL
       -> Airflow (batch aggregations, dbt runs)
  PostgreSQL -> dbt (staging -> marts) -> Streamlit dashboard

Fraud rules

  • RULE_001: single transaction above Rp 100,000,000.
  • RULE_002: rapid succession, 5 or more transactions within 5 minutes (batch and dbt).
  • RULE_003: round-amount structuring, above Rp 50,000,000 and a multiple of Rp 5,000,000.
  • RULE_004: ATM withdrawal above the Rp 15,000,000 limit.

What it shows

Streaming and batch side by side: Spark flags events as they arrive, while Airflow-scheduled dbt models build staging and mart tables (fraud alerts, daily account summary, customer risk profile). The stack is containerised with Docker Compose (Kafka, Spark master with two workers, MinIO, PostgreSQL, Airflow, dbt, Streamlit) and covered by pytest tests for the generator and the rules.