- 🎙️ Voice Recording - Speak your legal questions naturally
- 🤖 AI-Powered Responses - Context-aware answers using Google Gemini 2.5
- 🗣️ Text-to-Speech - Listen to AI responses with premium voices
- 💬 Conversation History - Maintains context across questions
- 🌍 Multi-Jurisdiction - Indian, US, UK, and General law support
- 🎨 Modern Dark UI - Beautiful, responsive interface
Frontend: React + Vite + Material-UI
Backend: Node.js + Express + MongoDB
AI/Voice: Google Gemini + Deepgram
Deployment: Vercel (Serverless)
# Clone repository
git clone https://github.com/YOUR_USERNAME/ai-legal-assistant.git
cd ai-legal-assistant
# Setup backend
cd server
npm install
# Create .env with: MONGODB_URI, GEMINI_API_KEY, DEEPGRAM_API_KEY
npm run dev
# Setup frontend (new terminal)
cd client
npm install
# Create .env with: VITE_API_URL=http://localhost:5000
npm run dev
Visit http://localhost:5173
Voice Input → Deepgram STT → Transcript Display
↓
Google Gemini AI → Context-Aware Response
↓
Deepgram TTS → Audio Playback + Text
Base URL: https://legal-assistant-rust.vercel.app/api
POST /users/register- Register new userGET /users/:userId- Get user detailsPUT /users/:userId/preferences- Update preferencesPOST /conversations/transcribe- Convert speech to textPOST /conversations/process-query- Get AI responseGET /conversations/user/:userId- Get conversation history
Voice Processing:
- Deepgram Nova-2 for speech-to-text
- Real-time transcription display
- 10+ premium voice options for TTS
AI Intelligence:
- Google Gemini 2.5 Flash
- Conversation context tracking
- Customizable tone (formal/casual/technical)
User Experience:
- 80/20 split layout (Chat/Controls)
- Dark theme with smooth animations
- Progress indicators and status updates
Server (.env):
MONGODB_URI=your_mongodb_uri
GEMINI_API_KEY=your_gemini_key
DEEPGRAM_API_KEY=your_deepgram_key
Client (.env):
VITE_API_URL=your_backend_url
MIT License - feel free to use for your projects!
Built with ❤️ using React, Node.js, Gemini AI, and Deepgram