Empowering citizens with instant, intelligent legal assistance — anytime, anywhere.
A mobile-first legal awareness platform that empowers citizens with accessible legal information, AI-assisted guidance, document automation, incident documentation, and community support.
Know Your Rights (KYR) is a mobile application designed to bridge the gap between citizens and legal services by making legal information understandable, accessible, and actionable.
Instead of navigating complex legal procedures or searching through lengthy regulations, users can:
- 💬 Ask legal questions through an AI-powered assistant
- 📄 Generate commonly used legal documents
- 📚 Learn about fundamental legal rights
- 📝 Maintain a secure incident diary with images
- 🤝 Participate in legal discussion forums
- ☎️ Access emergency and legal aid contacts
The project combines modern mobile development with AI-powered assistance to create an educational LegalTech platform suitable as an MVP for legal awareness.
- User Registration
- Secure Login
- JWT Authentication
- Password Hashing using bcrypt
- Profile Management
- Change Password
Users can interact with an AI chatbot for:
- Basic legal guidance
- Rights awareness
- Legal procedure explanations
- Everyday legal questions
Powered by
- OpenAI API
Generate and analyze legal documents.
Features include:
- Document Templates
- Dynamic Form Filling
- PDF Upload
- AI Document Summarization
- AI Insights
- Document Preview
- PDF Generation
- Local Saving
- Sharing Documents
Powered by
- Google Gemini
- pdf-parse
Provides simplified explanations of important legal rights including:
- Constitutional Rights
- Women's Rights
- Consumer Rights
- Cyber Crime Awareness
- Emergency Information
Maintain detailed records of incidents.
Supports:
- Incident Details
- Images
- Witness Information
- Officer Information
- Timeline
- Local Storage
- Incident History
A simple legal discussion platform where users can:
- Browse channels
- Read discussions
- Post messages
- Participate in community conversations
Quick access to:
- Police
- Women's Helpline
- Cyber Crime
- Ambulance
- Legal Aid Services
- Dark Mode
- Modern UI
- Responsive Layout
- Expo Router Navigation
- Mobile-first Design
React Native (Expo)
│
│
HTTP / JSON / FormData
│
▼
Express.js Backend
┌───────────┬────────────┬─────────────┐
│ │ │ │
▼ ▼ ▼ ▼
Authentication AI Chat SmartDoc Incident API
│ │ │ │
│ ▼ ▼ ▼
│ OpenAI API Gemini API JSON Storage
│
▼
MongoDB
- React Native
- Expo
- Expo Router
- React
- Axios
- AsyncStorage
- Expo File System
- Expo Print
- Expo Sharing
- Expo Document Picker
- Expo Image Picker
- Expo Location
- Expo Linear Gradient
- Expo Vector Icons
- Node.js
- Express.js
- Mongoose
- JWT
- bcrypt
- Multer
- pdf-parse
- dotenv
- CORS
- MongoDB
- JSON File Storage (Incident Diary)
- OpenAI
- Google Gemini
Know-Your-Rights
│
├── app/
│ ├── onboarding/
│ ├── user/
│ ├── admin/
│ ├── login.js
│ ├── register.js
│ └── index.js
│
├── components/
│
├── context/
│
├── constants/
│
├── backend/
│ ├── config/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ ├── data/
│ └── server.js
│
├── package.json
└── README.md
git clone https://github.com/yourusername/Know-Your-Rights.git
cd Know-Your-Rightsnpm installcd backend
npm installCreate a .env file inside the backend directory.
PORT=5000
MONGO_URI=your_mongodb_connection
JWT_SECRET=your_secret
OPENAI_API_KEY=your_openai_key
GEMINI_API_KEY=your_gemini_keycd backend
npm startor
npm run devnpm startor
npx expo start| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/register |
Register User |
| POST | /api/auth/login |
Login |
| GET | /api/auth/profile |
User Profile |
| POST | /api/auth/change-password |
Update Password |
| Method | Endpoint |
|---|---|
| POST | /api/chat/ask |
| Method | Endpoint |
|---|---|
| POST | /api/smartdoc/upload |
| POST | /api/smartdoc/analyze |
| POST | /api/smartdoc/insights |
| Method | Endpoint |
|---|---|
| GET | /api/documents/templates |
| POST | /api/documents/generate |
| POST | /api/documents/save |
| GET | /api/documents/saved |
| Method | Endpoint |
|---|---|
| POST | /api/incident-diary |
| GET | /api/incident-diary |
| GET | /api/incident-diary/:id |
| DELETE | /api/incident-diary/:id |
| Method | Endpoint |
|---|---|
| GET | /api/forum/channels |
| GET | /api/forum/messages/:channelId |
| POST | /api/forum/messages/:channelId |
- Context-aware legal assistance
- Prompt-driven responses
- OpenAI Integration
- PDF Parsing
- AI Summarization
- Document Insights
- Language Detection
- Document Type Detection
Current implementation includes:
- JWT Authentication
- Password Hashing
- Protected Routes
- Role-based User Support
- Environment Variables
This project is currently an MVP (Minimum Viable Product).
Current limitations include:
- Some features rely on mock data.
- Incident diary uses JSON storage instead of full database persistence.
- Help Near Me is a placeholder.
- Admin functionality is minimal.
- AI responses are prompt-based and not backed by a Retrieval-Augmented Generation (RAG) pipeline.
- Security hardening (rate limiting, input sanitization, production CORS configuration, etc.) is not yet implemented.
- AI-powered Retrieval-Augmented Generation (RAG)
- Curated Legal Knowledge Base
- Persistent Cloud Storage
- Real-time Community Moderation
- Location-based Legal Services
- End-to-End Testing
- Advanced Search & Filtering
- Push Notifications
- Admin Management Portal
- Production-grade Security Enhancements
This project demonstrates practical experience with:
- Cross-platform Mobile Development
- REST API Design
- JWT Authentication
- MongoDB Integration
- AI API Integration
- PDF Processing
- File Upload Handling
- State Management
- Mobile UI/UX Design
- LegalTech Application Development
Contributions, suggestions, and feature requests are welcome.
If you find a bug or have an enhancement idea, feel free to open an issue or submit a pull request.
🚧 This project is under active development.
We’re continuously adding smarter AI tools, regional law support, and accessibility features for all types of users — including specially abled individuals.
This project is licensed — see the LICENSE file for details.
“Justice is not just for the few who can afford it — it's a right we all deserve to understand.”