Testers live in the app. They browse campaigns on a phone, take the photos there, and get the push when a reward is paid. The app has no backend of its own: it is a second client of the API the website uses. That keeps one implementation of every rule, and it moves the hard problem to a different place, which is keeping two clients and one server from drifting apart.

Shape

Three bands. In the app: an app shell on React Native and Expo with stack and tab navigation; an API client that sends one refresh on a 401 while other requests queue behind it; push, with the device token registered and opens tracked; and web views for the identity check, social login, address search and tracking. Shared with the web: the same /api, where the server knows the app by its user agent; deep links, where store links and app links open the matching screen; and a contract file listing the web paths the app's web views depend on. The API client points to the same /api, push to deep links, and web views to the contract file. Before a release: contract tests on contract and config changes, then Maestro flows end to end on a staging build, then an EAS build with profiles per environment, then the two stores for iOS and Android.
Figure 1. The app and what it shares with the web. Run-time calls go to the same API. Web views depend on web paths listed in a contract file, and a test in the app repository checks the sign-in web views against it.
PartTechnologyNotes
RuntimeReact Native 0.81, React 19, Expo SDK 54, the new architecture enabledTypeScript throughout
NavigationReact Navigation 7A root navigator switching between sign-in and main, bottom tabs for home, campaigns, shopping, deals, benefits, games and my page
HTTPaxios with interceptorsBearer token, one refresh at a time
PushFirebase Cloud Messaging with Expo notificationsForeground messages re-shown as local notifications
Crash and error reportingSentryReleases tagged with version and build
BuildEAS BuildProfiles for development, staging, preview and production
End-to-end testsMaestroFlows run against a staging build

One backend

The app calls the same /api routes as the browser and identifies itself with a user agent naming the platform and app version. The server branches on that in a few places where behaviour has to differ.

The cost of sharing is compatibility over time. A website is always the latest version. An app is whatever version each person last installed, and some people do not update for months. An API change that the current web client handles can break an app build from the spring. Two mechanisms exist for that.

  • The server answers API paths on the address old builds were compiled with, as described on the Architecture page.
  • A version endpoint answers the app’s update check.

Tokens and the refresh queue

The app stores an access token and a refresh token and sends the access token on every request. The server rotates refresh tokens on use, as described in Account checks from Redis, and refresh tokens that rotate, and that makes concurrency on the client matter. When the app returns to the foreground, several screens fetch at once. If the access token has expired, every one of those requests fails with a 401, and if each then tried to refresh, all but the first would present a refresh token that had just been replaced.

The HTTP client handles this in one place. The pseudo-code below was written for this page.

on a response with status 401:
    if a refresh is in flight:
        park this request in a queue and wait
    else:
        mark a refresh as in flight
        send the refresh token to the refresh route
            success:
                store the new access and refresh tokens
                replay every parked request with the new access token
            failure:
                clear the stored tokens
                emit a forced-logout event
                reset navigation to the sign-in screen

One refresh goes out however many requests failed. The forced-logout path is an event, not a direct navigation call, so the HTTP layer does not need to know about screens.

Push

The app registers its push token with the server, together with a device id, whether notifications are enabled and the app version. Opening a notification reports back to an open-tracking route, which records the open against that push.

Messages that arrive while the app is in the foreground are not shown by the operating system, so the app re-posts them as local notifications. A background handler registered at the entry point handles the rest. On the server, sends are batched, device tokens that the push service rejects are cleaned up by a nightly job, and scheduled push campaigns are dispatched every five minutes.

A link to a campaign should open the campaign, whether it arrives in a KakaoTalk message, a push or a browser.

  • A custom URL scheme covers links the product generates for itself.
  • iOS associated domains and Android verified app links cover ordinary web links: campaign lists, a product in the shop, a deal, email verification, quizzes, inquiries and point history. The web server publishes the association files those mechanisms require.
  • A custom path-to-screen function in the app maps each path to a navigator state, so a link can land on a screen nested inside a tab with the right back stack.

Web views and the contract

Some flows are not rebuilt natively. Social sign-in with Kakao and Naver, identity verification, address search, parcel tracking and one of the games run as web pages inside a web view. The app watches the web view’s navigation and reacts when it reaches certain paths.

That creates a dependency no compiler sees. If someone renames a callback path on the web, the web still works and the app’s sign-in silently stops completing.

The web paths the app relies on are therefore written down in a contract file in the app repository. One test reads the source of the Kakao and Naver sign-in web views, extracts every path they intercept, and fails if one is missing from the file. The check lives on the app’s side. It catches app code that starts depending on an unlisted path, and a rename made in the web repository is outside what it can see.

Contract testSubject
Web-view contractEach path intercepted by the Kakao and Naver sign-in web views appears in the contract file
EndpointsProduction, staging and development resolve to different API hosts, and the environment badge is hidden in production builds
App configurationThe app’s identifiers: URL scheme, iOS bundle id, Android package
Build profilesThe staging and production EAS profiles each set their own environment
Flow environmentEach end-to-end flow asserts the environment badge right after launch, and no assertion is marked optional
Promise mapEvery end-to-end test appears in the promise map, with no duplicate check ids

A workflow runs them on pull requests that touch the contract folder, the end-to-end flows, the environment config, the app config or the build profiles.

Releases

Builds are made with EAS from four profiles: a development client, an internal staging build, a preview build against production, and the store build. Version and build numbers are kept in the app config and bumped by hand. There are no over-the-air updates: every change, including JavaScript-only ones, ships as a store build and goes through review.

VersionDateNote
1.0April 2025The version in the app config at the repository’s first commits
1.1November 2025 
1.2December 2025 
1.3March 2026Build 50
1.4April 2026 
 July 2026Expo SDK 53 to 54
1.5August 2026 
1.6November 2026Version 1.6.2, build 85

End-to-end coverage is a set of Maestro flows run against a staging build, with reusable sub-flows for common steps. They run on a Mac in the office by default, with a hosted Linux runner for Android as a manual fallback.

Failure modes

What happensWhat the system doesCovered by
Several requests fail with 401 at onceOne refresh is sent and the rest wait for itThe interceptor’s queue
The refresh itself failsTokens are cleared and the app returns to sign-inThe forced-logout event
A sign-in web view starts intercepting a path that is not in the contract fileThe contract test failsThe web-view contract test
A push arrives while the app is openIt is re-posted as a local notificationThe foreground handler
A link targets a screen inside a tabThe path-to-screen function builds the navigator stateThe custom link resolver
A device token goes staleThe nightly cleanup removes itThe cleanup job on the server

Limits

  • No over-the-air updates. A fix for a JavaScript bug takes a store review cycle. The trade is that what is in the store is exactly what is running.
  • Release numbers are manual. Bumping the version and build is a step a person performs, and only iOS has an automated submit profile.
  • End-to-end flows are not on every pull request. They need a built app and a device, so they run on demand against staging.
  • The contract workflow is filtered by path. It runs when the contract, the flows or the configuration change. A pull request that edits only a web-view component does not trigger it.
  • Old versions stay in the field. The API has to keep serving them.