DEV Community

Cover image for Litigence AI: Transforming Legal Awareness with Technology
SURENDAR S K
SURENDAR S K

Posted on

Litigence AI: Transforming Legal Awareness with Technology

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! 🌟

Top comments (11)

Collapse
 
karthidreamer profile image
Karthi Keyan

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

Collapse
 
sj_ranjitha_d65c654908502 profile image
sj ranjitha

Wonderful idea keep doing

Collapse
 
karthidreamer profile image
Karthi Keyan

Glad you like it!

Collapse
 
hariesh_k_bb20c479834743 profile image
Hariesh. K

Extraordinary

Collapse
 
udhayakumarn profile image
Udhaya-kumar-N

Looks like Copilot outsmarted Devin already

Collapse
 
kaliappan_l_7a566e4baf620 profile image
kaliappan l

Useful innovation for our society

Collapse
 
karthidreamer profile image
Karthi Keyan

Dev πŸ’» + AI 🧠 = Better World πŸŒπŸ’š

Collapse
 
sj_ranjitha_d65c654908502 profile image
sj ranjitha

Awesome

Collapse
 
kaliappanl_kaliappanl_9 profile image
Kaliappan.L Kaliappan.L

Good Idea

Collapse
 
karthidreamer profile image
Karthi Keyan

Thank you for your kind words!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.