FraudShield
FraudShield — Real-Time Fraud Detection Platform FraudShield is a fully containerized, production-grade fraud detection platform combining machine learning, real-time business rules, and microservices. Built with FastAPI, Docker, Scikit-learn, and Gradio, it delivers ultra-fast inference (<100ms), 98%+ accuracy on extreme fraud cases, and includes a full analytics dashboard.
Year
2024
Service
Web Design
Category
ML
Tool
Framer
FraudShield AI – Real-time Fraud Detection System
Concept:
A production-ready, Dockerized fraud detection system that uses machine learning and business rules to detect fraudulent transactions with high accuracy and low-latency inference.
Problem Solved:
Enables real-time fraud detection using an ensemble ML model, risk scoring, contextual business rules, and analytics dashboards. Helps reduce fraud losses and improves decision-making for financial systems.
Scope:
Input:
Transaction data (amount, balance, transaction count, location flags, card age, fraud history, etc.).Process:
A fully containerized microservice architecture:Frontend (Gradio UI):
User-facing interface for live predictions, analytics, and dashboards.Backend (FastAPI Server):
Handles prediction requests, business rules, analytics endpoints, and retraining.Machine Learning Engine:
Ensemble model (Random Forest + Logistic Regression) performing real-time inference with <50ms model latency.Business Rules Layer:
Additional fraud heuristics layered on top of model output.Health & Monitoring:
Auto-recovery, service discovery, and logging through Docker.
Output:
Real-time fraud predictions (<100ms), risk scores, classification levels (Low/Medium/High), dashboards, model analytics, and access to OpenAPI documentation.
Features:
98% accuracy on extreme fraud cases
Risk scoring + confidence levels
Real-time predictions
Feature importance visualization
Dashboard with transaction statistics
REST API with documented endpoints
Retraining endpoint
Health checks
Microservices with Docker Compose
Persistent storage through volumes
Tech Stack:
Backend: FastAPI
Frontend: Gradio
Machine Learning: Scikit-learn (Random Forest, Logistic Regression)
Data: CSV, Pandas, NumPy
Infrastructure: Docker, Docker Compose
Logs & Monitoring: FastAPI logging + container logs
Output: JSON, UI dashboard
Project Structure:
(High-level)
backend/— FastAPI app, ML models, database layerfrontend/— Gradio UImodels/— Saved ML modelsdata/— Training + live datadocker-compose.yml— Orchestration layerrequirements.txt— Dependencies
API Endpoints:
/predict— Single prediction/batch-predict— Batch predictions/train— Retrains the model/health— System health/model-info— Metadata + performance/feature-importance— Feature rankings/stats— Dashboard stats/transactions— Recent transactions
Performance Metrics:
<100ms API response
<50ms model inference
98% extreme fraud detection
2s UI load time
30s container startup
Achievements:
Fully Dockerized ML system
Stage-ready fraud detection workflow
Accurate ensemble model
Real-time API + analytics
Extendable microservice architecture
GitHub Repository:
https://github.com/Shodexco/fraud-detector
API Documentation:
http://localhost:8000/docs (local development)
Web Interface (UI):
http://localhost:7860 (local development)
Health Check:
http://localhost:8000/health (local development)




