LexIntellect is an AI-powered legal analysis and AI Panchayat system for dispute resolution. It provides advanced tools for legal document analysis, predictive analytics, and a unique AI-driven Panchayat system that simulates diverse legal perspectives to resolve disputes fairly and transparently.
- AI Legal Document Analysis: Upload and analyze legal documents for insights and predictions.
 - AI Panchayat System: Present disputes to a virtual panel of AI Panchayat members, each representing a distinct legal philosophy, for multi-perspective analysis and consensus-driven resolutions.
 - Community Forums: Engage with a legal community for discussions and advice.
 - Predictive Analytics: Get outcome predictions for legal cases.
 - User Dashboard: Personalized dashboard for managing documents, disputes, and analysis history.
 
The AI Panchayat System is inspired by traditional Indian village councils (Panchayats) and modernized with AI. When a dispute is submitted, it is analyzed by multiple AI "Panchayat Members," each embodying a unique legal or ethical perspective:
- Panch Nyayamurti (Justice-Oriented): Focuses on legal principles and precedents.
 - Panch Karuna (Compassion-Oriented): Emphasizes human welfare and equitable solutions.
 - Panch Samaj (Community-Oriented): Prioritizes social harmony and community welfare.
 - Panch Vidhi (Procedure-Oriented): Stresses proper legal procedure and due process.
 - Panch Pragati (Progressive-Oriented): Adopts modern, innovative, and technological solutions.
 - Panch Vishwas (Trust-Oriented): Ensures impartial, unbiased, and trust-building resolutions.
 
Each member provides an independent analysis and suggested resolution. The system then synthesizes these perspectives to offer a consensus decision, along with confidence scores and ethical recommendations.
LexIntellect/
  ├── backend/         # FastAPI backend for AI and data processing
  │   ├── app.py
  │   └── requirements.txt
  ├── Frontend/        # Next.js/React frontend application
  │   ├── app/
  │   ├── components/
  │   ├── hooks/
  │   ├── lib/
  │   ├── services/
  │   └── types/
  ├── README.md
  └── .gitignore
- Node.js (v16+)
 - Python 3.8+
 - npm or yarn
 - (Optional) Virtual environment for Python
 
- Navigate to the backend directory:
cd backend - Install Python dependencies:
pip install -r requirements.txt
 - Run the FastAPI server:
uvicorn app:app --reload
 
- Navigate to the Frontend directory:
cd Frontend - Install Node.js dependencies:
npm install
 - Run the Next.js development server:
npm run dev
 - Open http://localhost:3000 in your browser.
 
- Frontend: Next.js, React, Tailwind CSS, TypeScript
 - Backend: FastAPI, Python
 - AI/ML: Google Generative AI (Gemini), Transformers, Sentence Transformers, BM25, FAISS
 - Other: RESTful APIs, Community features
 
Contributions are welcome! Please open issues or submit pull requests for new features, bug fixes, or improvements.
- Fork the repository
 - Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/YourFeature) - Open a pull request
 
This project is licensed under the MIT License.