Skip to content

Muaaz2007/floss-aee

Repository files navigation

FLUSSO - Medical Bill Verification Platform πŸ₯

FLUSSO Banner

Verify medical bills against DHA/DoH guidelines instantly using AI-powered compliance checking for Dubai & UAE healthcare providers

MIT License Node.js React Next.js Groq API Supabase Status


πŸ“‹ Table of Contents


✨ Features

πŸ€– AI-Powered Medical Bill Analysis

  • Instant OCR: Extract patient, provider, doctor, amount, and procedure data from bills
  • DHA/DoH Compliance: Verify bills against Dubai Health Authority and Department of Health guidelines
  • Compliance Score: Get 0-10 score indicating billing accuracy and guideline compliance
  • Issues Detection: Flag potential overbilling, upcoding, or medical necessity violations

πŸ’¬ Elyza AI Assistant

  • Smart Chatbot: Ask questions about your claim and get instant answers
  • Context-Aware: Elyza understands your specific bill and compliance score
  • Guidance: Get step-by-step help with billing questions, disputes, and appeals
  • Voice Support: [Coming Soon] Speak to Elyza and hear responses

πŸ“Š Claims Management

  • Upload History: View all submitted medical bills
  • Detailed Results: See extracted data, compliance findings, and recommendations
  • Export Reports: Download audit reports for insurance claims
  • Status Tracking: Monitor bill verification status (PASS/FLAGGED)

πŸ‘€ User Profiles

  • Secure Accounts: Sign up with email/password
  • Profile Management: Update name, email, and profile picture
  • Claim History: Access all past verifications
  • Personal Dashboard: See statistics (claims verified, total savings, success rate)

πŸ“± Responsive Design

  • Mobile-First: Works perfectly on phones, tablets, desktops
  • Modern UI: Clean, intuitive interface built with Tailwind CSS
  • Dark Mode: [Coming Soon] Eye-friendly dark theme

πŸ—οΈ Tech Stack

Frontend

  • React 18 - UI framework
  • Next.js 14 - Full-stack framework with SSR
  • Tailwind CSS - Utility-first CSS framework
  • v0.dev - AI-assisted component generation
  • Axios - HTTP client
  • TypeScript - Type safety

Backend

  • Node.js 18+ - Runtime
  • Express.js 4 - Web framework
  • JWT - Authentication tokens
  • bcrypt - Password hashing

AI/ML Services

  • Groq API - Fast LLM for OCR, chat, compliance checking
    • llama-3.1-70b-versatile - Vision + Text model
  • Comet ML - Experiment tracking & logging

Database & Storage

  • Supabase - PostgreSQL database
  • Supabase Storage - File storage for images
  • PostgREST - Auto-generated REST API

DevOps & Deployment

  • Vercel - Frontend hosting
  • Docker - Containerization [Optional]
  • GitHub - Version control

πŸ›οΈ Architecture

System Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   FLUSSO FRONTEND (React + Next.js)                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚ Auth    β”‚Dashboard β”‚ Upload   β”‚History  β”‚Profile     β”‚  Chatbot  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ HTTPS REST API
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 BACKEND (Express.js + Node.js)                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”             β”‚
β”‚  β”‚ Auth     β”‚ Upload β”‚ Chat    β”‚ Claims  β”‚ Profile    β”‚             β”‚
β”‚  β”‚ Routes   β”‚ Routes β”‚ Routes  β”‚ Routes  β”‚ Routes     β”‚             β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜             β”‚
β”‚                  ↓↓↓                                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚  β”‚ Groq API β”‚ Comet ML      β”‚ Supabase           β”‚                  β”‚
β”‚  β”‚ (OCR)    β”‚ (Logging)     β”‚ (Database)         β”‚                  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

  1. Bill Upload β†’ OCR Extraction β†’ Compliance Check β†’ Results Display
  2. Chat β†’ Context Fetch β†’ Groq Response β†’ Database Storage β†’ User Display
  3. Profile β†’ Form Edit β†’ Validation β†’ Database Update β†’ Confirmation

Complete Documentation


πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

5-Minute Setup

# 1. Clone repository
git clone https://github.com/yourusername/flusso.git
cd flusso

# 2. Install dependencies
npm install

# 3. Create environment file
cp .env.example .env.local

# 4. Fill environment variables (see Configuration section)

# 5. Start development server
npm run dev

# 6. Open browser
# Frontend: http://localhost:3000
# Backend: http://localhost:5000

πŸ“¦ Installation

Full Installation Guide

Step 1: Clone Repository

git clone https://github.com/yourusername/flusso.git
cd flusso

Step 2: Install Dependencies

# Frontend & Backend dependencies
npm install

# Or with yarn
yarn install

Step 3: Install Specific Packages

# Core dependencies
npm install react@18 next@14 express@4 axios

# AI/ML services
npm install groq-sdk comet-ml

# Database
npm install @supabase/supabase-js

# Security
npm install jsonwebtoken bcrypt

# Environment variables
npm install dotenv

# Development
npm install --save-dev typescript @types/node eslint

Step 4: Create Directories

mkdir -p src/components src/pages src/styles
mkdir -p server/routes server/middleware server/services
mkdir -p docs

Step 5: Initialize Database

# Create Supabase account at https://supabase.com
# Run migrations (see Configuration section)
npm run migrate

πŸ”‘ Configuration

Environment Variables

Create .env.local file in project root:

# Frontend Config
NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_SUPABASE_URL=https://YOUR-PROJECT.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=YOUR-ANON-KEY

# Backend Config
GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
COMET_API_KEY=your_comet_api_key_here
COMET_PROJECT_NAME=flusso-medical-verification
COMET_WORKSPACE=your_workspace_name

# Supabase
SUPABASE_SERVICE_ROLE_KEY=YOUR-SERVICE-ROLE-KEY
SUPABASE_DB_PASSWORD=YOUR-DB-PASSWORD

# JWT Secret
JWT_SECRET=your-super-secret-jwt-key-change-this

# Server
PORT=5000
NODE_ENV=development

Getting API Keys

Groq API:

  1. Visit console.groq.com
  2. Sign up / Login
  3. Generate API key in Settings
  4. Copy to GROQ_API_KEY

Comet ML:

  1. Visit comet.com
  2. Create workspace
  3. Get API key from Settings
  4. Copy to COMET_API_KEY

Supabase:

  1. Visit supabase.com
  2. Create new project
  3. Copy URL and Anon Key
  4. Create tables using SQL migrations

Database Setup

Create Users Table:

CREATE TABLE users (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  full_name TEXT NOT NULL,
  email TEXT UNIQUE NOT NULL,
  password_hash TEXT NOT NULL,
  profile_picture TEXT,
  created_at TIMESTAMP DEFAULT NOW(),
  updated_at TIMESTAMP DEFAULT NOW()
);

Create Claims Table:

CREATE TABLE claims (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  user_id UUID NOT NULL REFERENCES users(id),
  patient_name TEXT NOT NULL,
  provider_name TEXT NOT NULL,
  doctor_name TEXT,
  department TEXT,
  claim_date DATE,
  amount DECIMAL(10, 2),
  services JSONB,
  icd10_codes TEXT[],
  cpt_codes TEXT[],
  compliance_score INTEGER,
  status TEXT CHECK (status IN ('PASS', 'FLAGGED')),
  analysis_details JSONB,
  image_url TEXT,
  created_at TIMESTAMP DEFAULT NOW(),
  updated_at TIMESTAMP DEFAULT NOW()
);

Create Chat Messages Table:

CREATE TABLE chat_messages (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  claim_id UUID NOT NULL REFERENCES claims(id),
  user_id UUID NOT NULL REFERENCES users(id),
  role TEXT CHECK (role IN ('user', 'assistant')),
  content TEXT NOT NULL,
  created_at TIMESTAMP DEFAULT NOW()
);

πŸ“ Project Structure

