Nyay-Saarthi is an AI-powered legal assistant designed to simplify complex legal documents for users in both Hindi and English.
This application allows users to upload legal documents and receive simplified summaries, ask questions about the content, and even book consultations with legal experts.
- Document Upload and Simplification: Securely upload legal documents (PDF, DOCX, TXT, PNG, JPG, JPEG) and receive a simplified summary in plain language.
- AI-Powered Q&A: Ask questions about your uploaded documents and get instant, context-aware answers from our AI assistant.
- Consultation Booking: Schedule consultations with legal experts through the platform.
- User Authentication: Secure user registration and login functionality.
- Dashboard: An overview of your documents and analysis.
- *Bilingual Support: The entire user interface and AI responses are available in both *Hindi and English.
- Responsive Design: A mobile-friendly interface ensures a seamless experience across all devices.
- Framework: Next.js
- Language: TypeScript
- Styling: Tailwind CSS with shadcn/ui components
- Authentication: Supabase
- Framework: FastAPI
- Language: Python
- AI/ML: Ollama local LLM, LangChain, Ollama embeddings
- Vector Store: Qdrant
- Deployment: Docker
- Node.js and npm (or yarn/pnpm)
- Python 3.11
- Docker
-
Clone the repository: bash git clone https://github.com/parrth20/nyay-saarthi.git cd nyay-saarthi
-
Frontend Setup: bash
npm install
-
Backend Setup: bash cd Backend pip install -r requirements.txt
-
Local Ollama Setup: bash ollama serve ollama pull mistral ollama pull nomic-embed-text
-
Environment Variables:
Frontend.env.local: bash NEXT_PUBLIC_API_BASE_URL=http://localhost:8000Backend
Backend/.env: bash OLLAMA_BASE_URL=http://localhost:11434 OLLAMA_MODEL=mistral OLLAMA_EMBED_MODEL=nomic-embed-textWhen running the backend in Docker while Ollama runs on your host machine, set: bash OLLAMA_BASE_URL=http://host.docker.internal:11434
Start the Frontend: bash npm run dev
Start the Backend: bash cd Backend uvicorn main:app --host 0.0.0.0 --port 8000
Alternatively, run the backend using Docker: bash cd Backend docker build -t nyay-saarthi-backend . docker run -p 8000:8000 nyay-saarthi-backend
Contributions are welcome!
Please feel free to open an issue or submit a pull request.