LegalBro is an AI-powered legal assistant focused on Bangladeshi law and constitution. It helps users understand legal queries in simple terms and will soon support legal document generation (e.g., partnership deeds, contracts).
- AI-powered legal Q&A
- Focused on Bangladeshi law & constitution
- FastAPI backend with clean architecture
- Pluggable LLM support (OpenAI / OpenRouter / DeepSeek)
- REST API for frontend integration
app/
├── api/ # API routes
│ └── v1/endpoints/
├── services/ # Business logic
├── ai/ # LLM integration
├── templates/ # (optional UI templates)
└── main.py # FastAPI entry point
git clone https://github.com/your-username/LegalBroBD.git
cd LegalBro
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Create .env:
OPENAI_API_KEY=your_api_key
uvicorn app.main:app --reload
Visit:
http://localhost:8000
Request:
{
"text": "What are tenant rights in Bangladesh?"
}Response:
{
"data": {
"simplified": "..."
}
}- Backend: Render
- Frontend: Vercel
- 📄 RAG with legal documents (PDF ingestion)
- 🧾 Contract generation (e.g., partnership deed)
- 🧠 Multi-model support (DeepSeek, GPT, etc.)
- 🔐 Authentication & usage tracking
This project provides informational assistance only and does not constitute legal advice.
Built by Reyad