Notes

React NativeExpoDesign systems

Building a driver app: tokens, data and a two-stage release

What I chose for a React Native app I built the foundation and release pipeline for: design tokens in one file, a typed API, and shipping the exact build testers used.

Applies to
React Native apps on Expo that ship to both stores without EAS.
Verified with
A fleet driver app I built the foundation and release pipeline for, 2025 to 2026.

I built the foundation and the release pipeline for a React Native app for fleet drivers, and led it from my prototype to the App Store and Google Play. Drivers use it to find the best place to fuel nearby, check amenities, see where to weigh their truck, and keep an eye on their spending and limits. These are the choices I'd make again, and a few traps worth knowing about.

The stack

Expo with Expo Router, but without EAS, mostly to avoid the subscription; native folders are generated on every build and kept out of git. Server data lives in TanStack Query, client state in small Zustand stores (one per domain), and forms in TanStack Form. We deliberately didn't port the web app's patterns over: a phone has different problems.

Design tokens in one file

Every colour, radius and type size lives in one CSS file, as a Tailwind v4 @theme block, and components use them through utility classes (Uniwind brings Tailwind to React Native). A few places can't use classes, like animated styles and SVG props, so a small typed TypeScript file mirrors the raw values for those. It's kept in step by hand, with a comment at the top saying so.

  1. The designbrand guide, designs in Figma
  2. One CSS filebrand colours, then semantic roles
  3. Used two ways
    Utility classesalmost every component
    Typed mirroranimations, SVG, navigation theme
  4. Checkedtoken stories in on-device Storybook
One source of truth. The typed mirror exists only for the places classes can't reach.

The tokens come in two layers. Brand colours first, then semantic roles that components actually use: background, surface, ink, muted, border, and success, warning, error and info. Components never use a raw hex value. When a design arrives in Figma, the agent reads it through the Figma MCP server and maps it onto those roles.

Two things I learned along the way:

There's also a DESIGN.md next to the app that describes the system in a form AI agents read before touching any UI.

A typed API the app can't break

The app talks to its own API, separate from the web app's, so a change made for the website can't quietly break the phone. CI generates a typed client from that API's OpenAPI spec, so a renamed field fails the build instead of crashing in a driver's hand.

And because people don't update apps the day you ship, old versions keep calling your API for weeks. So API changes are additive only, and anything breaking gets a new version. The app also reads a "recommended" and a "minimum" version from the server, and asks people to update, or makes them, when it falls behind.

Sign-in that doesn't log people out

All requests go through one shared fetch wrapper. When several requests find the session expired at the same moment, they share a single refresh and each retries once. Only a real "not allowed" answer from the server signs someone out; a flaky network never does. Biometric sign-in unlocks a token that the phone's own keychain holds, and simulators don't enforce the biometric check, so that part has to be tested on a real device.

Release: ship the build the testers used

The pipeline is Fastlane, run from GitHub Actions workflows that someone starts on purpose. You type in the version, and the build number is the workflow's run number, so it always goes up.

  1. BetaFirebase App Distribution for testers
  2. Store test trackTestFlight, or Play internal testing
  3. Check on devicesthe team tries the actual store build
  4. Submit that buildthe same binary, no rebuild
  5. Prompt to updateraise the recommended or minimum version
Two stages. The build Apple and Google review is byte for byte the one testers already used.

That last part is the one I'd keep above everything else: the store build goes to TestFlight or Play's internal track first, and the release submits that same uploaded build instead of building again.

The full pipeline, and every trap on the way to the first green build, is in Shipping an Expo app with Fastlane instead of EAS. The short version:

Things that only break in the real build

Testing on devices with an agent

For checking flows on simulators, I used argent, an MCP server from Software Mansion that lets an AI agent drive the simulator, compare screenshots, profile and record flows you can replay. Before any submission, the team checked the beta and store-track builds by hand.