Inspiration

This project was inspired by the growing need for accessible legal support in India — especially for individuals who may not have the legal knowledge, resources, or confidence to navigate complex systems. Many victims of crimes, harassment, or injustice suffer in silence due to fear, confusion, or lack of guidance. Our aim was to build a platform that empowers such individuals by offering immediate support, legal clarity, and a direct channel to report incidents safely.

What it does

This project is a comprehensive AI-powered legal support platform designed to empower users in times of distress or confusion. It provides the following core functionalities:

  1. Intelligent Legal Chatbot Understands user queries, even if emotional, vague, or informal. Analyzes the issue and provides detailed, law-specific explanations (IPC, CrPC, Acts, etc.). Suggests next steps, such as how to file an FIR, contact authorities, or gather evidence. Responds in an empathetic, clear, and structured format — with optional JSON output for frontend rendering.

  2. Emergency Contact System Based on the user's location, it displays a list of relevant emergency contacts like nearby police stations, hospitals, women’s helplines, and child protection services. Ensures immediate support access when a crisis occurs.

  3. Incident Reporting with Ticketing Users can report incidents by providing details such as the cause, location, and context. Each report is converted into a ticket and sent to the admin panel. The admin can forward the case to the appropriate department or authority for follow-up and resolution.

  4. OTP-Based User Verification Before submitting a report, users must verify their identity using their mobile number via OTP. This prevents spam/misuse and ensures accountability and traceability.

How we built it

Backend: Built with FastAPI to handle chat, authentication, reporting, and emergency contact APIs. AI Chatbot: Integrated an OpenAI-powered legal assistant, prompt-engineered to explain Indian laws and guide users empathetically. Database: Used PostgreSQL with Prisma ORM to manage users, reports, tickets, and emergency contacts. OTP Verification: Implemented secure mobile OTP-based user authentication for incident reporting. Emergency Contacts: Location-based system that fetches nearby police, helplines, and hospitals. Reporting & Tickets: Users submit incidents with location and cause; a ticket system forwards it to admins for escalation. Automation: Used APScheduler to clean up old chat messages every week.

Challenges we ran into

Legal Language Simplification: Translating complex legal sections into simplified, actionable advice without losing meaning was a major challenge.

Prompt Engineering: Tuning the AI to provide structured, empathetic, and useful legal responses required multiple iterations and careful wording.

OTP Security Flow: Ensuring that OTP verification was both secure and scalable for incident reports took careful API design.

Handling Sensitive Cases: Designing the system to respond gently to users in distress while also offering precise legal paths was a careful balance between empathy and accuracy.

Geolocation Integration: Mapping location to emergency contacts and authorities required accurate datasets and fallback mechanisms.

Accomplishments that we're proud of

Built an empathetic legal chatbot that simplifies complex Indian laws and offers personalized guidance.

Successfully implemented OTP-based contact verification to ensure secure and trustworthy user reports.

Designed a location-aware emergency system that connects users with relevant nearby support services instantly.

Developed a ticket-based reporting mechanism that routes incidents to the correct administrative department for real-world action.

Created a fully functional end-to-end workflow — from user input to automated legal response, verification, and escalation.

Achieved a balance between AI accuracy, data privacy, and user empathy, making the platform both helpful and humane.

What we learned

How to design empathetic AI prompts that respond to emotionally charged or vague user inputs with clarity and compassion.

How to securely implement OTP-based verification, location tracking, and ticket-based reporting systems in a scalable architecture.

The power of AI + public services to deliver real-world impact when combined with strong data design and user flow.

What's next for Sevak

Custom based As it is custom based, for now it trained according to Indian laws, but in future it can be trained based on any State or Country Laws.

Multilingual Support Integrate regional languages (like Hindi, Telugu, Tamil, etc.) to make the platform accessible to a broader population across India.

Live Chat with Legal Experts Enable real-time connection with verified legal advisors for sensitive or complex queries that require human input.

Mobile App Development Launch a cross-platform mobile app (Android/iOS) for better accessibility, especially in rural or remote areas.

Analytics Dashboard for Admins Provide government or legal bodies with visual insights and analytics based on reported cases and high-risk zones.

Partnership with NGOs & Authorities Collaborate with local authorities, legal aid centers, and NGOs to ensure cases are genuinely followed up and resolved.

AI Upgrades Improve the chatbot’s understanding using fine-tuned legal language models trained specifically on Indian law databases.

Anonymity and Mental Health Support Add anonymous reporting options and in-platform links to mental health counselors for victims dealing with trauma.

Built With

Share this project:

Updates