🛡️ FraudShield
Real-time fraud detection for online banking, powered by behavioral telemetry.
FraudShield combines classic transaction checks with session-level behavior signals to catch suspicious transfers earlier and give analysts clearer triage context.
Built with railtracks.
💡 Project Inspiration
Traditional fraud checks are often transaction-only (amount limits, destination checks, velocity). That leaves a gap: account takeover and automated abuse can look "normal" transaction-wise but still behave abnormally at the session level.
This project was motivated by the idea that fraud can be detected earlier by combining:
- transaction context (amount, destination novelty, velocity), and
- interaction behavior (navigation patterns, correction bursts, hesitation timing, mouse movement signals).
Why it matters in generative AI:
- AI can help interpret noisy, multi-signal behavior patterns and improve analyst decision support.
- Human analysts still stay in the loop with explainable factors, alerts, and case workflows.
🧱 Technology Stack
Languages
- TypeScript
- JavaScript
- Python
- CSS
Frameworks and Libraries
- Next.js (App Router)
- React
- Tailwind CSS
- MongoDB Node.js Driver
- Playwright (concurrent behavioral harness)
- Zustand (bank app state)
- Railtracks (validation orchestration)
Platforms
- MongoDB
- HuggingFace OpenAI-compatible inference endpoint (optional AI co-assessment with
gpt-oss-120b) - Localhost deployment for both apps (
3000and3001)
Tools
- Node.js / npm
- Python / pip
- Git / GitHub
🚀 Product Summary
FraudShield simulates a full fraud detection loop:
- A user performs banking actions in the
bankerapp. - Behavioral telemetry is captured and persisted.
fraudshieldscores sessions using rules and optional AI co-assessment.- Analysts review live sessions, alerts, and cases.
User experience:
- Customers interact with a realistic, synthetic banking flow in
banker(accounts, transfer, activity). - Analysts use
fraudshieldto monitor sessions, inspect reason codes, triage alerts, and escalate cases quickly. - The dashboard emphasizes explainability so decisions are not based on opaque scores alone.
Core features:
- Real-time risk scoring by session
- Alert severity tiers (
Low,Medium,High) with reason codes - Case workflow (
Open,Investigating,Resolved) - Session drill-down with event timeline and top risk factors
- Concurrent validation harness (up to 50 agents)
- Run-scoped model comparison (
rules-onlyvsrules+AI) for precision/recall/F1 and false-positive deltas
Innovative angle:
- It blends transaction risk + behavior signals in one pipeline.
- It supports explainable analyst workflows instead of black-box-only scoring.
🧭 Two Apps, One Flow
| App | Port | Role |
|---|---|---|
banker |
3000 |
Synthetic banking client that generates transfer sessions + telemetry |
fraudshield |
3001 |
Analyst dashboard for scoring, alerts, and case workflow |
📂 Repository Structure
banker/
app/
components/
lib/
testing/session-harness/
simulate-session-batch.js
README.md
fraudshield/
app/
components/
lib/fraud/
testing/railtracks/
run_ab_validation.py
⚙️ Setup
Prerequisites
- Node.js 20+
- npm
- Python 3.10+
- MongoDB reachable by both apps
Install
cd banker
npm install
cd ../fraudshield
npm install
cd ..
pip install -r requirements.txt
Environment
Create:
banker/.env(or.env.local)fraudshield/.env
Minimum shared settings:
MONGODB_URI=mongodb://localhost:27017/
MONGODB_DB=northmaple_bank_demo
Optional FraudShield AI settings:
FRAUD_AI_ENABLED=true
FRAUD_AI_BASE_URL=haha nice try find ur own
FRAUD_AI_MODEL=openai/gpt-oss-120b
FRAUD_AI_API_KEY=haha nice try find ur own
▶️ Run Locally
Terminal 1:
cd banker
npm run dev
Terminal 2:
cd fraudshield
npm run dev
Open:
- Bank UI:
http://localhost:3000 - Fraud Dashboard:
http://localhost:3001/dashboard
🧪 Validation and Testing
50-Agent Concurrent Validation
From banker/:
node testing/session-harness/simulate-session-batch.js --phase=scale50 --capture=sample
Artifacts generated at runtime:
banker/testing/session-harness/latest/report.jsonbanker/testing/session-harness/latest/*.webmbanker/testing/session-harness/latest/*-activity.png
Verify Uplift for a Specific Run
Use:
http://localhost:3001/api/fraud/metrics?testRunId=<runId-from-report>
Key fields:
comparison.uplift.f1Deltacomparison.uplift.precisionDeltacomparison.uplift.falsePositiveRateDeltacomparison.aiAssessedSessions
Railtracks Runner
From repo root:
python testing/railtracks/run_ab_validation.py --phase=scale50 --total=50 --concurrency=10
Output:
testing/railtracks/latest-ab-summary.json
🤖 AI Use
Survey answer: Yes. More than 70% of implementation and iteration work was AI-assisted.
Built With
- css3
- huggingface
- javascript
- mongodb
- next.js
- node.js
- playwright
- python
- railtracks
- react
- tailwindcss
- typescript
- zustand
Log in or sign up for Devpost to join the conversation.