Skip to content

PrathamDevX/Legal-Simplifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legal Document Simplifier

A web application that simplifies complex legal documents into plain, easy-to-understand language using AI.

🚀 Quick Start

Prerequisites

  • Python 3.8+ installed
  • Node.js 16+ installed
  • Google Gemini API key

Step 1: Install Dependencies

Backend (Python):

pip install -r requirements.txt

Frontend (Node.js):

cd frontend
npm install
cd ..

Step 2: Set Up API Key

  1. Get your Gemini API key from Google AI Studio
  2. Create a .env file in the root directory:
GEMINI_API_KEY=your_actual_api_key_here

Step 3: Run the Application

Start Backend:

# Activate virtual environment (if using one)
.\.venv\Scripts\activate

# Start the FastAPI server
uvicorn backend.main:app --reload

Backend will run at: http://127.0.0.1:8000

Start Frontend (in a new terminal):

cd frontend
npm run dev

Frontend will run at: http://localhost:5173

Step 4: Access the App

Open your browser and go to: http://localhost:5173

🔧 Troubleshooting

Backend won't start:

  • Make sure you're in the virtual environment: .\.venv\Scripts\activate
  • Check that GEMINI_API_KEY is set in .env file
  • Ensure all dependencies are installed: pip install -r requirements.txt

Frontend won't start:

  • Make sure Node.js is installed: node --version
  • Install dependencies: cd frontend && npm install
  • Check for port conflicts (default is 5173)

API key issues:

  • Verify your Gemini API key is valid
  • Check that .env file exists in the root directory
  • Make sure the key starts with "AIzaSy"

📚 API Endpoints

  • POST /simplify - Simplify legal documents
  • POST /ask - Ask questions about documents
  • GET /health - Health check

⚠️ Disclaimer

This tool provides simplified explanations only. It is NOT legal advice. Always consult a qualified lawyer for professional guidance on any legal matters.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published