Overview
Fraud Radar scores streaming transactions for fraud risk in real time and visualizes the results on a live dashboard, modeled on how Stripe Radar actually works: a model score composed with a bounded rules layer into a decision, not just a raw anomaly threshold. Built solo, end to end, as a portfolio piece to prove a model can be taken out of a notebook and turned into a system.

Approach
Six Docker Compose services stream, score, and store transactions in real time: Redpanda (Kafka-API) for streaming, Postgres for storage, a producer replaying holdout transactions, a dedicated consumer process that scores each transaction and batches writes, a FastAPI backend, and a React/TypeScript dashboard. Rather than exposing a raw model score, decide(score, amount) composes it with a bounded ruleset into BLOCK / REVIEW / ALLOW — the same "ML plus policy" shape real fraud systems use. Models were trained on the Kaggle Credit Card Fraud dataset (284,807 transactions, 492 fraud, ~0.17% prevalence) with a time-ordered 80/20 split, and evaluated on PR-AUC / precision / recall / F1 given the severe class imbalance.
Features
- Real-time scoring pipeline over a Kafka-API (Redpanda) stream, with batched writes to keep burst-time throughput fast
- Model score composed with a bounded rules layer into BLOCK / REVIEW / ALLOW, not a raw anomaly threshold
- On-demand, per-transaction permutation-importance explainability for flagged (REVIEW/BLOCK) rows
- Live dashboard: real-time feed, charts, alert table, and a burst-demo control with a server-enforced cooldown
- Isolation Forest and autoencoder models compared on PR-AUC/precision/recall/F1 against a time-ordered holdout
- pytest + npm test coverage, with a Mermaid architecture diagram and recorded demo GIF in the README