flusso/
β”œβ”€β”€ app/                          # Frontend (Next.js)
β”‚   β”œβ”€β”€ auth/                     # Authentication pages
β”‚   β”‚   └── page.jsx
β”‚   β”œβ”€β”€ dashboard/                # Dashboard
β”‚   β”‚   └── page.jsx
β”‚   β”œβ”€β”€ upload/                   # Bill upload
β”‚   β”‚   └── page.jsx
β”‚   β”œβ”€β”€ results/[claimId]/        # Results page
β”‚   β”‚   └── page.jsx
β”‚   β”œβ”€β”€ profile/                  # Profile settings
β”‚   β”‚   └── page.jsx
β”‚   β”œβ”€β”€ history/                  # Claims history
β”‚   β”‚   └── page.jsx
β”‚   β”œβ”€β”€ help/                     # Help & FAQs
β”‚   β”‚   └── page.jsx
β”‚   β”œβ”€β”€ layout.jsx                # Root layout
β”‚   └── page.jsx                  # Home page
β”‚
β”œβ”€β”€ components/                   # Reusable components
β”‚   β”œβ”€β”€ Chatbot.jsx               # Elyza chatbot
β”‚   β”œβ”€β”€ Navbar.jsx                # Navigation
β”‚   β”œβ”€β”€ Upload.jsx                # Upload component
β”‚   β”œβ”€β”€ Results.jsx               # Results display
β”‚   └── ...
β”‚
β”œβ”€β”€ server/                       # Backend (Express.js)
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ auth.js               # Authentication routes
β”‚   β”‚   β”œβ”€β”€ upload.js             # Upload routes
β”‚   β”‚   β”œβ”€β”€ chat.js               # Chat routes
β”‚   β”‚   β”œβ”€β”€ claims.js             # Claims routes
β”‚   β”‚   └── profile.js            # Profile routes
β”‚   β”‚
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ auth.js               # JWT validation
β”‚   β”‚   └── errorHandler.js       # Error handling
β”‚   β”‚
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ groq-ocr.js           # OCR service
β”‚   β”‚   β”œβ”€β”€ groq-chat.js          # Chat service
β”‚   β”‚   β”œβ”€β”€ groq-compliance.js    # Compliance service
β”‚   β”‚   └── comet-logger.js       # Logging service
β”‚   β”‚
β”‚   β”œβ”€β”€ db/
β”‚   β”‚   └── migrations.sql        # Database schema
β”‚   β”‚
β”‚   └── index.js                  # Express server
β”‚
β”œβ”€β”€ lib/                          # Utility functions
β”‚   β”œβ”€β”€ supabase.js               # Supabase client
β”‚   β”œβ”€β”€ jwt.js                    # JWT utilities
β”‚   └── validators.js             # Input validation
β”‚
β”œβ”€β”€ docs/                         # Documentation
β”‚   β”œβ”€β”€ API_DOCS.md               # API endpoints
β”‚   β”œβ”€β”€ USER_FLOW_ARCHITECTURE.md # Complete flows
β”‚   β”œβ”€β”€ FLUSSO_API_DOCS.md        # Code docs
β”‚   └── CLAUDE_FLOW_PROMPTS.md    # Claude prompts
β”‚
β”œβ”€β”€ styles/                       # Tailwind CSS
β”‚   └── globals.css
β”‚
β”œβ”€β”€ public/                       # Static files
β”‚   β”œβ”€β”€ logo.png
β”‚   └── favicon.ico
β”‚
β”œβ”€β”€ .env.example                  # Example env variables
β”œβ”€β”€ .env.local                    # Local env (gitignored)
β”œβ”€β”€ .gitignore
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ next.config.js
β”œβ”€β”€ tailwind.config.js
└── README.md                     # This file

πŸ”Œ API Documentation

Authentication Endpoints

Sign Up

POST /api/auth/signup
Content-Type: application/json

{
  "full_name": "Muaaz Syed",
  "email": "muaaz@example.com",
  "password": "SecurePass123!",
  "profile_picture": "base64_string"
}

Response: { success: true, token: "jwt_token", user: {...} }

Login

POST /api/auth/login
Content-Type: application/json

