Lex AI is an AI-powered web application built with Django, HTML, CSS, and JavaScript. It helps users:
- Chat with Terms & Conditions / Privacy Policies
- Ask general legal questions to an AI Legal Assistant
- Upload legal documents and get clause extraction, risk analysis, and obligation summaries.
lexai/
├── chat_app/ # Django app for AI Legal Assistant and Document Analyzer
├── website_chat/ # Django app for Website T&C Chat
├── media/ # Uploaded Documents
├── db.sqlite3 # SQLite database
├── manage.py # Django management script
├── .env # API Keys and Secrets (DO NOT COMMIT)
├── requirements.txt # Python dependencies
├── package.json # (If any front-end JavaScript package used)
├── static/ # CSS, JavaScript, images
├── templates/ # HTML templates
- Clone the Repository
git clone <repo-link>
cd lexai- Create Virtual Environment
python -m venv venv
source venv/bin/activate # (Linux/macOS)
venv\Scripts\activate # (Windows)- Install Dependencies
pip install -r requirements.txt- Setup Environment Variables
Create a
.envfile with:
GEMINI_API_KEY=your_gemini_api_key_here
DEBUG=True
- Run Migrations
python manage.py migrate- Start the Server
python manage.py runserver- Access the Application Visit: http://127.0.0.1:8000
- Login / Signup Module
- Chat with Terms & Conditions
- Personal AI Legal Assistant
- Document Analyzer (Chat with Documents)
- Backend: Django, Python
- Frontend: HTML5, CSS3, JavaScript
- Database: SQLite3
- AI: Gemini 2.0 API