UI spec (JSON)
Rendered
Sample specs
Why teams ship this pattern
- Skip the app-store review cycle. Push a UI change by deploying a new JSON response; clients don't need a new binary.
- One server, many native clients. The iOS, Android, and web clients each interpret the same spec into their native widgets. The screen design lives in one place.
- A/B test layouts without code changes. Server returns variant A's spec to one cohort, variant B to another. The mobile app doesn't know.
Cost: every widget type the server can emit must already exist in the client. You can change layouts and copy freely; you can't ship a new widget without a release. Treat the spec as a versioned contract — bumping it is the same shape of work as bumping a public API.