Skip to content

Tindi12/Paragen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paragen - AI Revenue Leakage Detection

See Lost Revenue. Recover It. Automate It.

What Is Paragen?

Paragen is an AI-powered platform that automatically detects revenue leakage in your business documents. Upload contracts, invoices, and billing records - Paragen analyzes them to find pricing errors, missing charges, billing discrepancies, and contract deviations that cost you money.

Core Features

📄 Document Analysis

  • Upload contracts, invoices, and billing records
  • AI automatically extracts and analyzes data
  • Identifies revenue leakage opportunities

🎯 Intelligent Detection

  • Pricing Errors - Incorrect rates and tier miscalculations
  • Missing Charges - Unbilled services and untracked usage
  • Billing Discrepancies - Calculation errors and invoice mismatches
  • Contract Deviations - Unearned discounts and invoice-contract misalignments

🔒 Enterprise Security

  • AES-256 encryption for all files at rest
  • PII auto-redaction before AI processing
  • SQL injection & DDoS protection
  • No data used for AI model training

💡 Smart AI Load Balancing

  • Multi-provider AI routing (Groq → Gemini → OpenRouter)
  • Prioritizes free tiers for cost efficiency
  • Automatic fallback for reliability

Tech Stack

Backend:

  • FastAPI (Python)
  • SQLAlchemy + SQLite
  • AI: Groq, Gemini, OpenRouter
  • Document parsing: PyPDF2, python-docx

Frontend:

  • React + Vite
  • Lucide Icons
  • Modern CSS with glassmorphism

Setup

Prerequisites

  • Python 3.9+
  • Node.js 18+
  • API keys for Groq and/or Gemini

Backend Setup

cd backend
python -m venv venv
.\venv\Scripts\Activate.ps1  # Windows
source venv/bin/activate      # Mac/Linux
pip install -r requirements.txt

# Create .env file
cp .env.example .env
# Add your API keys to .env

python main.py

Backend runs on http://localhost:8000

Frontend Setup

cd frontend
npm install
npm run dev

Frontend runs on http://localhost:5173

Environment Variables

Required in backend/.env:

# AI Providers (at least one required)
GROQ_API_KEY=your_groq_key
GEMINI_API_KEY=your_gemini_key
OPENROUTER_API_KEY=your_openrouter_key  # Optional fallback

# Security
ENCRYPTION_SECRET_KEY=your_32_byte_secret_key

# Database (defaults to SQLite)
DATABASE_URL=sqlite:///./paragen.db

# Backend
BACKEND_PORT=8000

Usage

  1. Upload Documents - Drag and drop or select contracts, invoices, billing records
  2. Start Analysis - AI analyzes documents for revenue leakage
  3. Review Findings - See detected issues with evidence and recommendations
  4. Take Action - Export findings, generate dispute letters

Project Structure

Para/
├── backend/
│   ├── ai/                 # AI client integrations
│   ├── analysis/           # Core leak detection logic
│   ├── database/           # Database models and connection
│   ├── routes/             # API endpoints
│   ├── security/           # Encryption, PII redaction
│   ├── uploads/            # File upload handling
│   └── main.py            # FastAPI app entry point
│
└── frontend/
    ├── src/
    │   ├── pages/         # React pages (Home, Dashboard, Results)
    │   └── App.jsx        # React router
    └── public/

Security Features

  • Encryption: All uploaded files encrypted with Fernet (AES-128 CBC)
  • PII Protection: Email, phone, SSN, credit card redaction
  • Rate Limiting: 100 requests/minute per IP
  • SQL Injection Protection: Pattern-based detection
  • HTTPS Headers: HSTS, CSP, X-Frame-Options
  • LLM Privacy: No data used for model training

API Documentation

Once running, visit:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc

License

Proprietary - All Rights Reserved

Support

For questions or issues, contact the development team.

About

An AI-powered platform that automatically detects revenue leakage in your business documents.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors