rss_feed

About

Senior Mobile Engineer building offline-first systems with Kotlin Multiplatform

I’m Ubadah Jafry, a senior mobile engineer with 7+ years of experience building mobile and backend systems. I own the Android app, the Kotlin Multiplatform shared library, and app-side architecture at Trails Offroad — an offline-first navigation app where everything has to work reliably with no network.

Current Work

I rewrote the Trails Offroad Android app from scratch — legacy XML and multiple Activities into a unified Jetpack Compose app with MVI and clean architecture. I built the KMP shared library from zero: 38,000+ lines of code across 88 modules, holding all business logic, database, networking, and synchronization for both Android and iOS.

The hardest problems I solve are the ones users never see. A priority-aware reactive sync engine that keeps offline edits instant while background pulls run without conflicts. A crash-recoverable state machine that downloads 7 heterogeneous offline map assets with deterministic recovery. A real-time GPS recording optimizer that simplifies thousands of coordinates on a live track using sliding-window Ramer-Douglas-Peucker.

Before That

I spent nearly 4 years at Vyro — grew from Android Developer to Technical Lead. I introduced Kotlin Multiplatform to the company and built the unified cross-platform SDK during KMP’s early beta. Apps reached 800k+ active users and 150M+ downloads.

As the company transitioned to web, I expanded into backend and infrastructure: Go microservices serving 8M+ daily requests, a fault-resistant API gateway with 99.95% uptime on Kubernetes, full OpenTelemetry observability, and CI/CD pipelines across mobile platforms. I directed 20+ developers and established standards that raised development efficiency by 40%.

Earlier Work

At Zeros, I engineered platform-neutral bytecode for domain-specific languages and built associated toolchains. At Awaaz, I created educational Android applications for children with autism — specialized UI, MVVM architecture, offline-capable networking, and a Python FastAPI backend optimized for 10,000+ reads/second. At Oxford Epidemiology Services, I built healthcare Android apps for low-end devices with 2G compatibility, offline support, and encryption-first design.

Core Stack

Kotlin, Kotlin Multiplatform (KMP), Jetpack Compose, SQLDelight, Coroutines/Flow, Clean Architecture, MVI, Gradle, Koin, Go, Kubernetes, OpenTelemetry.


Experience

Trails Offroad — Senior Mobile Engineer

June 2024 – Present · Lakewood, Colorado, United States

Owner of the Android application, the Kotlin Multiplatform (KMP) shared library powering Android and iOS, and app-side architecture decisions.

Android App — Full Rewrite:

  • Rewrote the entire Android app from legacy XML/multi-Activity/Fragment to a unified Jetpack Compose application with MVI and clean architecture, replacing 15+ legacy libraries
  • Result: single-activity architecture with consistent state management, dramatically improved maintainability and testability

Kotlin Multiplatform (KMP) Shared Library — 38k LOC, 88 Modules:

  • Built the cross-platform shared library from scratch using Kotlin Multiplatform. Contains all business logic, database layer (SQLDelight), networking, and synchronization for both Android and iOS. Apps retain only UI, analytics, and platform integrations.
  • Enforced clean architecture across all 88 modules with automated Konsist tests (13 test files enforcing layer boundaries, dependency direction, and entity isolation in CI)

Key Systems (designed and implemented):

  • Offline Sync Engine: Priority-aware reactive synchronization using Kotlin Coroutines and Flow. Two parallel streams (push/pull) share a single ActionStorage queue. flatMapLatest creates implicit priority — user actions instantly cancel in-flight pull operations. Zero perceived lag, no data conflicts.

  • Crash-Recoverable Asset Downloader: Persistent state machine for downloading 7 heterogeneous offline map assets (3 tile layers + 4 API data sets). Each asset tracks phase, status, and timeline. Deterministic crash recovery via database-stored checkpoints. Fully extensible — adding a new asset type requires one enum entry and its handler.

  • TaggedMutex — Coroutine-Safe Reentrant Lock: Custom reentrant mutex for Kotlin Coroutines that uses logical tags instead of thread/coroutine identity. Solves the standard Mutex deadlock problem in structured concurrency.

  • Live GPS Recording Optimizer: Real-time coordinate simplification (Ramer-Douglas-Peucker) on active GPS recordings using sliding windows of 1,000 points. SQLDelight reactive query invalidation provides zero-cost batch signaling.

  • Type-Safe Heterogeneous Storage (DataContainer): Reflection-free container using phantom type tokens (Token<T, C>) for passing heterogeneous query results through the presentation layer without casting.

  • Custom Gradle Convention Plugin DSL: Captures multiple configuration closures applied after KMP plugin load via plugins.withType<>. Integrates Koin compile-time dependency injection verification.

  • Optimized Android Auto integration for app-to-vehicle communication

  • Established version control, code quality, and code review standards — reduced ANR and crash rate to <1% and improved rating from 2.8 to 4.3 stars on Google Play Store.


Vyro

3 years 9 months — Android Developer to Technical Lead

Technical Lead · April 2023 – June 2024 · Lahore, Pakistan

Worked end-to-end — debugging from mobile UI to raw database on a local stack when needed. Responsibilities shifted to backend and infrastructure as the company transitioned to web.

Mobile & Cross-Platform:

  • Introduced Kotlin Multiplatform Mobile (KMM) to the company. Built 10+ cross-platform libraries (payment processing, authentication, analytics, advertising) as plug-and-play SDKs — reduced per-feature development time by 20-30%
  • Built a unified KMP SDK during Kotlin Multiplatform’s early beta for both iOS and Android apps. Became the foundation for all cross-platform development at Vyro.
  • Led adoption of MVI and Clean Architecture using KMM. Apps grew to 800k+ active users and 150M+ downloads.
  • Directed 20+ developers, establishing standards that raised development efficiency by 40%

Backend & Infrastructure (Go, Kubernetes, Observability):

  • Architected backend platform in Go — started with Fiber, migrated to Chi. Scalable microservices serving 8M+ daily requests for 100+ ML services.
  • Built fault-resistant Go API gateway for AI services — load balancing, authorization, 99.95% uptime on Kubernetes
  • Designed CI/CD pipelines for mobile platforms, standardizing build, test, and release workflows
  • Deployed full OpenTelemetry observability stack (tracing, metrics, logging) across backend services
  • Created custom Kubernetes auto-scaler in Go for dynamic resource allocation from real-time traffic — improved cloud efficiency by 30%
  • Supported ML team’s migration from bare-metal Kubernetes to DigitalOcean managed clusters — verified deployments, resource allocation, and observability

Senior Android Developer · October 2022 – March 2023 · Islamabad, Pakistan

  • Defined foundational architecture for Flutter cross-platform projects. Created core libraries for ad and payment integration in the Flutter ecosystem.
  • Established development workflows and testing methodologies across Android and Flutter teams

Android Developer · January 2021 – September 2022 · Islamabad, Pakistan

  • Primary developer and architect for PhotoTune — built as a configurable platform adaptable across multiple Android apps with diverse features and use cases
  • Developed scalable ad abstractions supporting multiple providers with mediation and cache management
  • Built stateless payment client wrapping Google Billing library, abstracting transactional boilerplate
  • Created Gradle plugin for compile-time string encryption (AES-256)

Android Developer · October 2020 – January 2021 · Islamabad, Pakistan

  • Migrated initial prototype to Kotlin with improved architecture that became the foundation for all Vyro products
  • Rewrote ML model interaction libraries with caching and memory safety

Zeros — Software Engineer

July 2021 – January 2022 · Colorado, United States

  • Built foundational implementations across Python, Java/Kotlin, and MERN stack
  • Engineered platform-neutral bytecode for domain-specific languages, enhanced associated toolchains (IDEs, utilities)
  • Developed universal macro recorder/replayer using Python, Selenium, and Chrome DevTools

Awaaz — Software Engineer

January 2020 – January 2021 · Islamabad, Pakistan

  • Created educational Android tablet applications for children with autism with specialized UI for learning engagement
  • Refactored to MVVM architecture — reduced crashes and ANRs to 0.1%
  • Implemented image caching (30% memory reduction) and offline-capable network layer
  • Revamped backend APIs with Python FastAPI — optimized for 10,000+ reads per second

Oxford Epidemiology Services — Software Engineer

June 2019 – May 2020 · McLean, Virginia, United States

  • Built iReferNow and DatAdvanture — healthcare Android apps optimized for low-end devices with 2G compatibility, offline support, and custom scheduler (40% faster data collection)
  • Engineered with MVVM and Clean Architecture, prioritizing encryption and privacy — 20-25% performance improvement
  • Enhanced PHP backend for burst traffic — 99.9% uptime
  • Optimized synchronization for low-connectivity environments, reducing data transfer latency by 30%
  • Redesigned database: unnormalized MySQL to normalized PostgreSQL, 40% efficiency gain, 3x concurrent user capacity

Education

National University of Sciences and Technology (NUST) Bachelor’s, Software Engineering · September 2018 – June 2022

Skills

Mobile: Kotlin, Jetpack Compose, Kotlin Multiplatform (KMP), SQLDelight, Coroutines/Flow, Clean Architecture, MVI, Android Auto, Koin, Flutter

Backend: Go, Microservices, REST APIs, Kubernetes, OpenTelemetry, Python, FastAPI

Tools: Gradle (custom plugins + convention DSL), CI/CD, Git, Docker

About This Site

This site is built with Hugo, served by Caddy, and comments are powered by Remark42. Everything runs in Docker, tunneled through Cloudflare.

Get in Touch