DEV Community

Cover image for Adhikaar AI: From Rights on Paper to Action on the Ground
Ankit Kumar jha
Ankit Kumar jha

Posted on AI-assisted

Adhikaar AI: From Rights on Paper to Action on the Ground

Hacktoberfest: Maintainer Spotlight

This is a submission for the Hacktoberfest Open-Source AI Challenge, Week 1: Touch Grass.

What I Built

In India, civic problems are rarely abstract. A road can remain broken long after the monsoon begins. A streetlight can stay out for weeks. A water-supply complaint can move from one office to another while residents are left wondering whom to ask and what to do next.

The frustrating part is that citizens often have rights on paper, but exercising those rights can feel like a different challenge altogether. Legal language is intimidating, information is scattered across government websites and documents, and even a simple question can become difficult: Which authority should I approach, what information can I ask for, and how do I write the request?

That gap is why I built Adhikaar AI — a civic and legal empowerment tool that helps people move from understanding their rights to taking an informed next step.

The idea connects directly with Touch Grass: start with a real problem in the world around you, not another reason to stay in front of a screen. Notice an issue in your neighbourhood, understand what information you need, use Adhikaar to prepare, and then take the next step offline.

Adhikaar currently has two main workflows:

  • RTI Drafting Agent: Turns a plain-language information request into a structured Right to Information (RTI) application, with relevant statutory references and a downloadable PDF.
  • Rights Navigator: Helps users make sense of supported tenant, consumer, workplace, and other rights-related issues by providing a plain-language explanation, practical next steps, and traceable legal citations.

The goal is not to replace a lawyer or promise that every complaint will be solved. It is to make the first step less confusing, so that a person is better equipped to ask questions, approach the relevant authority, and act on their rights.

Demo

Try Adhikaar AI: https://adhikaar-lake.vercel.app/

A sample query to try: “I want to know whether road repair work in my neighbourhood has been approved and what its current status is.”

Code

The project is open source: github.com/Ankitjha9990/Adhikaar

How I Built It

Adhikaar combines a web application with a separate AI service so the interface, application logic, and legal retrieval workflow can evolve independently.

  • Frontend: React 19, Vite, React Router, and Axios.
  • Backend API: Node.js and Express, including request validation and JWT-based authentication.
  • Database: MongoDB Atlas for application records and metadata.
  • AI service: Python, FastAPI, and Pydantic for request handling and structured output.
  • Legal retrieval: FAISS vector search over a curated set of Indian legal source documents.
  • Embeddings: Google Gemini embeddings for semantic retrieval.
  • Generation: Gemma 4, now integrated into the working application to generate the user-facing content.
  • PDF generation: ReportLab for downloadable RTI applications.
  • Deployment: Vercel for the frontend; Render for the backend and AI service.

Why retrieval matters for legal information

Legal help is not a place where confident-sounding guesses are good enough. Adhikaar retrieves relevant passages from its curated legal corpus and supplies that context to the generation step. Its prompts and structured outputs are designed to keep explanations tied to retrieved material and avoid inventing legal sections when the available sources do not support an answer.

The project also tracks whether curated legal sources are marked current or repealed, helping the workflow prefer current provisions. The corpus and department lookup are deliberately scoped rather than presented as a complete directory of every Indian law or authority.

Gemma 4 is used for generation within this retrieval-grounded workflow: the model helps turn the user's question and relevant context into an understandable explanation or draft. The retrieved legal sources—not the model's general knowledge—are the intended basis for legal citations. Learn more about Gemma 4.

Why Does Open Innovation Matter?

For a tool dealing with citizens' rights, the model should not be a mysterious authority that people have to trust blindly. It should be one component in a system where sources, scope, and limitations matter.

Using an open-weight model such as Gemma 4 gives developers more flexibility to study the model, adapt the surrounding workflow, evaluate alternatives, and choose how to deploy it as project needs change. It also reduces dependence on a single proprietary text-generation API. Open models make it easier for more developers and communities to experiment with tools shaped around local needs, languages, and public-service workflows.

That matters in India, where one-size-fits-all products can miss the way people actually experience civic problems: the local department they need, the language they are comfortable with, or the difference between a legal explanation and a document they can act on. Open innovation creates room to adapt the system and its source material for those realities.

Adhikaar is currently a web application and uses hosted services in its architecture; it is not being presented as a fully offline product. The value of the open-model approach here is flexibility and a system that can be inspected and improved—not a claim that every part already runs on a user's device.

For me, the heart of this project is simple: a citizen should not need to understand legal jargon before they can begin asking reasonable questions about their own neighbourhood, their work, their home, or their consumer rights. Technology should lower that barrier and then get out of the way, so the person can take action in the real world.

Prize Categories

  • Overall Winner — Hacktoberfest Open-Source AI Challenge: Week 1 — Touch Grass
  • Best Use of Gemma

Adhikaar AI — Know your rights. Take informed action.

Top comments (0)