How auzzton/financial-fraud-detector works
This platform generates or receives transactions, scores them for fraud, persists outcomes, and streams updates to an analyst dashboard. The consumer combines velocity enrichment, threshold rules, and an ML prediction; high-risk outcomes can trigger alerts and blocking. Analysts label transactions and download reports, while a separate training workflow uses stored transactions and labels to register models that the consumer can load. README documents these capabilities; some endpoint and blocking details are only partially visible in the sampled consumer source, so uncertain internal wiring is omitted.
Main entry points: main.py FastAPI consumer · page.tsx Live dashboard · train.py Model training · enrichment.py User enrichment
Components 13
Transaction streaming
- Transaction producer
producer.py - Kafka topic
Fraud detection
- FastAPI consumer
consumer/main.py - User enrichment
consumer/enrichment.py - Risk scoring
consumer/scoring.py - Critical notifications
consumer/notifications.py
State and persistence
- Data models
consumer/models.py - PostgreSQL
- Redis counters
Model learning
- Model training
ml/train.py - MLflow registry
Analyst experience
- Live dashboard
frontend/src/app/page.tsx
Other components
- Fraud analyst
Connections 15
- Transaction producer → Kafka topic: publishes transactions
- Kafka topic → FastAPI consumer: delivers transactions
- FastAPI consumer → User enrichment: updates and reads counters
- User enrichment → Redis counters: reads/writes counters
- FastAPI consumer → Risk scoring: calculates risk
- FastAPI consumer → Critical notifications: dispatches critical alerts
- FastAPI consumer → Data models: uses sessions and records
- Data models → PostgreSQL: maps and connects
- FastAPI consumer → PostgreSQL: queries and persists
- Model training → PostgreSQL: loads transactions and labels
- Model training → MLflow registry: logs and registers models
- FastAPI consumer → MLflow registry: loads registered models
- FastAPI consumer → Live dashboard: streams alert updates
- Live dashboard → FastAPI consumer: submits labels and report requests
- Fraud analyst → Live dashboard: reviews and labels