AI-powered Moroccan legal assistant platform that provides consultations, document generation, and guidance on administrative procedures localized in Moroccan Darija.
---
## 🇲🇦 About the Project
**Haqqi AI** is a free, mobile-first Moroccan legal assistant that helps citizens, law students, and legal experts navigate Moroccan law — all in Darija.
Built for the **ENSMR Hackathon 2026**, Haqqi AI bridges the gap between ordinary Moroccans and the legal system by making legal information accessible, understandable, and actionable.
### Target Users
| Level | User | Experience |
| ----- | ---------------------------- | --------------------------------------------------- |
| L1 | مواطن عادي — Citizen | Simple Darija Q&A, common legal scenarios |
| L2 | طالب قانون — Law Student | Law library, legislative references, research tools |
| L3 | محامي / خبير — Lawyer/Expert | Case management, AI drafting, document analysis |
---
## ✨ Features
- 🗣️ **Darija-first** — Ask legal questions in Moroccan Arabic
- ⚖️ **Moroccan Law RAG** — Answers grounded in official Moroccan legislation
- 👤 **3-level dashboard** — Personalized experience per user type
- 📁 **Case management** — Full case workspace for lawyers (L3)
- 📚 **Law library** — Browse moudawwana, labor code, criminal law
- 🔐 **Google OAuth** — Secure login with Supabase Auth
- 📄 **Document generation** — AI-drafted contracts and legal memos
- 🔒 **Privacy-first** — Row Level Security on all user data
---
## 🛠️ Tech Stack
### Frontend
- React 18 + TypeScript + Vite
- Tailwind CSS (RTL-first)
- Lucide React icons
- React Router v6
- Supabase JS client
### Backend
- Django + Django REST Framework (Python)
- REST API endpoints consumed by the frontend
### AI / RAG Pipeline
- LangChain + Gemini (language model)
- Pinecone (vector store for Moroccan law embeddings)
- RAG pipeline for grounded legal answers
- Supabase (PostgreSQL + Auth + Storage)
### Infrastructure
- Supabase (database, auth, storage)
- Google OAuth 2.0
- Vercel (frontend deployment)
---
## 🚀 Getting Started
### …