Skip to content

saad2134/FairLens

Repository files navigation

βš–οΈ FairLens – Enterprise-grade AI fairness auditing platform

🚨 "FairLens is a full-stack SaaS platform that enables teams to upload datasets and trained models, then receive comprehensive, interactive fairness audit reports. Built for production use with model-format agnosticism, audit versioning, and enterprise compliance features."

✨ Key Features

Feature Description
πŸ” Bias Heatmap D3-rendered visualization of feature Γ— protected attribute combinations with severity scoring
πŸ§ͺ What-if Simulator Interactive prediction playground with SHAP explanations
πŸ“Š Comprehensive Metrics Demographic Parity, Equal Opportunity, Disparate Impact, Equalized Odds
πŸ”Œ Model Agnostic Support for Pickle, ONNX, and external API endpoints
πŸ“œ Audit Versioning Complete audit trail with dataset/model hashes for compliance
πŸ“ˆ Drift Detection Track fairness metrics across audit history

πŸš€ Quick Start (Local)

# Clone the repository
git clone https://github.com/fairlens/fairlens.git
cd fairlens

# Start with Docker Compose (recommended)
docker-compose up -d

# Or run locally
# Backend
cd backend && pip install -r requirements.txt
uvicorn app.main:app --reload

# Frontend
cd frontend && npm install
npm run dev

πŸš€ Quick Deploy (100% Cloud - No Local Setup)

# 1. Install Firebase CLI
npm install -g firebase-tools

# 2. Login
firebase login

# 3. Create project at https://console.firebase.google.com
#    Enable: Authentication, Firestore, Storage, Hosting

# 4. Initialize
firebase init
#   Select: Hosting, Functions, Firestore, Storage

# 5. Build frontend
cd frontend && npm install && npm run build && cd ..

# 6. Deploy (uses free tier!)
firebase deploy

Done! Your app is live at https://your-project.web.app

See DEPLOY.md for detailed instructions.

Access the UI at http://localhost:5173

πŸ“– Documentation

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Frontend                                β”‚
β”‚   React 18 + TypeScript + Nextjs + TailwindCSS + Recharts + D3  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚ REST API + WebSocket
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Backend                                 β”‚
β”‚      FastAPI + SQLAlchemy + Celery + Redis                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Fairness Engine: fairlearn | AIF360 | SHAP | ONNX Runtime      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              Storage: PostgreSQL + S3/MinIO                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Available Packages

Package Description
@fairlens/ui React component library
@fairlens/sdk JavaScript SDK for API integration
fairlens-core Python fairness computation engine
fairlens-cli Command-line interface

πŸ”§ Tech Stack

Frontend

  • React 18 + TypeScript + Nextjs
  • TailwindCSS
  • Recharts (metrics visualization)
  • D3.js (bias heatmap)
  • Zustand (state management)
  • React Query (async data)

Backend

  • Python 3.11+
  • FastAPI
  • SQLAlchemy + PostgreSQL
  • Celery + Redis
  • fairlearn, AIF360, SHAP, ONNX Runtime

Infrastructure

  • Docker & Docker Compose
  • Nginx
  • AWS S3 / MinIO
  • GitHub Actions

☁️ Cloud Deploy (100% Free Tier)

For Google Solution Challenge 2026, FairLens can be deployed entirely on Google Cloud:

Service Free Tier Purpose
Firebase Hosting 1 GB Frontend
Firestore 20K reads/writes Database
Firebase Storage 5 GB File uploads
Cloud Functions 2M invocations API Backend
Gemini (Free) 15 RPM, 1M tokens AI Insights

Total Cost: $0

Cloud Architecture

Users β†’ Firebase Hosting (Next.js)
           ↓
    Cloud Functions (Python)
           ↓
    Firestore + Storage
           ↓
    Gemini API (AI Insights)

Quick Deploy

See DEPLOY.md for one-command deploy!

🀝 Contributing

We welcome contributions! Please see our Contributing Guide and Code of Conduct.

# Run development environment
docker-compose -f docker-compose.dev.yml up

# Run tests
npm run test        # Frontend
pytest              # Backend

# Format code
npm run format      # Frontend
black .             # Backend

πŸ”— Links

πŸ‘₯ Our Google Solution Challenge 2026 Hackathon Team (DevBandits)

DevBandits Banner
# Team Member Role GitHub Profile
1 Abdur Rahman Qasim 🎯 Team Lead πŸ”— FareedAhmedOwais
2 Fareed Ahmed Owais πŸ–ΌοΈ Frontend Developer πŸ”— Abdur-rahman-01
3 Mohammed Saad Uddin πŸš€ Full-stack + AI/ML Developer πŸ”— saad2134
4 Mohammed Abdul Rahman 🎨 UI/UX Designer πŸ”— saad2134

πŸ“Š Repo Stats

Repo Size Last Commit Open Issues Open PRs License Forks Stars Watchers Contributors Languages Top Language

⭐ Star History

Star History Chart

✍️ Endnote

Developed with πŸ’– for the Google Solution Challenge 2026 Hackathon (powered by Hack2Skill), with heartfelt thanks for the opportunity to build and innovate.


🏷 Tags

#WebApp #AI #FairnessAuditing #MachineLearning #NextJS #FastAPI #Python #TypeScript #Demo #React #TailwindCSS #BiasDetection #FairnessMetrics #EthicalAI #ResponsibleAI #GoogleCloud #Firebase #Gemini #CloudRun #AIFairness #DataScience #MLOps #OpenSource #SaaS #Enterprise #WebDevelopment

About

A full-stack SaaS-grade web app where teams upload a dataset + trained model (or plug in an API endpoint) and receive a comprehensive, interactive fairness audit report. Built to be genuinely enterprise-usable, not a toy.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors