🧭 Inspiration
One evening, Amina heard shouting down the road. Her neighbor was being forced into a car by unknown men. She froze — should she record, call for help, or lock herself inside? Another time, James was stopped by police and felt pressured into handing over his phone; he wasn’t sure which rights protected him. A friend of ours survived gender-based violence and later shared how, in panic, she washed away the very evidence that could have helped her case — simply because she didn’t know what steps to take.
These situations are real and common: people find themselves in dangerous or confusing moments — an attempted abduction, a confrontational protest, an encounter with law enforcement, or cases of gender-based violence — and don’t know what legal protection applies or what immediate actions to take.
We built JuaRights because access to clear, immediate legal guidance should not require a lawyer’s hourly rate or hours of searching. With voice and text input, a victim can narrate their situation in real time and get concise, actionable information drawn from the Kenyan Constitution and relevant laws. This is about turning fear and uncertainty into clarity and safer decisions — making the law understandable, accessible, and ready when people need it most.
⚖️ What it does
JuaRights is an AI-powered personal legal assistant that lets users narrate their situation in plain language — for example, “I was stopped by the police and asked for a bribe.”
The assistant analyzes the situation, matches it to relevant articles in the Kenyan Constitution, and provides an easy-to-understand explanation of the user’s rights and possible next steps.
It’s like having your own “AI lawyer in your pocket.”
🛠️ How we built it
We connected a language model with a custom dataset derived from the Kenyan Constitution and selected legal acts.
Tech Stack:
- 🐍 Python for backend logic and data preprocessing
- 🔗 LangChain to connect the model with the Constitution dataset
- ⚛️ React for the frontend conversational interface
- 🚀 FastAPI for the API layer
- 🧠 Vector database (FAISS / Chroma) for semantic search and context retrieval
We trained the model to respond in conversational Swahili and English, making it accessible to all users.
🚧 Challenges we ran into
- Extracting and structuring legal text from the Constitution for machine readability
- Ensuring responses are accurate, unbiased, and legally sound
- Managing token limits and optimizing retrieval for relevant clauses
- Designing a simple, intuitive UI that feels trustworthy and easy to use
🏆 Accomplishments that we're proud of
- Built an AI assistant that maps real-world scenarios to relevant constitutional rights
- Developed a working prototype that understands natural language and responds contextually
- Designed a bilingual (English + Swahili) interface for inclusivity
- Bridged technology and justice to make the law more approachable
📚 What we learned
- How to integrate AI with domain-specific datasets like legal text
- The importance of ethical design in legal tech — ensuring privacy, accuracy, and neutrality
- That impact matters more than complexity — even simple tools can change lives if built with empathy
🚀 What's next for JuaRights
- Expand the dataset to include Kenyan laws and legal precedents beyond the Constitution
- Partner with legal aid organizations to validate and improve advice quality
- Build an offline version for rural or low-connectivity areas
- Add voice input and text-to-speech for hands-free accessibility
- Release a mobile app for Android users
Built With
- ai
Log in or sign up for Devpost to join the conversation.