A sophisticated legal document analysis system that combines RAG (Retrieval-Augmented Generation) with modern web technologies to provide intelligent document processing and chat capabilities.
- Document upload and processing (PDF, DOCX support)
- Intelligent chat interface for legal document analysis
- RAG-based document retrieval and generation
- Real-time communication between frontend and backend
- Cross-Origin Resource Sharing (CORS) enabled for development
- React 18
- Vite
- Axios for API communication
- Modern CSS styling
- FastAPI
- ChromaDB for document storage
- Sentence Transformers for text embedding
- Google's Generative AI
- spaCy for NLP tasks
- PyPDF2 and python-docx for document processing
- Node.js (for frontend)
- Python 3.x (for backend)
- npm or yarn package manager
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Run development server:
npm run dev
The frontend will be available at http://localhost:5173
-
Navigate to the backend directory:
cd backend -
Install Python dependencies:
pip install fastapi uvicorn chromadb sentence-transformers google-generativeai spacy pypdf2 python-docx
-
Run the FastAPI server:
uvicorn legal_rag_api:app --reload
The backend API will be available at http://localhost:8000
.
βββ README.md
βββ backend/
β βββ legal_rag_api.py # FastAPI backend server
βββ frontend/
βββ src/
β βββ components/
β β βββ ChatBox.jsx # Chat interface component
β β βββ MessageBubble.jsx # Individual message component
β β βββ UploadBox.jsx # Document upload component
β βββ App.jsx # Main application component
β βββ main.jsx # Application entry point
βββ index.html
βββ package.json
βββ vite.config.js
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- vanditajain-29
- []
- []
- []