Moeid app: a comprehensive platform for smart legal services

Introduction

As the digital solution of the Moeid Legal Group, the Moeid app has transformed access to legal services. Developed by Karzaan Software Group, the platform combines legal expertise with modern technology to bring the full text of laws, online consultation with experienced lawyers, a legal calculations system and case management into a single integrated ecosystem. This review looks at the system’s technical architecture and innovations.


System architecture

The system is built on a cross-platform architecture with smart layering:

1. User layer (frontend)

  • Technology: Flutter 3.x + Dart 3.0
  • Key features:
    • Responsive design for mobile, tablet and web
    • Complex state management with Riverpod
    • Dynamic theming matched to Moeid’s brand identity
    • Dark mode support for long reading of legal texts

2. Services layer (backend)

  • Technology: Node.js 20 + Express.js
  • API structure:
    • A RESTful architecture with 50+ endpoints
    • JWT + OAuth2.0 authentication
    • Specialized modules:
      • LegalEngine: a smart search engine for laws
      • ConsultationManager: a scheduled appointment booking system
      • ChatSocket: a real-time chat service

3. Management layer (admin panel)

  • Technology: Yii2 PHP Framework
  • Key features:
    • Managing users and the group’s lawyers
    • Monitoring consultation sessions and chats
    • Usage statistics for the legal calculators
    • Updating the law database from the panel

4. Data layer (database)

  • Technology: MongoDB 7.0
  • Configuration:
    • A cluster setup with 3 nodes (primary + secondaries)
    • A replica set for fault tolerance

Key technologies

Component

Technologies

Used for

Frontend

Flutter, Dart, WebSocket

Online chat with lawyers

Backend

Node.js, Express, Socket.io

Real-time communication

Database

MongoDB Atlas, Mongoose ODM

Storing the hierarchy of laws

Admin

Yii2, MySQL, Bootstrap

Managing legal content

DevOps

Docker, Nginx, PM2

Integrated deployment


The smart core of the legal services

1. A comprehensive law database

  • A hierarchical storage structure in MongoDB

Search capabilities:

  • Smart search with combined filters (subject / article number / keywords)
  • Automatic suggestion of related concepts (auto-suggest)

2. A smart consultation system

  • Scheduled appointment booking:
    • Integrated with the Google Calendar API
    • SMS reminders one hour before the session
  • Online chat:
    • End-to-end encryption with AES-256
    • Messages stored after 24 hours (in line with privacy principles)

3. A legal calculations engine

  • Calculation algorithms:
    • Wages and salaries (insurance, tax, overtime)
    • Mahr (dowry), updated according to the inflation index
    • Diyeh (blood money), based on the yearly rulings
  • Output as a downloadable PDF in legal format

Security architecture

  1. Data security:
    • TLS 1.3 encryption on all communication
    • Field-level encryption in MongoDB for sensitive user information
  2. Access control:
    • Four access levels:
      • Regular users
      • Verified lawyers
      • Content managers
      • Super admins
  3. Legal compliance:
    • Compliance with the personal data protection law
    • Daily backups in a separate location

Content management system (Yii2 admin)

  • Key modules:
    • Managing the hierarchy of laws (as a tree)
    • Monitoring consultation sessions (date / time / duration / assigned lawyer)
    • Financial transaction reports
    • A dedicated lawyer panel for viewing assigned cases
  • Optimizations:
    • Data loading with AJAX pagination
    • Excel export of reports

Technical strengths

  1. An integrated ecosystem:
    • Instant synchronization between the mobile app and the admin panel
  2. Smart text processing:
    • Automatic detection of legal references (for example, Article 12 of the Civil Code)
  3. Scalability:
    • MongoDB sharding can be added to support 100,000+ users
  4. Extensibility:
    • Ready to integrate with government systems (document registration, electronic judicial service offices)

Conclusion

By drawing on a purposeful combination of modern technologies (Flutter, Node.js, MongoDB, Yii2), the Moeid app has democratized access to legal services. The platform not only simplifies the complexity of legal processes with features such as smart law search and automatic calculations, but also connects citizens directly with experts through its online consultation system. Its multi-layer architecture and focus on data security have built the trust needed in the sensitive field of legal services, and its technical innovations have made Moeid a pioneer of digital transformation in Iran’s legal system.

Future development

  • Implementing AI for case analysis (predicting how proceedings will unfold)
  • Adding legal notification services (changes in the law relevant to each user)
  • Integration with electronic judicial systems

To learn how apps are designed, these articles on the Karzaan blog may help: