JurisPath

A mobile legal assistant that uses AI to analyze everyday legal problems faced by Turkish citizens.

What It Does

Many people in Turkey end up on the losing side of a legal issue simply because they don't know their rights. JurisPath takes common problems in employment, rent disputes, consumer rights, family law, and traffic fines, analyzes them with AI, and explains in plain language what the person's rights are, what steps to take, and which documents they'll need.

It goes beyond giving information. The app pulls the relevant articles of Turkish law from a database, drafts a petition or legal notice tailored to the situation, and builds a concrete action plan.

Features

  • 🤖 AI-powered legal analysis: GPT-4o-mini analyzes the problem and returns a plain-language explanation and an action plan
  • ⚖️ Broad coverage: employment, consumer, rental, family, criminal, and traffic law
  • 📊 Confidence score (1–100%): every analysis shows how confident the model is in its answer
  • 📋 Statute references: relevant articles of Turkish law are retrieved via RAG from a Supabase vector database (pgvector)
  • 📄 Document and image analysis: upload a PDF or photo, such as a contract or official notice, and include it in the analysis
  • 📝 Automatic petition drafting: generates a case-specific petition or legal notice, downloadable as PDF
  • 🗺️ Step-by-step roadmap: lists the steps to follow, the documents required, and deadline warnings

Tech Stack

Layer Technology
Mobile app React Native (Expo), expo-image
Authentication Supabase Auth (email/password, Google OAuth)
Backend API Python, FastAPI, Uvicorn
AI OpenAI GPT-4o-mini (JSON mode, multimodal)
RAG pipeline HuggingFace BGE-M3 embeddings → Supabase pgvector
Database Supabase (PostgreSQL + pgvector + RLS)
Document processing pypdf (PDF text extraction), Base64 image encoding

📱 Screenshots

Welcome Login Home
AI Analysis Credits & Plans Petition Preview

Project Structure

jurispath-backend/    → FastAPI backend (RAG + LLM API)
jurispath-mobile/     → React Native / Expo mobile app

Getting Started

Backend

cd jurispath-backend

# Create and activate a virtual environment
python -m venv venv
venv\Scripts\activate        # Windows
# source venv/bin/activate   # Mac/Linux

# Install dependencies
pip install -r requirements.txt

# Create a .env file and add your keys
# OPENAI_API_KEY=sk-your-key-here
# SUPABASE_URL=https://your-project.supabase.co
# SUPABASE_KEY=your-anon-key

# Start the server
uvicorn main:app --reload --host 0.0.0.0 --port 8000

Mobile App

cd jurispath-mobile

# Install dependencies
npm install

# Start Expo
npx expo start

API Endpoint

POST /analyze

{
  "problem": "My employment contract was terminated. What are my rights?"
}

Disclaimer

JurisPath provides general legal information, not legal advice. It is not a substitute for a licensed attorney.

License

This is a personal portfolio project.

Built With

Share this project:

Updates