# QanunOS (قانون أو إس) — Egyptian Legal Tech Platform & AI Legal RAG Assistant > QanunOS is the premier Egyptian legal tech platform combining a specialized AI Retrieval-Augmented Generation (RAG) assistant trained on Egyptian law with a complete digital office management ecosystem for lawyers. ## Platform Capabilities & Key Features QanunOS bridges native Egyptian legislation with state-of-the-art artificial intelligence to provide verified legal guidance, automated contract drafting, case management, and Bar Association validated lawyer directories. ### 1. AI Legal RAG Assistant & Egyptian Law Dictionary - **Comprehensive Vector Index**: Indexes 3,010+ active Egyptian legal articles across major codes. - **Strict Verbatim Citations**: Every AI output includes exact article numbers, law names, decree numbers, and legal text in Arabic (e.g. `المادة 163 من القانون المدني رقم 131 لسنة 1948`). - **Core Covered Legal Codes**: - **Civil Code (القانون المدني)**: Law No. 131 of 1948 (Contracts, Torts, Property, Obligations). - **Penal Code (قانون العقوبات)**: Law No. 58 of 1937 & modern amendments. - **Commercial & Corporate Law (القانون التجاري وقانون الشركات)**: Law No. 17 of 1999 & Law No. 159 of 1981. - **Labor Law (قانون العمل)**: Law No. 12 of 2003 & modern labor regulations. - **Family & Personal Status (قانون الأحوال الشخصية)**: Marriage, Inheritance, Custody, Alimony. - **Advocacy & Court Procedures (قانون المحاماة والمرافعات المدنية والتجارية)**: Law No. 17 of 1983 & Law No. 13 of 1968. ### 2. Lawyer Office Management System (نظام إدارة مكتب المحاماة) - **Case File Lifecycle (ملفات القضايا)**: Centralized management of cases across 10 structured dimensions: Hearings (الجلسات), Documents (المستندات), Tasks (المهام), Fees & Financials (الأتاريف والماليات), Powers of Attorney (التوكيلات), Court Experts (الخبراء), Witnesses (الشهود), Appeals (الطعون والاعتراضات), Opponent Data (خصوم القضية), and AI Tools. - **AI Legal Toolkit**: - **AI Case Summarizer**: Generates executive briefs for complex case files. - **AI Legal Notice Drafter**: Drafts warning letters and legal notices (إنذارات على يد محضر). - **AI Hearing Notes**: Prepares courtroom cross-examinations and pleading arguments. - **WhatsApp & Automated Reminders**: Automated hearing notifications sent via Meta WhatsApp Cloud API 24 hours and 2 hours prior to court sessions. ### 3. Egyptian Lawyers Directory & Credentials Validator Agent - **Bar Association Verification**: Includes an autonomous validation agent (`onboardingAgent`) that strictly verifies Egyptian Bar Association (نقابة المحامين المصرية) card numbers, registration tier (مقبول أمام: الابتدائي / الاستئناف / النقض), and national ID. - **Verified Directory**: Public directory connecting Egyptian citizens with verified lawyers by specialization and governorate. ### 4. Real-time Live Consultation Engine - **Socket.IO Real-time Audio/Video & Chat**: Enables instant online legal consultations between citizens and certified attorneys. ## Architecture & Technology Stack - **Frontend**: React 19, Vite, TailwindCSS v4, Zustand, Framer Motion, Lucide React (Full RTL Arabic support). - **Backend API**: Node.js, Express 5, Socket.IO, PostgreSQL (`pg`), Cloudflare R2 object storage. - **AI RAG Pipeline**: Python FastAPI + ChromaDB + Google Vertex AI (Gemini 2.5 Flash) with DeepSeek V4 fallback. ## API Integration & Public Endpoints - `GET /api/laws`: Browse and search 3,010+ Egyptian laws. - `GET /api/lawyers`: Search verified lawyers directory by governorate and specialization. - `GET /api/health/rag`: Check connection status of the RAG vector engine. - `POST /api/chat`: Submit natural language legal queries for AI RAG analysis with citations. ## Documentation & Full AI Specification For comprehensive article schemas, law indices, and extended RAG specifications, read [/llms-full.txt](https://qanunos.com/llms-full.txt). Official Website: [https://qanunos.com](https://qanunos.com)