Mohami Plus
Your legal counsel, ready in a moment
An AI legal assistant for Iraq: 18 AI legal services, provider fallback, Arabic PDF contracts and a Flutter web platform with a real desktop shell.
- Country
Iraq
- Type
- Client project
- Timeline
- 2026
- Platforms
- Android · iOS · Web
- AI legal services
- 18
- contract templates
- 28
- courts in the directory
- 59
- legal dictionary terms
- 233
Overview
Mohami Plus is a legal-services product for Iraq. It puts an AI legal assistant, lawyer search, case files, official contract templates and everyday legal tools into one Arabic and English app that runs on Android, iOS and the web from a single Flutter codebase.
It shares its engine with LegalPal, a sister app for lawyers in Palestine, but is built for Iraq: Iraqi law, courts and governorates, IQD pricing, its own navy-and-gold brand and features LegalPal does not have.
I delivered the October 2026 relaunch end to end: the redesigned app, the Laravel backend with a new AI gateway, the admin dashboard, a bilingual landing site and a Flutter web platform built from the mobile codebase.
The challenge
- 01
AI that writes like a lawyer: a lawsuit petition must follow the structure of the Iraqi Civil Procedure Law (No. 83 of 1969), with placeholders for missing facts and no made-up article numbers.
- 02
AI that keeps working: free tiers run out and providers go down, and one provider was out of credits during the build. A dead provider must never mean a dead feature.
- 03
A dated app that had to feel premium: about 70 screens with hard-coded colors and Arabic-only strings, redesigned and translated without breaking a flow.
- 04
Shared hosting: no daemons, queue workers or socket server, so everything runs synchronously with timeouts.
- 05
One codebase, two form factors: on a 1440 px monitor the phone app had to feel like a real desktop product, without forking screens.
Two parts, one product
Mobile app
The Flutter app for Android, iOS and web: 18 AI legal services, provider fallback, Arabic PDF contracts, legal tools and emergency help.
GitHub 02Web surfaces
A bilingual landing site and a Flutter web platform with a desktop shell, guest mode and deep links, built from the mobile codebase.
GitHubHighlights
AI legal assistant
- A chat assistant tuned for Iraqi law that reads photos of documents and remembers the conversation.
- 18 specialised AI services managed from the dashboard, from lawsuit petitions and contract drafting to contract review, power of attorney, appeals and legal translation.
- Results export as a formatted Arabic PDF.
Legal tools and emergency help
- Official contract templates with fill-in fields, merged on the server into Arabic PDFs.
- A dictionary of Iraqi legal terms, a deadline calculator for appeal periods, an inheritance helper and procedure guides.
- A library of Iraqi laws, court decisions and books.
- An SOS screen that opens WhatsApp to support, optionally with live location, plus know-your-rights cards for arrest, summons, search and interrogation.
Practice and product quality
- Case files with sessions and updates, a lawyer agenda, notes and local reminders for sessions and deadlines.
- A lawyer directory, paid legal services, a community timeline, support chat and ZainCash subscriptions.
- A design system with tokens derived from the brand color and a 'Midnight Aurora' dark mode.
- Runtime RTL/LTR switching, server-side feature flags and update control, and remote error logging.
Web platform and landing site
- A desktop shell around the whole Flutter app: collapsible sidebar, top bar with Ctrl/⌘ K search, language and theme toggles, and content in a card up to 1280 px wide.
- Guest mode: public screens open freely, and protected routes show a sign-in sheet only when the visitor acts.
- Path URLs, browser back and forward, and short aliases such as /faq, /privacy and /terms.
- A hand-written HTML, CSS and vanilla JS landing site in Arabic and English, light and dark, with live counters from the API and SEO basics.
Signature feature
An AI assistant that knows Iraqi law
- The user chats freely or picks a service such as Lawsuit petition. Each service has its own system prompt, editable by the admin in the dashboard.
- Text and up to four images go to
POST /ai/services/{slug}/runon the backend. The app never holds an AI key. - The AI gateway tries the primary provider first and, on 401/402/403/429/5xx errors, timeouts or quota messages, falls through to the next enabled provider (Gemini or Grok). Every attempt is logged with latency.
- Prompts force formal, structured Arabic. A petition follows the statutory structure: court header, parties, facts, legal grounds, requests and signature lines, with
[....]placeholders for missing details. - The result is shown as Markdown, and one tap renders it as a PDF on the server. Guests are rate-limited by IP; signed-in users have a daily limit.
Screens
Mobile app
Swipe for more
Web surfaces
Swipe for more
Engineering notes
- 01
Prompts as data, not code
The 18 AI services live in an
ai_servicestable with slug, bilingual titles, icon, color, category and system prompt. The app builds its AI hub fromGET /ai/services, so a new service needs no app release. - 02
Provider fallback
The gateway sorts enabled providers by priority and treats auth, quota, rate-limit, server and timeout failures as 'try the next one', logging provider, model, status and latency. When a slow model once took 93 seconds, the primary model became editable in the dashboard.
- 03
Arabic PDFs on shared hosting
Contract templates hold
##$$label##$$placeholders that the server extracts as form fields, escaping user input before merging. mPDF renders the result with bundled Arabic fonts. - 04
A redesign without regressions
A shared brief kept every cubit call, route name and cache key and changed only visuals. About 70 UI files moved to
context.colorstokens and shared components, and every left/right inset became directional, so English is real LTR, not mirrored Arabic. - 05
A desktop shell installed once
The web shell lives in
MaterialApp.builder, so every existing route renders inside it and no screen was rewritten. The content card gets its ownMediaQuery, and below 1000 px the shell returns its child untouched. - 06
Observability and honest numbers
A remote logger batches de-duplicated errors without ever logging headers, tokens or bodies. The landing page only shows counters the API returns and degrades quietly if the request fails.
Results
- Live on the web: the landing site at mohami.plus and the Flutter web platform at mohami.plus/home.
- At the time of writing the landing page showed 18 AI services, 28 contract templates, 59 courts and 233 dictionary terms, all read live from the API.
- About 70 screens redesigned with
flutter analyzeat 0 errors. - Store listings for Google Play and the App Store were marked 'coming soon'. The same engine powers LegalPal, live in Palestine.
Stack
- Flutter
- Flutter Web
- Bloc / Cubit
- Dio
- Hive
- easy_localization
- Firebase
- Laravel 12
- MySQL
- Gemini
- Grok
- mPDF
- HTML / CSS / JS