NCS Hackathon · June 2026 Hackathon NCS · Juin 2026هاكاثون NCS · جوان 2026

HOKOKI

An AI legal assistant for Algeria: ask a legal question in Arabic, check a contract, follow an administrative procedure step by step, or find a lawyer. Un assistant juridique IA pour l'Algérie : poser une question de droit en arabe, vérifier un contrat, suivre une démarche administrative pas à pas, ou trouver un avocat.مساعد قانوني بالذكاء الاصطناعي للجزائر: اطرح سؤالاً قانونياً بالعربية، أو تحقّق من عقد، أو اتبع إجراءً إدارياً خطوة بخطوة، أو ابحث عن محامٍ.

TeamÉquipeالفريق
Team project. I worked across the front end, the API and the AI service.Projet d'équipe. J'ai travaillé sur le front, l'API et le service IA.مشروع جماعي. عملت على الواجهة والـ API وخدمة الذكاء الاصطناعي.
ContextContexteالسياق
NCS Hackathon, AlgiersHackathon NCS, Algerهاكاثون NCS، الجزائر العاصمة
StackStackالتقنيات
React · TypeScript · Tailwind CSS · NestJS · PostgreSQL · LangChain · Chroma · Llama 3.3 (Groq)
LinksLiensالروابط
Live demoDémo en ligneالعرض التجريبي ↗ · Code ↗ · Team organizationOrganisation de l'équipeمنظمة الفريق ↗

01The problemLe problèmeالمشكلة

Algerian law is spread across official texts that are hard to search and hard to read. Most people don't know their rights, don't understand the contracts they sign, and get lost in administrative procedures. Asking a lawyer for every small question is expensive. Le droit algérien est éparpillé dans des textes officiels difficiles à chercher et à lire. La plupart des gens ne connaissent pas leurs droits, ne comprennent pas les contrats qu'ils signent et se perdent dans les démarches administratives. Consulter un avocat pour chaque petite question coûte cher.القانون الجزائري متفرّق في نصوص رسمية يصعب البحث فيها وقراءتها. أغلب الناس لا يعرفون حقوقهم، ولا يفهمون العقود التي يوقّعونها، ويضيعون في الإجراءات الإدارية. واستشارة محامٍ في كل سؤال صغير مكلفة.

HOKOKI ("my rights") puts everything in one mobile app, in Arabic. HOKOKI (« mes droits ») réunit tout dans une seule appli mobile, en arabe.تطبيق « حقوقي » (HOKOKI) يجمع كل ذلك في تطبيق واحد للهاتف، باللغة العربية.

02ArchitectureArchitectureالبنية

HOKOKI mobile screens: legal assistant, home and lawyers
  • Mobile-first web appAppli web mobileتطبيق ويب للهاتف

    React, TypeScript and Tailwind, right-to-left Arabic interface, with screens for citizens and a dashboard for lawyers.React, TypeScript et Tailwind, interface en arabe de droite à gauche, avec des écrans pour les citoyens et un tableau de bord pour les avocats.React و TypeScript و Tailwind، بواجهة عربية من اليمين إلى اليسار، مع شاشات للمواطنين ولوحة تحكم للمحامين.

  • Main APIAPI principaleالـ API الرئيسية

    NestJS and PostgreSQL: JWT authentication, laws, procedures with per-user progress, conversations, lawyer bookings, notifications, Swagger docs and rate limiting.NestJS et PostgreSQL : authentification JWT, lois, démarches avec la progression de chaque utilisateur, conversations, réservations d'avocats, notifications, documentation Swagger et limitation du débit.NestJS و PostgreSQL: مصادقة JWT، والقوانين، والإجراءات مع تقدّم كل مستخدم، والمحادثات، وحجز المحامين، والإشعارات، وتوثيق Swagger، وتحديد معدّل الطلبات.

  • AI serviceService IAخدمة الذكاء الاصطناعي

    A separate TypeScript service with LangChain: official law PDFs are split into articles, embedded and stored in a Chroma vector database; Llama 3.3 70B (via Groq) answers from the retrieved articles.Un service TypeScript séparé avec LangChain : les PDF officiels des lois sont découpés en articles, vectorisés et stockés dans une base vectorielle Chroma ; Llama 3.3 70B (via Groq) répond à partir des articles retrouvés.خدمة TypeScript مستقلة مع LangChain: تُقسَّم ملفات PDF الرسمية للقوانين إلى مواد، وتُحوَّل إلى متجهات وتُخزَّن في قاعدة بيانات متجهية Chroma؛ ويجيب نموذج Llama 3.3 70B (عبر Groq) انطلاقاً من المواد المسترجعة.

