Inspiration
The moments when your rights matter most are the worst moments to look them up. There are flashing lights in your mirror, agents knocking at your door, or you've just been hurt at work and your boss is telling you not to report it. People are scared, they have seconds, not minutes, and many of them don't speak English as a first language. Good know-your-rights guides exist from groups like the ACLU, ILRC and OSHA, but they're long web pages written for reading at a desk. We wanted something you could use with one hand, out loud, in the moment.
What it does
RightsLine is a voice-first web app for phones, covering three situations: traffic stops, immigration (ICE) encounters, and getting hurt at work.
- Ask out loud in your own language. It supports 12 languages, including Spanish, Hindi, Chinese, Vietnamese, Tagalog, Arabic and Gujarati. The answer is spoken back in the same language.
- Short, calm answers. Each answer is 2–4 plain sentences, leading with the single most important thing to do right now.
- "Say it for me." When there are exact words to say to an officer, agent or employer, the app shows them in English and can play them aloud, so language isn't a barrier at the door.
- Rights card. A full-screen card to hold up to an officer, with a play-aloud button.
- One-tap help. Each situation has real hotlines, such as United We Dream's MigraWatch and OSHA, as tap-to-call links.
- Silent mode. Mute the voice and type when speaking out loud isn't safe. Follow-up questions keep the conversation's context.
- Private by design. There are no accounts, and conversations aren't stored.
How we built it
- Next.js 16 (App Router), React 19 and TypeScript, deployed on Vercel.
- Voice in and out uses the browser's built-in Web Speech API. Speech recognition turns speech into text in the chosen language, and speech synthesis reads the answer aloud. There's nothing to install, and it works in Chrome and in Safari on iOS.
- Answers: the server route
/api/asksends the question, the situation and the reply language to Google Gemini (gemini-3.5-flash-lite, falling back togemini-3.8-flashwhen busy). The system prompt contains a knowledge base we wrote from ACLU, ILRC/NILC and OSHA public guidance. The model is told to answer only from those facts, to never invent laws, deadlines or phone numbers, to never advise lying, running or resisting, and to point to help lines when a question isn't covered. - Speed: the answer streams back and is split into sentences as it arrives, so the phone starts speaking the first sentence before the rest is written. Most answers start in under a second.
Challenges we ran into
- Speed vs. quality. Larger models gave good answers but could take 10+ seconds, which is far too long when someone is standing at a car window. We moved to a fast model with minimal "thinking" and tightened the prompt until the short answers stayed accurate.
- Keeping it grounded. A general-purpose AI will happily guess at laws. We limited it to a fixed knowledge base and wrote rules for what to do when a question isn't covered, like state-specific laws, instead of letting it improvise.
- Mixing languages. The advice should be in your language, but the words you say to an officer usually need to be in English. We designed the answer format around that split, with the "SAY:" line always in English.
- Speech on phones. iOS only allows speech after a tap, and voice input needs HTTPS, so the app unlocks speech on the first tap, and we deployed early to test on real phones.
Accomplishments that we're proud of
- A scared person can go from opening the app to hearing useful advice in a few seconds, in their own language.
- The "Say it for me" line and the rights card, which help even when the person can't speak English.
- It stays inside what it knows, and points people to real help instead of guessing.
What we learned
- For this kind of tool, design for stress: big buttons, few words, and one clear next step.
- How to keep an AI model inside a vetted body of facts, and how much prompt wording matters for small, fast models.
- The browser's built-in speech tools are good enough to build a voice app without a speech service.
What's next for RightsLine
- Review of the knowledge base by legal aid attorneys, plus state-by-state details.
- More situations, like housing and eviction, wage theft, and school discipline.
- An offline mode with pre-written answers for the most common questions, for places with bad signal.
- Partnering with legal aid groups to share it with the communities that need it.
RightsLine gives general information, not legal advice. Laws vary by state. In an emergency, call 911.
Built With
- next.js
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.