Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ClauseGuard AI ✨

Python FastAPI React Stripe Supabase

Try the live demo---

Live Demo

ClauseGuard AI is a polished contract-review experience that helps users upload PDF agreements and receive AI-powered risk insights in seconds. It combines a beautiful React frontend with a FastAPI backend to deliver smart contract summaries, risky clause detection, negotiation suggestions, and a smooth Pro subscription flow.

🌟 What this app does

  • Upload PDF contracts with ease
  • Analyze legal text using AI
  • Get a clear verdict: Cleared, Caution, or High Risk
  • See flagged clauses with severity and concerns
  • Receive practical negotiation points
  • Track your scan history in a personal dashboard
  • Upgrade to Pro for unlimited scans

🛠️ Tech stack

  • Frontend: React, Vite, Axios
  • Backend: FastAPI, Python, Pydantic
  • Authentication & Database: Supabase
  • AI Analysis: Groq
  • Payments: Stripe

📁 Project structure

backend/
  main.py
  requirements.txt
  venv/
frontend/
  src/
    api/
    components/
    context/
    pages/
  package.json

✅ Prerequisites

Before running the app locally, make sure you have:

  • Python 3.10+
  • Node.js 18+
  • A Supabase project
  • A Groq API key
  • A Stripe account for test payments

🔐 Environment variables

Create a .env file inside the backend folder:

SUPABASE_URL=your_supabase_url
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
GROQ_API_KEY=your_groq_api_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_PRICE_ID=your_stripe_price_id
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret

Create a .env file inside the frontend folder:

VITE_API_URL=http://127.0.0.1:8000

▶️ Run locally

1. Start the backend

cd backend
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
uvicorn main:app --reload

Backend URL:

http://127.0.0.1:8000

2. Start the frontend

cd frontend
npm install
npm run dev

Frontend URL:

http://localhost:5173

✨ Features

  • Secure login and signup flow
  • PDF upload and contract parsing
  • AI-generated risk analysis
  • Risky clause highlighting
  • Negotiation recommendations
  • Dashboard with scan history
  • Stripe-powered Pro checkout

💡 Notes for development

  • The backend provides FastAPI routes for authentication, scanning, billing, and profile management.
  • The frontend uses React Router to move between auth, dashboard, pricing, and scan pages.
  • Stripe test cards can be used for local payment testing.

📜 License

This project is intended for demo and educational purposes.


Made with care by Vivi 💛

About

I-powered contract analysis app that scans PDFs, flags risky clauses, and helps users review agreements with confidence.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages