Skip to content

ayoremi8/Fraudx

Repository files navigation

Fraud Analytics and Bayesian Risk Decisioning Platform

A full-stack fraud analytics platform combining machine learning, Bayesian risk decisioning, and modern dashboards.

Tech Stack

  • Frontend: Next.js 14, TypeScript, TailwindCSS, Recharts
  • Backend: Node.js, Express, TypeScript
  • Data: BigQuery, Google Cloud Storage
  • ML: Vertex AI (training & serving), BigQuery ML
  • Risk Engine: Custom Bayesian module

Architecture

graph TD
    User([User]) -->|HTTPS| Frontend[Next.js Frontend]

    subgraph "Frontend Layer"
        Frontend
        Dash[Dashboards] -->|Visualizes| Metrics[KPIs & Metrics]
        RiskLab[Risk Lab] -->|Interactive| Sim[Simulation & Thresholds]
    end

    Frontend -->|API Requests| API[Backend API Node.js]

    subgraph "Backend Layer"
        API
        Bayesian[Bayesian Risk Engine]
        API <-->|Posterior & Cost| Bayesian
    end

    subgraph "Data & ML Infrastructure"
        BQ[(BigQuery)]
        Vertex[Vertex AI]
        GCS[(Google Cloud Storage)]
    end

    API -->|SQL Queries| BQ
    API -->|Prediction / GenAI| Vertex
    Vertex -->|Training Data| BQ
    Vertex -->|Artifacts| GCS
Loading

Project Structure

├── frontend/          # Next.js application
├── backend/           # Node.js API server
├── ml/                # ML training and deployment
│   ├── data_pipeline/ # Data ingestion and feature engineering
│   ├── notebooks/     # Exploratory analysis
│   ├── training/      # Model training scripts
│   ├── evaluation/    # Model evaluation
│   └── deployment/    # Vertex AI deployment
├── infrastructure/    # GCP setup scripts
└── docs/             # Documentation

Quick Start

Backend

cd backend
npm install
cp .env.example .env
# Edit .env with your GCP credentials
npm run dev

Frontend

cd frontend
npm install
cp .env.example .env.local
# Edit .env.local with your API URL
npm run dev

Features

  • ML Fraud Detection: XGBoost model trained on 6.3M transactions
  • Bayesian Risk Engine: Sophisticated probabilistic decisioning
  • Three Governance Modes: Strict, Balanced, Precision
  • Real-time Dashboards: KPIs, analyst queue, supervisor metrics
  • Risk Lab: Interactive threshold exploration and sequential testing
  • AI Insights: Vertex AI-powered narrative insights

Development Status

See task.md for detailed progress tracking.

License

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published