03How the AI worksComment fonctionne l'IAكيف يعمل الذكاء الاصطناعي

Answers grounded in the lawDes réponses fondées sur la loiإجابات مبنية على القانون

For each question, the service retrieves the most relevant articles (RAG) and the model answers from them, citing articles and sources instead of answering from memory. Pour chaque question, le service retrouve les articles les plus pertinents (RAG) et le modèle répond à partir d'eux, en citant articles et sources au lieu de répondre de mémoire.لكل سؤال، تسترجع الخدمة المواد الأكثر صلة (RAG) ويجيب النموذج انطلاقاً منها، مع ذكر المواد والمصادر بدل الإجابة من الذاكرة.

Contract analysisAnalyse de contratsتحليل العقود

A contract (text or PDF) is compared with the relevant legal articles. The result is a structured report validated by a schema: a compliance score out of 100, each issue with its severity, the article it breaks and a suggested fix, plus the mandatory clauses that are missing. Un contrat (texte ou PDF) est comparé aux articles de loi pertinents. Le résultat est un rapport structuré validé par un schéma : un score de conformité sur 100, chaque problème avec sa gravité, l'article enfreint et une correction proposée, plus les clauses obligatoires manquantes.يُقارَن العقد (نصاً أو PDF) بمواد القانون ذات الصلة. والنتيجة تقرير منظَّم يُتحقَّق منه بمخطط (schema): درجة مطابقة من 100، وكل مشكلة مع درجة خطورتها والمادة المخالَفة وتصحيح مقترح، إضافةً إلى البنود الإلزامية الناقصة.

Procedure guidesGuides de démarchesأدلة الإجراءات

The service first classifies the user's situation, then builds a step-by-step guide with the documents to bring and where to go, keeping the conversation history. Le service classe d'abord la situation de l'utilisateur, puis construit un guide pas à pas avec les documents à fournir et où aller, en gardant l'historique de la conversation.تصنّف الخدمة أولاً وضعية المستخدم، ثم تبني دليلاً خطوة بخطوة بالوثائق المطلوبة والجهة التي يجب التوجه إليها، مع الاحتفاظ بسجل المحادثة.

04ScreensÉcransالشاشات

Laws browser, procedures, contract analyzer and the lawyer dashboard (demo data).Les lois, les démarches, l'analyse de contrats et le tableau de bord avocat (données de démonstration).القوانين، والإجراءات، وتحليل العقود، ولوحة تحكم المحامي (بيانات تجريبية).

The public demo runs without the AI service: the app uses sample data and labelled sample answers. Sign in with any phone number and password (e.g. 0555123456 / demo1234). La démo publique tourne sans le service IA : l'appli utilise des données d'exemple et des réponses d'exemple signalées comme telles. Connectez-vous avec n'importe quel numéro et mot de passe (ex. 0555123456 / demo1234).العرض التجريبي العام يعمل دون خدمة الذكاء الاصطناعي: يستعمل التطبيق بيانات نموذجية وإجابات نموذجية مشار إليها بوضوح. سجّل الدخول بأي رقم وكلمة مرور (مثلاً 0555123456 / demo1234).

05What I learnedCe que j'ai apprisما تعلّمته

  • Building a RAG pipeline end to end: turning official PDFs into searchable articles, then getting answers that cite their sources.Construire une chaîne RAG de bout en bout : transformer des PDF officiels en articles consultables, puis obtenir des réponses qui citent leurs sources.بناء سلسلة RAG من البداية إلى النهاية: تحويل ملفات PDF رسمية إلى مواد قابلة للبحث، ثم الحصول على إجابات تذكر مصادرها.
  • Asking a model for structured output validated by a schema, so the front end can display a report instead of free text.Demander à un modèle une sortie structurée validée par un schéma, pour que le front affiche un rapport et non du texte libre.مطالبة النموذج بمخرجات منظَّمة يُتحقَّق منها بمخطط، لكي تعرض الواجهة تقريراً لا نصاً حراً.
  • Shipping a full product with a team in a few days: splitting the work between front end, API and AI, and agreeing on the contracts between them.Livrer un produit complet en équipe en quelques jours : répartir le travail entre front, API et IA, et se mettre d'accord sur les échanges entre eux.تسليم منتج كامل ضمن فريق في أيام قليلة: توزيع العمل بين الواجهة والـ API والذكاء الاصطناعي، والاتفاق على طريقة التواصل بينها.