Mobile
ModenX
A React Native retail app shipped to both stores in three months with no prior mobile experience.
- Client
- US retail
- Role
- Mobile lead
- Timeline
- 3 months
- Team
- 5 engineers
Problem
A US retail client needed a mobile app for in-store use, with two distinct user types: retailer staff and shoppers. Building two apps doubled maintenance cost. Building one app with two surfaces would ship slower if the architecture was wrong.
I had no prior React Native experience. Inside the 3-month deadline I had to learn the stack, own the architecture, coordinate a 5-engineer team, and ship to both App Store and Google Play on first or second submission.
Constraints
- 3 months, fixed.
- Single codebase, two surfaces, no fork.
- Offline-first for spotty in-store WiFi.
- App Store and Play approval on first or second submission.
- Four of five engineers also new to React Native.
Decisions
Chose
Single app with a role switch and a shared Redux store
Considered
Two apps in a monorepo
Why
Two apps double the release cycle, the analytics surface, and the bug-report routing. One app with a role-aware navigator kept the shared 80% shared and the diverging 20% explicit.
Chose
Offline-first with a queued-action middleware that replays on reconnect
Considered
Online-required with a "no connection" screen
Why
Retail WiFi is bad enough that an online-only app meant blocked checkout. Queued writes meant the experience kept working and synced when the network came back.
Chose
Mobile coding conventions written down on day three
Considered
Ad hoc style per engineer
Why
Four engineers new to React Native plus me. A short handbook eliminated 80% of the review nitpicks before week two.
Code sample
import type { Middleware } from '@reduxjs/toolkit'
type QueuedAction = {
id: string
action: { type: string; payload?: unknown }
ts: number
}
const STORAGE_KEY = 'modenx:queue'
function load(): QueuedAction[] {
try {
return JSON.parse(localStorage.getItem(STORAGE_KEY) ?? '[]')
} catch {
return []
}
}
function save(q: QueuedAction[]) {
localStorage.setItem(STORAGE_KEY, JSON.stringify(q))
}
export const offlineQueueMiddleware: Middleware = (store) => (next) => (action) => {
const a = action as { type: string; meta?: { offline?: boolean }; payload?: unknown }
const isWrite = a.type.endsWith('/post') || a.type.endsWith('/put')
const online = typeof navigator !== 'undefined' ? navigator.onLine : true
if (isWrite && !online) {
const queued: QueuedAction = {
id: crypto.randomUUID(),
action: { type: a.type, payload: a.payload },
ts: Date.now(),
}
const next = [...load(), queued]
save(next)
return next
}
return next(a)
}
// On 'online' event, replay queued actions in order, drop on 4xx,
// retry with backoff on 5xx. UI shows a small "syncing" pill.
if (typeof window !== 'undefined') {
window.addEventListener('online', async () => {
const queue = load()
save([])
for (const item of queue) {
// replay through the store, swallow errors per item
}
})
}Outcomes
- Shipped to both stores in 3 months.
- 100+ Play downloads in the first weeks, with positive review skew.
- Mobile handbook adopted as the team standard.
- The 5-engineer team was independent on the mobile codebase by the end of the first month.
What I would do differently
- Invest in Detox or Maestro E2E earlier. We caught real regressions in manual QA that automation would have flagged.
- Push for a TestFlight cadence from week two, not week eight.
Stack
Next case study
Compliance Workflows
A React Flow surface that surfaced in-flight customer-data workflows for an Amex compliance ops team.