Litigence AI: Transforming Legal Awareness with Technology
SURENDAR K S

SURENDAR K S @surendar_sk

Joined:
Nov 12, 2024

Litigence AI: Transforming Legal Awareness with Technology

Publish Date: Jan 20
32 14

This is a submission for the GitHub Copilot Challenge : Fresh Starts

What I Built 🚀

Litigence AI is a legal information platform designed to simplify access to Indian legal knowledge through advanced technology. Built with a focus on underserved communities, it provides personalized legal guidance via a conversational AI interface.

Technical Architecture 💻

  • Frontend: Developed using Flutter for a seamless user experience, currently in closed testing on the Play Console.
  • Backend: Flask-based backend hosted on Google Cloud Run ensures scalable and efficient processing.
  • AI Model: Powered by a fine-tuned Vertex AI model with Google's default grounding, enhanced with custom data for improved contextual accuracy.
  • Cloud Infrastructure: Firebase supports real-time web hosting and future web-based features.

Implemented Features

  1. Google & OTP Authentication: Simplified and secure user access integrated via Firebase.
  2. Law of the Day: Educates users daily on relevant laws to foster awareness.
  3. Onboarding Flow & Chat Interface: Smooth user onboarding and interactive legal guidance through a conversational chat system.

Demo 📱

Onboarding Screen I

Auth Screen

Otp-auth
Chat First Screen

Installation 📥

Release Mobile App - Direct Link 🔗

Repo 📂

Legal Chat App

Platform Platform

This is a Flutter-based chat application that utilizes the Gemini API for communication.

Project Overview

This application provides a basic chat interface where users can send and receive messages. The Gemini API is used to handle the communication logic.

Features

  • Real-time chat functionality.
  • Integration with the Gemini API.
  • User authentication (using Firebase).
  • Basic message display and input.

Project Setup

  1. Install Flutter: If you haven't already, install Flutter by following the instructions on the official Flutter website: https://flutter.dev/docs/get-started/install
  2. Clone the repository: Clone this repository to your local machine.
  3. Install dependencies: Navigate to the project directory and run flutter pub get to install the required dependencies.
  4. Configure Firebase:
    • Create a Firebase project and add the google-services.json file to the android/app directory.
    • Enable Firebase Authentication for your project.
  5. Set up Gemini API:
    • Configure any necessary API keys or credentials for the Gemini API within the application code (e.g., in lib/services/gemini_service.dart

Overview

This application provides a Flask-based API that can be run locally or deployed in a Google Cloud environment. Below are step-by-step instructions on installing dependencies, configuring Google Cloud, running the application, and testing the API locally.


Prerequisites

  1. Python 3 (for running the Flask application)
  2. Google Cloud SDK (for Google Cloud integration)
  3. curl (for API testing)

Running the Application Locally

  1. Clone or open the repository.
  2. Ensure you have installed Python dependencies (if applicable, use pip install -r requirements.txt).
  3. Run the application:
python main.py
Enter fullscreen mode Exit fullscreen mode

This starts the application at http://localhost:8000.


Installing Google Cloud SDK

Use the steps below on a Linux x86_64 machine:

curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-linux-x86_64.tar.gz
tar -xf google-cloud-cli-linux-x86_64.tar.gz
./google-cloud-sdk/install.sh
Enter fullscreen mode Exit fullscreen mode

(Optional) Add the Google Cloud CLI to your PATH:

# Example approach
echo "source ~/google-cloud-sdk/path.bash.inc" >> ~/.bashrc
source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

Initialize the SDK:

./google-cloud-sdk/bin/gcloud init
Enter fullscreen mode Exit fullscreen mode

Follow the prompts to choose your Google Cloud project and configure…

Copilot Experience ⚡

GitHub Copilot was my coding superhero! Here's how it supercharged development:

  • Smart Autocomplete: Blazing-fast code generation for Flask and Flutter
  • AI Pair Programming: Intelligent suggestions for complex implementations
  • Error Prevention: Helped craft robust error handlers
  • Testing Magic: Quick generation of comprehensive test cases
  • Code Refinement: Continuous suggestions for cleaner, better code

GitHub Models 🤖

While Litigence AI currently uses Vertex AI for its production environment (leveraging Google's grounding capabilities and Gemini's custom data integration), we're actively experimenting with GitHub Models, particularly o1, for enhanced RAG capabilities. Our testing involves comparing response accuracy and contextual understanding between different models. The results from these experiments will guide our future model selection, ensuring we deliver the most accurate and reliable legal guidance to our users.

Conclusion 🎯

Building Litigence AI has been an incredible journey for @karthidreamr, transforming a personal mission into a powerful tool for social change. Through the strategic use of GitHub Copilot and cloud technologies, what started as a response to childhood observations of legal inequality is now evolving into a platform that makes legal knowledge accessible to everyone.

The future of Litigence AI looks promising as we continue to enhance features and scale our impact. Together, we're working to ensure that legal awareness becomes a fundamental right, not a privilege! 🌟

Comments 14 total

  • Karthi Keyan
    Karthi KeyanJan 20, 2025

    Thank you Github for the student pro plan !
    Copilot is awesome, especially the Claude Sonnet 3.5 (new) is a real coder

  • sj ranjitha
    sj ranjithaJan 20, 2025

    Wonderful idea keep doing

  • sj ranjitha
    sj ranjithaJan 20, 2025

    Awesome

  • Kaliappan.L Kaliappan.L
    Kaliappan.L Kaliappan.LJan 20, 2025

    Good Idea

  • Hariesh. K
    Hariesh. KJan 20, 2025

    Extraordinary

    • Udhaya-kumar-N
      Udhaya-kumar-NJan 20, 2025

      Looks like Copilot outsmarted Devin already

  • kaliappan l
    kaliappan lJan 20, 2025

    Useful innovation for our society

    • Karthi Keyan
      Karthi KeyanJan 20, 2025

      Dev 💻 + AI 🧠 = Better World 🌍💚

  • Udhaya-kumar-N
    Udhaya-kumar-NJan 20, 2025

    Are you planning to continue its development further ?

    • Karthi Keyan
      Karthi KeyanJan 20, 2025

      Yeah! Upcoming Enhancements Include

      1.Chat History: Allow users to revisit previous interactions for better context retention.
      2.Web Hosting: Expand accessibility with a web-based platform using Firebase.
      3.Error Handling: Implement robust mechanisms like error popups, fallback pages etc for smoother user experience.
      4.Test Automation: Write comprehensive test cases to enhance system reliability and performance.

  • Parking Made Easy
    Parking Made EasyJan 24, 2025

    Nice!

  • Corpzo
    CorpzoMay 13, 2025

    Very Nice Excellent and Informative. Must Visit Here. annual compliance draft share purchase agreement Call Now!

Add comment