Legal Compass is a cross-platform Web + Android application built using React, React Native (Expo), and Google Cloud's Generative AI services. It simplifies complex legal documents into clear, multilingual summaries with voice output, clause-level risk detection, and a context-aware Q&A chatbot.
- Features
- Tech Stack
- System Architecture
- Setup & Installation
- Google Cloud Setup
- How It Works
- Future Scope
- Contributors
- Cross-Platform: Web + Android app using React + Expo.
- Multilingual Support: Summaries in Hindi, Marathi, Tamil, Telugu, and more.
- Multimodal Outputs: Text + Voice summaries using Google Text-to-Speech.
- Context-Aware Chatbot: RAG + Gemini-powered Q&A for accurate legal answers.
- Missing Clause Detection: Alerts for absent critical clauses.
- React (Web App)
- React Native + Expo (Android App)
- Node.js + Express.js
- MongoDB (User data, document metadata)
- Cloudinary ( file storage )
- Google Cloud Vertex AI: Generative AI & embeddings
- Google Document AI / Vision AI: OCR for text extraction
- Google Cloud Translation API: Multilingual support
- Google Text-to-Speech API: Voice output generation
- Vector Database: Pinecone / pgvector for RAG pipeline
- Google Cloud Storage: Secure document storage
Flow:
- Document Upload → 2. OCR Text Extraction → 3. Text Chunking → 4. RAG Retrieval → 5. Summarization → 6. Multilingual Translation → 7. Text-to-Speech Output → 8. Q&A Chatbot → 9. Web/Android UI
-
Clone the Repository:
git clone https://github.com/your-username/ase_genai.git cd ase_genai -
Install Dependencies:
npm install
-
Run Web App:
npm start
-
Run Android App (Expo):
npx expo start
-
Backend Setup:
cd backend npm install npm start
- Enable Vertex AI, Document AI, Translation API, Text-to-Speech API, Cloud Storage in the Google Cloud Console.
- Download and add your service account key to your backend as
service-account.json. - Set environment variables for Google Project ID, API keys, and Database URLs.
- User uploads PDF/Image → OCR extracts text.
- RAG retrieves relevant clauses → Gemini simplifies text.
- Missing clauses flagged.
- Summaries translated into multiple languages.
- Text-to-Speech generates voice narration.
- Context-aware chatbot answers user questions.
- Add AI-powered contract comparison and legal clause recommendations for better decision-making.
- Automatic checks for compliance with local laws & industry regulations.
- Suggest better terms or alternatives for clauses marked as risky or unfair.
- Integration with legal professionals for review.
- Offline mode for rural areas with poor connectivity.
- Expanded language support for all Indian languages.
- Team Name: [Your Team Name]
- Team Members: [List Names]
- Hackathon: [Hackathon Name & Date]