{
  "email": "muaaz@example.com",
  "password": "SecurePass123!"
}

Response: { success: true, token: "jwt_token", user: {...} }

Upload Endpoints

Upload Bill

POST /api/upload
Authorization: Bearer jwt_token
Content-Type: application/json

{
  "image": "base64_string",
  "fileName": "bill.jpg"
}

Response: {
  success: true,
  claimId: "uuid",
  results: {
    patient_name: "...",
    provider_name: "...",
    compliance_score: 9,
    status: "PASS"
  }
}

Chat Endpoints

Send Message

POST /api/chat
Authorization: Bearer jwt_token
Content-Type: application/json

{
  "message": "Is this bill compliant?",
  "claimId": "uuid"
}

Response: {
  success: true,
  response: "Yes! This bill is compliant..."
}

Full API docs: See API_DOCS.md


πŸ’‘ Usage Guide

For Users

  1. Sign Up

    • Visit https://flusso.com
    • Click "Create Account"
    • Fill in details and upload profile picture
    • Verify email (if required)
  2. Upload Bill

    • Go to "Upload Claim"
    • Select medical bill image
    • System analyzes bill automatically
    • View results with compliance score
  3. Chat with Elyza

    • Click floating chatbot button
    • Ask questions about your bill
    • Get instant answers and guidance
  4. View History

    • Go to "My Claims"
    • See all uploaded bills
    • Download audit reports
    • Track savings

For Developers

Build the app:

npm run dev          # Start dev server
npm run build        # Build for production
npm run start        # Start production server
npm run test         # Run tests
npm run lint         # Lint code

Deploy to Vercel:

npm install -g vercel
vercel login
vercel deploy

Deploy to Railway:

npm install -g railway
railway init
railway up

🀝 Contributing

We love contributions! Here's how to help:

Steps

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

Guidelines

  • Follow existing code style
  • Write clear commit messages
  • Update documentation
  • Add tests for new features
  • Test before submitting PR

Areas to Contribute

  • πŸ› Bug fixes
  • ✨ New features
  • πŸ“– Documentation
  • 🎨 UI/UX improvements
  • πŸ§ͺ Tests
  • πŸš€ Performance optimization

License

This project is licensed under the MIT License - see the LICENSE file for details.


Support

Frequently Asked Questions

Q: Is FLUSSO available in other countries? A: Currently, FLUSSO is designed for UAE healthcare providers (DHA/DoH guidelines). We're expanding to other regions soon.

Q: What file types are supported? A: JPG, PNG, and PDF files up to 50MB.

Q: How long does bill analysis take? A: Usually 5-8 seconds for OCR + compliance checking.

Q: Is my data secure? A: Yes! We use JWT authentication, encrypted passwords (bcrypt), and secure database connections.

Q: Can I export my results? A: Yes! Download PDF audit reports from the results page.


Project Stats

  • Frontend: React + Next.js + Tailwind CSS
  • Backend: Express.js + Node.js
  • Database: Supabase PostgreSQL
  • AI: Groq API (Llama 3.1)
  • Monitoring: Comet ML
  • Lines of Code: ~5000+
  • API Endpoints: 15+
  • Database Tables: 3
  • Components: 20+

Roadmap

  • Core bill upload & OCR
  • Compliance checking (DHA/DoH)
  • Elyza AI chatbot
  • User authentication
  • Profile management
  • Voice input/output
  • Multi-language support
  • Mobile app (iOS/Android)
  • Advanced analytics dashboard
  • Integration with insurance providers
  • Automatic bill dispute filing
  • Blockchain verification

Team

  • Lead Developer: Muaaz Syed
  • Team Lead: Koushik
  • Strategist Aayan Desai

Acknowledgments

  • XAi and Comet - For fast, efficient LLM API
  • Supabase - For amazing database infrastructure
  • Vercel - For seamless deployment
  • Tailwind CSS - For beautiful styling
  • Perplexity - For AI code generation assistance

Helping you verify medical bills with AI-powered precision for Dubai & UAE healthcare

Status: 🟒 Active Development

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors