Your Personal Legal Aid Companion - Get instant legal guidance, file complaints, and access government services in your preferred language.
- Frontend: https://nyay-sahayak-gray.vercel.app
- Backend API: https://nyay-sahayak-api-production.up.railway.app
- AI Legal Assistant - Get instant legal advice powered by Groq (Llama 3.3)
- Voice Assistant - Speak in Hindi/English/Hinglish, get responses in the same language
- Document Generation - Generate legal notices, rent agreements, and more
- Google Authentication - Secure login with Firebase
- Chat History - Your conversations saved securely
- Multi-language Support - Hindi, English, Hinglish, and regional languages
- Responsive Design - Works on desktop and mobile
- React 18 + Vite
- TailwindCSS
- Firebase (Auth and Firestore)
- Deployed on Vercel
- FastAPI (Python)
- Groq AI (Llama 3.3 70B)
- ChromaDB (Vector Database)
- Deployed on Railway
- Node.js 18+
- Python 3.10+
- Git
git clone https://github.com/TechJitu/Nyay-Sahayak-react-UI
cd Nyay-Sahayak-react-UIcd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/Mac:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Set your GROQ API key (REQUIRED!)
# Windows:
set GROQ_API_KEY=your_groq_api_key_here
# Linux/Mac:
export GROQ_API_KEY=your_groq_api_key_here
# Start the server
uvicorn api:app --reload --host 0.0.0.0 --port 8000Get your free GROQ API key at: https://console.groq.com/
cd frontend
# Install dependencies
npm install
# Start development server
npm run devThe app will be available at http://localhost:5173
- Go to railway.app and sign in with GitHub
- Click New Project > Deploy from GitHub repo
- Select this repository
- In Settings, set Root Directory to
/(leave empty) - Add Environment Variable:
GROQ_API_KEY= your_groq_api_key
- Deploy! Copy your Railway URL.
- Go to vercel.com and sign in with GitHub
- Click Add New > Project > Select this repository
- Configure:
- Root Directory:
frontend - Framework Preset: Vite
- Root Directory:
- Add Environment Variable:
VITE_API_URL=https://your-railway-url.up.railway.app
- Deploy!
Add your Vercel domain to Firebase authorized domains:
- Go to Firebase Console > Authentication > Settings
- Add your Vercel URL to Authorized domains
Nyay-Sahayak-react-UI/
├── backend/
│ ├── api.py # FastAPI backend
│ ├── requirements.txt # Python dependencies
│ ├── Dockerfile # Docker config for Railway
│ └── nyay_memory/ # ChromaDB storage
│
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom hooks
│ │ ├── pages/ # Page components
│ │ ├── config/ # API configuration
│ │ ├── firebase.js # Firebase config
│ │ └── App.tsx # Main app
│ ├── vercel.json # Vercel routing config
│ └── package.json
│
├── Dockerfile # Main Docker config
├── railway.json # Railway config
└── README.md
| Variable | Description | Required |
|---|---|---|
GROQ_API_KEY |
Your Groq API key | Yes |
| Variable | Description | Required |
|---|---|---|
VITE_API_URL |
Railway backend URL | Yes |
- Click the microphone button on the chat interface
- Speak your legal question in any language (Hindi/English/Hinglish)
- AI responds in the same language you spoke
- Click the speaker icon to hear the response
- Never commit API keys to version control
- GROQ API key is loaded from environment variables
- Firebase API keys are safe to expose (restricted by domain rules)
- All user data is stored securely in Firebase
This project is licensed under the MIT License.
- Groq - For blazing fast AI inference
- Firebase - For authentication and database
- Railway - For backend hosting
- Vercel - For frontend hosting
Made with love in India