Skip to content

rushil1356/PolicyPilot-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

PolicyPilot AI

PolicyPilot AI is a beginner-friendly full-stack MVP that helps users find risky clauses in leases, insurance policies, subscription agreements, and service contracts.

The app supports PDF uploads and pasted text. The backend extracts text, splits it into clauses, classifies risk signals, and returns plain-English guidance for the frontend results page.

Project Structure

PolicyPilot AI/
  backend/
    app.py              Flask API routes
    analyzer.py         Clause splitting and risk analysis logic
    parser.py           PDF text extraction helpers
    requirements.txt    Python dependencies
    uploads/            Temporary uploaded PDFs
  frontend/
    src/
      App.jsx           Main React experience
      api.js            Backend API client
      index.css         Tailwind entry and global styles
    package.json        Vite React app scripts

Run The Backend

cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python app.py

The Flask API runs at http://localhost:5000.

Run The Frontend

cd frontend
npm install
npm run dev

The Vite app runs at http://localhost:5173.

API

POST /api/analyze

Send either:

  • multipart/form-data with a file PDF
  • JSON with { "text": "..." }

The response includes extracted text, risky clauses, top five risky points, and an overall summary.

MVP Notes

The current analyzer uses transparent heuristic rules so the app works immediately without external credentials. The backend is structured so analyzer.py can later call an AI model and return the same response shape to the frontend.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors