AI-powered legal document analysis that breaks down complex contracts and agreements into plain English, helping you make informed decisions with confidence.
- Multi-Language Support: Analyzes documents in 12+ languages
- Document Type Detection: Automatically identifies document types (Rental, Loan, Employment, etc.)
- AI-Powered Analysis: Uses Google Gemini AI for intelligent document analysis
- Risk Assessment: Provides risk scores and identifies potential issues
- Plain English Summaries: Converts legal jargon into understandable language
- Privacy-First: Secure document processing with user consent
git clone https://github.com/yourusername/legallens-ai.git
cd legallens-ai-
Copy the example configuration:
cp config.example.js config.js
-
Edit
config.jsand add your API keys:const CONFIG = { GEMINI_API_KEY: 'your_actual_gemini_api_key', GEMINI_API_URL: 'https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent', FIREBASE: { apiKey: 'your_firebase_api_key', authDomain: 'your_project.firebaseapp.com', // ... other Firebase config } };
-
Create a
.envfile:cp env.example .env
-
Add your API keys to
.env:GEMINI_API_KEY=your_actual_gemini_api_key FIREBASE_API_KEY=your_firebase_api_key
- Go to Google AI Studio
- Create a new API key
- Copy the key to your configuration
- Go to Firebase Console
- Create a new project
- Enable Authentication and Firestore
- Copy the configuration to your config file
# Using a local server (recommended)
python -m http.server 8000
# or
npx serve .
# or
php -S localhost:8000Open http://localhost:8000 in your browser.
- Never commit API keys to version control
- Use environment variables for production
- Rotate API keys regularly
- Monitor API usage for unusual activity
legallens-ai/
├── index.html # Main HTML file
├── app.js # Main JavaScript application
├── styles.css # CSS styles
├── config.example.js # Configuration template
├── env.example # Environment variables template
├── .gitignore # Git ignore file
└── README.md # This file
- English, Spanish, French, German, Italian, Portuguese
- Chinese, Japanese, Korean, Arabic, Hindi
- And more through AI detection
- Rental/Housing Documents
- Loan and Credit Agreements
- Employment Documents
- Terms of Service/Privacy Policies
- Insurance Policies
- General Legal Documents
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues:
- Check the console for errors
- Verify your API keys are correct
- Ensure you're using a local server (not file://)
- Check the browser's network tab for API calls
- v1.0.0: Initial release with multi-language support
- v1.1.0: Added document type detection
- v1.2.0: Enhanced security and privacy features