Inspiration

In Pakistan, millions of women face harassment, domestic violence, and cyber abuse, yet legal help is often inaccessible due to cost, stigma, fear, and language barriers. Many cases go undocumented, weakening victims’ ability to seek justice.

SafeGuard AI was inspired by a simple question: What if women could safely understand their legal rights, document evidence, and access help without exposing their identity?

This project was built to empower women with knowledge, privacy, and actionable legal tools, available anytime and anywhere.

What It Does

SafeGuard AI is an AI-powered legal rights assistant for women in Pakistan that combines legal guidance, evidence documentation, and safety-first design in one platform.

Key Capabilities

  • AI legal assistance powered by Google Gemini 3

  • Context-aware responses based on Pakistani laws

  • Trauma-informed, non-judgmental language

  • Multimodal support for text, images, and documents

  • Bilingual legal support in English and Urdu with preserved legal meaning

  • Evidence timeline and documentation system

    • Persistent incident logging using SQLite
    • Witnesses, locations, timestamps, and file uploads
    • Court-ready PDF reports for legal proceedings
  • Privacy and safety by design

    • No login, no tracking, no analytics
    • Local-only data storage
    • Quick Exit safety feature
    • Anonymous usage
  • Legal aid and emergency resource directory with verified contacts

How I Built It

SafeGuard AI is a production-ready full-stack AI application.

Technology Stack

  • AI: Google Gemini 3

    • gemini-3-flash-preview for fast legal responses
    • gemini-3-pro-preview for Urdu translation and complex reasoning
  • Backend: Python 3.11, SQLite, ReportLab

  • Frontend: Streamlit with custom CSS and JavaScript

  • Deployment: Streamlit Community Cloud with GitHub auto-deployment

Structured prompts, system instructions, and temperature tuning were used to balance legal accuracy with empathetic responses.

Challenges I Ran Into

  • Designing an AI system for sensitive, real-world legal use cases
  • Ensuring legal correctness while minimizing hallucinations
  • Preserving user privacy and anonymity with persistent data storage
  • Implementing bilingual legal translation without loss of meaning
  • Designing a trauma-informed user experience that feels safe and supportive
  • Managing multimodal inputs within a Streamlit-based application

These challenges required careful trade-offs between performance, safety, and ethical responsibility.

Accomplishments That I am Proud Of

  • Built a Pakistan-specific legal AI assistant rather than a generic chatbot
  • Implemented a complete evidence management system with court-ready PDF export
  • Delivered accurate bilingual legal guidance using Gemini 3
  • Designed a privacy-first architecture with zero user tracking
  • Deployed a fully functional, real-world usable product
  • Created a solution with measurable social impact and scalability

What I Learned

This project strengthened our understanding of:

  • Responsible AI design for vulnerable users
  • Effective use of Gemini 3 multimodal capabilities
  • Privacy-first application architecture
  • Balancing AI reasoning with legal precision
  • Translating complex laws into accessible, human-centered experiences
  • Turning a hackathon prototype into a production-ready system

What’s Next for SafeGuard AI

  • Partnerships with verified lawyers and legal aid organizations
  • Optional encrypted cloud backups with user-controlled access
  • Voice-based interaction for accessibility and low literacy users
  • Expansion to other South Asian legal systems
  • Mobile-first progressive web application (PWA)
  • Legal awareness and education modules

SafeGuard AI aims to evolve into a trusted digital companion for women’s legal empowerment.

Built With

Share this project:

Updates