Naija Rights is a production-ready RAG application bridging the gap between citizens and their constitution. Engineered with a FastAPI backend, local ChromaDB embeddings, and Gemini. Features a modern, mobile-responsive frontend that delivers cited legal answers in conversational Nigerian Pidgin.
# Naija Rights
A full-stack Retrieval-Augmented Generation (RAG) application designed to democratize access to the Nigerian Constitution. The system translates dense legal jargon into localized Nigerian Pidgin, providing a highly accessible conversational interface for the public to uncover their fundamental rights alongside official section citations.
**Live Demo:** our-naija-rights.vercel.app
**Backend API:** naija-rights.onrender.com
---
## Screenshots
### Welcome Screen
### Conversational Pidgin Interface
### Strict Section Citations
### Mobile View
---
## How It Works
The system utilizes a custom RAG pipeline to ground every AI response strictly within the Nigerian Constitution:
```text
User asks a legal question
↓
System embeds the query locally
↓
┌────────────────────────────────────┐
│ │
│ ChromaDB Vector Store │
│ (Retrieves top 8 relevant chunks │
│ from the Nigerian Constitution) │
│ │
└──────────────┬─────────────────────┘
↓
Prompt Engineer synthesizes chunks + user query
(Enforces street-smart Pidgin persona & citation rules)
↓
Google Gemini 2.5 Flash LLM
↓
Response returned to user
```
**Example interactions:**
- "Can police search my phone?" → System fetches and cites Chapter IV, Section 37 on privacy.
- "If they arrest me on Friday, when should I go to court?" → System fetches and cites Section 35(4) on reasonable time.
- "Can I do a peaceful protest?" → System fetches and cites Section 40 on peaceful assembly.
---
## Features
- Localized AI Persona — strictly responds in natural, conversational Nigerian Pidgin
- Official Citations — every response includes exact Chapter, Part, and Section references
- Local Embeddings — uses all-MiniLM-L6-v2 via ChromaDB natively to bypass API rate limits
- Intelligent Retrieval — fetches the top 8 most contextually relevant constitutional chunks per query
- Responsive Glassmorphism UI — premium frosted-glass …