SYS-01 // CASE STUDY

Maydani

Government Asset Inventory Management System — a modular Android field client for barcode & QR identification, Location-tagged inspections, NFC identity capture, and offline-first sync with centralized government databases.

GOVERNMENT FIELD OPS OFFLINE-FIRST

01 — OVERVIEW

What is Maydani?

Maydani (com.maydani.fieldops) is a production Android client built for government field teams who register, verify, and track assets and household records in the field. The app combines barcode & QR scanning, Map pinning, NFC identity reads, and offline-first local storage — syncing securely to centralized REST APIs when connectivity returns.

40+
GRADLE MODULES
v1.3
PRODUCTION BUILD
8+
FIELD WORKFLOWS
OFFLINE
REALM DRAFTS

THE CHALLENGE

Field teams without reliable connectivity

Government inspectors and census teams operate across remote areas with intermittent network access. They need fast asset identification, validated multi-step forms, Map-accurate location capture, and guaranteed data integrity — without losing work when the connection drops.

THE SOLUTION

Modular offline-first Android client

A 40+ module Kotlin codebase with Jetpack Compose UI, Hilt dependency injection, Realm for local drafts, and Retrofit for REST sync. Barcode/QR libraries (ZXing + ML Kit), Mapbox Maps with MGRS coordinates, and NFC e-passport reading integrate into unified field workflows.

02 — ARCHITECTURE

System design

Clean modular Android architecture: feature modules for each workflow, shared core libraries for network, navigation, Maps, NFC, and persistence — all wired through Hilt and MVVM.

FEATURE MODULES forms · tasks · scan Location map · NFC · docs Compose · MVVM CORE LIBS network · nav · ui Hilt · Coroutines REALM DB local drafts offline queue REST API Retrofit · Moshi RSA · JWT auth GOV BACKEND centralized DB task assignment
LAYER 1
Presentation — Jetpack Compose

Material 3 UI with feature-specific screens: multi-step registration forms, task lists, barcode scanner overlays, Map picker, and document capture flows.

LAYER 2
Domain — ViewModels & Use Cases

MVVM with Kotlin Coroutines and Flow for reactive state. Validation rules, duplicate detection, and RBAC gates enforced before any sync attempt.

LAYER 3
Data — Realm + Retrofit

Realm persists field drafts and pending uploads offline. Retrofit/OkHttp pushes validated records to government REST endpoints with RSA-encrypted JWT authentication.

LAYER 4
Hardware integration

ZXing + ML Kit barcode scanning, Mapbox Maps with MGRS grid references, NFC e-passport (JMRTD) for identity verification, and camera document scanning.

03 — CAPABILITIES

What the app does

End-to-end field operations for government asset inventory, verification, and census workflows — designed for teams working without reliable connectivity.

IDENTIFICATION

Barcode & QR scanning

Fast asset identification via ZXing embedded scanner and Google ML Kit barcode detection — minimizing manual entry errors in the field.

  • 1D/2D barcode support
  • Camera overlay UI
  • Instant lookup & validation

LOCATION

Map pinning

Mapbox-powered map interface with MGRS coordinate support — field teams pin exact asset or household locations for geospatial reporting.

  • Interactive map picker
  • MGRS grid references
  • Location-tagged records

IDENTITY

NFC e-passport reading

JMRTD-based NFC module reads chip data from Iraqi national ID cards and foreign passports — automating identity fields in registration forms.

  • APDU chip communication
  • Auto-fill form fields
  • Document photo capture

OFFLINE

Realm local persistence

All in-progress registrations and asset records save locally in Realm. Teams continue working without network; pending records queue for automatic sync.

  • Draft auto-save
  • Conflict-safe sync queue
  • Thousands of local records

WORKFLOWS

Multi-step field forms

Structured workflows for Iraqi and foreign family registration, residence updates, task assignment, and document verification — with field-level validation.

  • Step-by-step wizards
  • Duplicate detection
  • Role-based form access

SECURITY

Auth & audit

RSA key exchange with JWT session tokens, role-based access control, Sentry crash reporting, and OTA update delivery for controlled field deployments.

  • RSA + JWT authentication
  • RBAC permission gates
  • OTA update channel

04 — FIELD WORKFLOW

From scan to sync

The typical field operation pipeline — designed so teams never lose data, even in areas with no cellular coverage.

STEP 01
Receive task

Field agent logs in, receives assigned inspection or registration tasks from the government backend via REST.

STEP 02
Identify asset

Scan barcode/QR or read NFC identity chip to auto-populate record fields and validate against central databases.

STEP 03
Capture & pin

Complete multi-step form, attach documents, and drop a Location map pin with MGRS coordinates for the location.

STEP 04
Save offline

Record persists in Realm as a draft or pending submission — safe even if connectivity drops mid-form.

STEP 05
Sync on reconnect

Validated records upload automatically when network returns; audit trail confirms successful government DB integration.

05 — TECH STACK

Technologies used

Production-grade Android stack with modular architecture — 40+ Gradle modules organized for team scalability and feature isolation.

ANDROID

Kotlin 1.9 Jetpack Compose Material 3 Hilt MVVM Coroutines Flow Navigation ViewModel

DATA & NETWORK

Realm Retrofit OkHttp Moshi RSA + JWT REST API Sentry

HARDWARE & MAPS

ZXing ML Kit Barcode Mapbox MGRS NFC / JMRTD CameraX OTA Updates

MY CONTRIBUTION

Android architecture & field workflow engineering

Led development of the modular Android client — from core library design and REST integration to barcode scanning, Location mapping, NFC identity flows, and offline-first Realm persistence for government field teams.

  • Architected 40+ module Gradle project with feature isolation and shared core libraries
  • Built Jetpack Compose UI for multi-step registration, task management, and document capture
  • Integrated ZXing + ML Kit barcode scanning and Mapbox Maps with MGRS coordinate support
  • Implemented NFC e-passport (JMRTD) identity reading and auto-fill form integration
  • Designed Realm offline draft system with automatic sync queue and RBAC validation gates