
Shopify Engineering · 16 min readSwift & Apple platforms
Reflex: an architecture for building mobile apps with agents
Reflex is an MVVM‑based architecture that separates core logic from UI, exposing ViewModels via a JSON contract so a platform‑agnostic CLI can drive both iOS and Android apps headlessly. This enables agents to write, test, and iterate screens rapidly without simulators, keeping native implementations in sync through shared tests.
- Core module runs headlessly and contains no UI imports
- ViewModel contract is exposed as JSON for CLI interaction
- One test file validates behavior on both Swift and Kotlin implementations