Skip to content

codevector-2003/sentilex-ai-advocate

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

175 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sentilex Scale Logo

Sentilex AI Advocate

Autonomous Legal Support & Forensic Evidence Management System

"Bridging the Gap Between Trauma and Justice"

License: MIT Build Status Platform Docker Live Demo


πŸ›οΈ Vision

Sentilex is a pioneering multi-agent AI system designed to democratize legal access in Sri Lanka. It serves as a first-response legal advocate, conducting empathetic, trauma-aware interviews with victims, securing forensic-grade evidence via cryptographic hashing, and instantly generating court-admissible documentation compliant with the Computer Crimes Act No. 24 of 2007 and Online Safety Act No. 9 of 2024.


πŸš€ Key Features

πŸ•ŠοΈ Trauma-Aware Legal Interviewing

AI-powered empathetic conversations guide victims through incident reporting. The system uses intent-based routing to adapt responses for emergencies, legal guidance, and evidence collection without requiring prior legal knowledge.

βš–οΈ Intelligent Legal Analysis (RAG)

Retrieves and cites relevant provisions from Sri Lankan Law. Uses a Model Context Protocol (MCP) with full audit trails to prevent hallucinations, ensuring advice is legally sound and contextually accurate.

πŸ” Forensic-Grade Evidence Vault

Processes uploaded files with SHA-256 cryptographic hashing and metadata tracking (timestamps, S3 keys) to create a tamper-proof, court-admissible chain of custody.

πŸ“„ Professional Document Generation

Automatically generates submission-ready Police Statements and CERT Technical Reports, complete with structured incident narratives and evidence inventories.

πŸ›‘οΈ Verified Lawyer Directory

A searchable database of verified legal professionals. Includes a rigid verification workflow where lawyers upload NICs and Attorney Certificates for admin validation.


πŸ› οΈ Technology Stack

Frontend
Preact TypeScript TailwindCSS Vite VisX Motion

Backend & AI
FastAPI Python LangGraph LangChain Google Gemini SQLAlchemy Pydantic

Infrastructure & DevOps
DigitalOcean Docker Nginx PostgreSQL AWS S3


πŸ—οΈ System Architecture

Sentilex employs a secure, containerized microservices architecture:

  1. Entry Point: Traffic is routed through Cloudflare to an Nginx Reverse Proxy.
  2. Application Layer: Dockerized containers for Frontend (Preact) and Backend (FastAPI).
  3. Authentication: Robust IAM system handling Users, Lawyers, and Admins with JWT, OAuth (Google), and MFA (TOTP).
  4. Data Layer: PostgreSQL handles relational data (Users, Incidents), while AWS S3 stores encrypted evidence.
  5. AI Engine: A multi-agent system powered by LangGraph handles intent classification, legal reasoning, and safety validation.
  6. Real-Time Updates: WebSocket server pushes notifications (e.g., verification status) instantly to clients.

⚑ Quick Start with Docker

Run the entire application with a single command.

Prerequisites

  • Docker & Docker Compose

πŸš€ Launch

  1. Clone the repository

    git clone https://github.com/Smile-Labs-Inc/sentilex-ai-advocate.git
    cd sentilex-ai-advocate
  2. Environment Setup Create a .env file from the example.

    cp .env.example .env
  3. Start Services

    docker compose up -d --build

The application will be available at:

  • Frontend: http://localhost:8080
  • API Docs: http://localhost:8001/docs

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on how to submit pull requests, report issues, and suggest improvements.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ by Smile Labs Inc. for a Safer Digital Sri Lanka.

About

An autonomous AI legal advocate for trauma victims in Sri Lanka.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 54.3%
  • Python 41.7%
  • HTML 1.7%
  • CSS 1.4%
  • Jupyter Notebook 0.7%
  • Dockerfile 0.2%