DevXTools

WanderWeird: Tracing a Multi-Service Expo App with Mockifyer

By Sebastian Gedda, creator and maintainer of Mockifyer

devxtools.dev is run by Sebastian Gedda, who also builds and maintains Mockifyer, the tool this guide demonstrates. This is a maker's walkthrough of a demo app, not a neutral review.

Tested with Screens captured from one local run on 2026-10-21 (Chrome plus an iOS simulator, iPhone 17 Pro) with @sgedda/mockifyer-core 1.10.187, @sgedda/mockifyer-fetch 1.8.104 and @sgedda/mockifyer-dashboard 1.5.91. These versions are not pinned: they were the latest npm releases on that date, not versions confirmed against the example's package.json. The commands in this guide have not been run end to end from a clean checkout.

By Sebastian Gedda. Disclosure: I build and maintain Mockifyer, the open-source tool this guide uses, and I run devxtools.dev. Read this as a walkthrough of my own demo app, not a comparison. The neutral overview is on the Mockifyer tool page.

WanderWeird is a demo travel app built to show Mockifyer in a multi-service setup. You log in, plan made-up trips to places like Atlantis Boardwalk or Moon Base Brunch Bar, check real weather and exchange rates, stamp a passport and roll chaos dice. Behind it are seven small Node services, an Umbraco CMS and Mockifyer, which records and replays the services’ outbound HTTP calls and shows how one request fans out across them.

Tested with: the screenshots and recordings come from one local run on 2026-10-21. The commands below have not been run end to end from a clean checkout, so treat script names, ports and defaults as the example’s intended setup and check them against its package.json. The example isn’t in a public repository yet.

Other tools may fit better. If you write handlers by hand rather than recording traffic, MSW covers browser, Node and React Native tests with one API. For Node-only HTTP stubbing in unit tests, nock is smaller and widely used. If you want record/replay in Node or the browser without a dashboard, Polly.js does that. Mockifyer’s angle is recording across several services and an Expo app into shared scenarios, with a dashboard and hop tracing. That’s useful for a setup like this, but more machinery than a single service needs.

What’s inside

FolderWhat it doesPort
apps/mobileExpo SDK 57 app. Bottom tabs and stacked screens built from the CMS menuExpo
services/gateway-apiThe BFF. The app only ever talks to this. It also proxies /graphql4200
services/auth-apiFake login and account settings4201
services/trips-apiTrip CRUD, chaos dice, passport4202
services/wander-apiCalls Open-Meteo, Frankfurter, Advice Slip, Bored, countries, OpenTripMap4203
services/cms-apiTurns the Umbraco Delivery API into a nav contract, with a seed fallback4204
services/lore-api“Remix hop” that rewrites CMS copy using wander and trips data4205
services/graphql-apiGraphQL Yoga BFF that aggregates the REST services4206
cms/umbracoUmbraco 18 and the Delivery API4400
packages/mock-bootstrapShared Mockifyer setup used by every Node service–
mock-data/Shared Mockifyer scenario folder (default, hello, …)–
Mockifyer dashboardBrowse mocks, scenarios, hops, client lanes3002

How it works

RN SDKExpo appgateway-api :4200Mockifyer dashboard :3002graphql-api :4206lore-api :4205auth-api :4201trips-api :4202wander-api :4203cms-api :4204Umbraco :4400Public APIs RN SDKExpo appgateway-api :4200Mockifyer dashboard :3002graphql-api :4206lore-api :4205auth-api :4201trips-api :4202wander-api :4203cms-api :4204Umbraco :4400Public APIs
Figure 1. How one request travels. Every Node service records or replays its outbound calls into the shared mock-data/ folder.
  1. The Expo app talks only to gateway-api (:4200).
  2. The gateway forwards to lore-api (:4205) and graphql-api (:4206).
  3. lore-api calls cms-api (:4204, which reads Umbraco on :4400), wander-api (:4203, which calls the public APIs) and trips-api (:4202).
  4. graphql-api calls auth-api (:4201), trips-api, wander-api and lore-api.
  5. Each Node service patches fetch and reads or writes the shared mock-data/ folder. The app connects to the dashboard (:3002) through setupMockifyerForReactNative.

In plain words:

  • Every Node service calls initializeMockifyerFromEnv({ label }) from @wanderweird/mock-bootstrap when it starts. That patches the global fetch, so each outbound call is either recorded to mock-data/ or replayed from it.
  • All services share one client id (MOCKIFYER_CLIENT_ID=wanderweird-demo) and one mock folder (MOCKIFYER_PATH=../../mock-data). Calls that cross services are stitched into a single tree of “hops”. The gateway uses createMockifyerCorrelationMiddleware() to link them.
  • The Expo app runs its own Mockifyer through setupMockifyerForReactNative / initMockifyerForReactNativeDashboard (apps/mobile/src/mockifyer-setup.ts) and includes an in-app dev menu.
  • The bootstrap supports two runtimes, chosen with MOCKIFYER_RUNTIME:
    • filesystem (default): reads and writes JSON in mock-data/ directly.
    • proxy: sends traffic through the dashboard at MOCKIFYER_PROXY_URL (default http://127.0.0.1:3002), which can store mocks in SQLite or Redis.
    • off: fetch is not patched at all.

Quick start

cd example-projects/wanderweird-travel
npm install

# Terminal 1: all seven Node services
npm run dev

# Terminal 2 (optional but recommended): the Mockifyer dashboard
npm run dashboard          # http://127.0.0.1:3002

# Terminal 3: the app
cd apps/mobile
npm run start:hybrid

Log in with one of the demo users:

UserPasswordFlavor
wandererwandererSpicy chaos default
jetlagjetlagExistential timezone survivor

You don’t need Umbraco to get started. When the CMS isn’t running, cms-api falls back to services/cms-api/seed/navigation.json. If you want the real CMS:

npm run cms:run     # dotnet, Delivery API on :4400
# or
npm run cms:up      # Docker

Backoffice is at http://127.0.0.1:4400/umbraco; use the demo credentials in the example’s README.

GraphQL playground: http://127.0.0.1:4206/graphql (the app reaches it through POST http://127.0.0.1:4200/graphql).

Walkthroughs

Record real traffic

npm run dashboard
npm run dev:record          # MOCKIFYER_RECORD=true

Use the app as you normally would. Each outbound call, including the weather, FX and advice APIs, is saved under mock-data/<current scenario>/. To record from the app side too, run npm run start:hybrid:record in apps/mobile.

By default the bootstrap stores request stubs only (MOCKIFYER_RECORD_RESPONSES defaults to false). That means responsePending entries without bodies. If you want full response bodies, set MOCKIFYER_RECORD_RESPONSES=true.

Replay (work offline)

Stop the record script and run npm run dev. Calls that already have a recording are served from mock-data/, so you can demo with no network.

Record a multi-service “hop tree”

This shows how one tap in the app fans out across services.

Filesystem version (no database needed):

npm run dashboard
npm run dev:record:stubs     # RECORD=true, RECORD_RESPONSES=false, client_id_header

In the app, turn Mockifyer on and use the wanderweird-demo client id. Nested calls are saved with a parentRequestId. Open http://127.0.0.1:3002/hops to see the tree.

Proxy + SQLite version (central store and a Network tab):

npm run dashboard:sqlite
npm run dev:proxy:record
npm run lane:hello           # map lane wanderweird-demo → scenario "hello"
npm run dev:mobile

Then open http://127.0.0.1:3002/hops?scenario=hello.

Redis instead of SQLite: npm run redis:up and then npm run dashboard:redis.

Switch scenarios with client lanes

A scenario is a named set of mocks, such as default or hello. A client lane tells the dashboard which scenario a client id should use:

npm run lane:hello      # wanderweird-demo → hello
npm run lane:default    # wanderweird-demo → default

Under the hood this is just:

curl -X PUT http://127.0.0.1:3002/api/client-lanes/wanderweird-demo/scenario \
  -H 'Content-Type: application/json' -d '{"scenario":"hello"}'

You can also manage scenarios in the dashboard under Settings. It lists the available scenarios, has a Create New Scenario form (optionally derived from an existing one) with Create & Switch, and has Import / export scenario (Download JSON / Choose file…).

Figure 2. Dashboard Settings. Pick a scenario, create one from an existing one with Create & Switch, or import/export it as JSON. (Video, 3 s, no audio.)

The in-app Mockifyer dev menu

This is only available in __DEV__ builds. Go to Account → “Mockifyer dev menu”, or shake the device and pick Dev Menu → “Mockifyer Dev Menu”. From there you can:

  • turn Mockifyer on or off
  • turn record mode on or off (it’s manual and off by default)
  • pick or create a scenario
  • set dates for the scenario (global) or for the client lane

Creating scenarios and setting dates need the dashboard running.

Mockifyer dev menu in the WanderWeird iOS app: toggles for Mockifyer enabled (on), Record mode (on) and Record response bodies (off), with the active scenario Testing_Scenario.
Figure 3. The in-app dev menu, opened from Account → "Mockifyer dev menu".

Run everything in Docker

npm run cluster:up      # Umbraco + all Node services on the "wanderweird" network
npm run cluster:logs
npm run cluster:ps
npm run cluster:down

The gateway stays on host port 4200 and Umbraco on 4400.

Tracing: see every hop, live

Mocking is half the story. Mockifyer can also show you how one tap in the app fans out across all seven services, as it happens and after the fact. There are two views:

ViewWhereBest for
Mockifyer AtlasMetro dev server, http://localhost:8081/mockifyer-atlas-liveWatching live traffic from the Expo app while you click around
Dashboard → Hopshttp://127.0.0.1:3002/hopsBrowsing the multi-service chains recorded in a scenario

Turn tracing on in WanderWeird

  1. Metro side (Atlas). apps/mobile/metro.config.js already calls configureMetroForMockifyer with the Metro sync middleware. That middleware serves the Atlas pages, so you don’t need any extra setup.

  2. Service side (hops). All services share MOCKIFYER_CLIENT_ID=wanderweird-demo, and the gateway mounts createMockifyerCorrelationMiddleware(). Outbound calls therefore carry a parent request id, and the dashboard can stitch them into a tree. Pick one setup:

    SetupCommandsStore
    Filesystemnpm run dashboard + npm run dev:record:stubsmock-data/<scenario>/
    Proxy + SQLitenpm run dashboard:sqlite + npm run dev:proxy:recordSQLite through the dashboard
    Proxy + Redisnpm run redis:up + npm run dashboard:redis + npm run dev:proxy:recordRedis through the dashboard

    The key env vars, all set by those scripts: MOCKIFYER_RECORD=true, MOCKIFYER_RECORD_RESPONSES=false (request-only stubs), MOCKIFYER_ACTIVATION_MODE=client_id_header, and for proxy mode MOCKIFYER_RUNTIME=proxy plus MOCKIFYER_PROXY_URL=http://127.0.0.1:3002.

  3. App side. Start the app (npm run dev:mobile or npm run start:hybrid in apps/mobile) with Mockifyer on and the wanderweird-demo client id.

  4. Start Atlas capture. In the Metro terminal, press t. This starts capture, opens the live stream, and signals the app to enable Mockifyer if it runs in manual mode. Press t again to stop. Capture only starts on t. Just opening the page doesn’t start it. (a is not used for this because Metro reserves it for Android.)

The bootstrap sets networkLog: { captureBodies: false }, so the services log traffic without response bodies by default.

Mockifyer Atlas, the live Metro hop stream

Atlas hop list: TravelerDashboard and trip-tips rows with 'N nested · click expand', ending in GET /api/auth/me with status 401 and a red ERR badge.
Figure 4. Atlas lists the newest hops first. Each root row folds its nested calls, and a failed call gets an ERR badge. (Cropped to the WanderWeird rows.)

See it live. These recordings are from a real run with the Atlas page in Chrome on the left and the WanderWeird iOS simulator (iPhone 17 Pro) on the right.

Figure 5. Signing in as wanderer. Atlas (left) picks up POST /api/auth/login, then POST /graphql TravelerDashboard, while the app (right) switches to "Your trips". (Video, 5 s, no audio.)
The expanded TravelerDashboard tree in Atlas: gateway, graphql-api, then trips, passport, discover with four public API calls, and navigation.
Figure 6. One login fans out across five services. The gateway (:4200) calls graphql-api (:4206), which calls trips and passport (:4202), discover (:4203) and navigation (:4205). Under /discover are the real Advice Slip, Open-Meteo, apicountries and Bored calls. The status line reads roots=2 · hops=20.

The page subtitle reads: “Live Metro hop stream — newest first. Search filters the buffer; Render docs writes offline Atlas HTML.”

Toolbar

ControlWhat it doesShortcut
SearchFilters the buffer by path, body, or requestId. It’s an exact, case-insensitive substring match, so a longer query gives fewer hits–
Expand all / Collapse allOpens or closes every nested groupe
Pause / ResumeFreezes the list. The status line counts hops that were “skipped” while pausedp or Space
ErrorsShows errors onlyf
Dedupe (on by default)Groups duplicate consecutive hops at every leveld
AnalyzeAnalyzes the current buffera
ClearClears the Metro hop bufferBackspace
Dark modeToggles the themen
Render docsExplains the buffer and writes offline Atlas HTML to mock-data/atlas-html/ (in this repo you’ll find index.html, pages/, atlas.har, bodies/ …)–
Atlas HTML linkOpens the last generated HTML–

Shortcuts are ignored while you’re typing in the search box.

Status line: roots=… · hops=… · collapse=on|off · dedupe=on|off · sse=open|connecting|closed. When paused it also shows paused · N skipped.

Reading a row (left to right):

time METHOD status duration source host path [GraphQL op] [badges]

  • source says where the answer came from. upstream means the call went to the real service, and mock-hit means Mockifyer replayed it. An error source shows ERR in the status column. Failed hops also get a red ERR badge, for example the 401 on GET /api/auth/me in Figure 4.
  • GraphQL op: for POST /graphql the operation name is shown next to the path, for example TravelerDashboard. That’s the app’s query TravelerDashboard($userId: ID!) in apps/mobile/src/api/graphql.ts.
  • Collapsed children show as “N nested · click expand”. Click to open the tree, then “N nested · click collapse” to fold it again.
  • Actions on each row:
    • req / res open the request or response body.
    • curl copies the root hop as a curl command. It includes X-Mockifyer-Include-Trace and uses the full spilled body when it’s available.
    • trace re-calls the hop with X-Mockifyer-Include-Trace and opens the result in a new tab.

Re-calling a hop with trace. Clicking trace first asks you to confirm: “Re-call POST http://127.0.0.1:4206/graphql with include-trace? This sends a real request and may change data.” Then it opens a Mockifyer Atlas · include-trace tab. That tab has a status line (OK POST … → 200 375ms), a copyable CURL (INCLUDE-TRACE) block with the x-mockifyer-* headers, a CAPTURED HOPS (BEFORE RE-CALL) tree, and then the full JSON response.

The include-trace page: a 200 status line, a curl command with x-mockifyer headers, and the captured hop tree.
Figure 7. trace re-sends the root call with X-Mockifyer-Include-Trace. The curl carries the client id and the parent request id. In this run the upstream didn't return a mockifyerTrace, so the tree is the one captured before the re-call.

Dashboard → Hops

Dashboard Hops page: request-chain cards, each showing a service-hop count, a root request id and a GET /discover entry hop with Pending and +3 nested badges.
Figure 8. Hops for Testing_Scenario: 9 chains and 35 hops, one card per user request.

Open Hops in the dashboard sidebar, or go to http://127.0.0.1:3002/hops?scenario=hello. The header reads “Multi-service request chains recorded in this scenario”.

  • Scenario selector, search, and refresh. Pick the scenario, then search with “Search hops — endpoint, method, filename, or request id”. The ⟳ button reloads the list.
  • Each card is one user request across services. It shows:
    • “N service hops”
    • the Root request id, with the note “downstream hops reference this id as parent”, and a Copy link button
    • nested hops collapsed by default
  • Badges on each hop:
    • entry marks the top of the chain.
    • leaf marks the lowest-level hop, with no nested requests.
    • +N nested means children are hidden. Click to expand.
    • a traffic badge shows Replay, Live, Refresh, or Pending. Pending is a request-only stub (responsePending). That’s what MOCKIFYER_RECORD_RESPONSES=false gives you, and it captures a body on the next matching request.
    • entry hop (amber) means the hop was added from the same recording run by URL and time, and may lack a parent link.
An expanded 9-hop card: trip-tips calls trips and discover, and discover calls four public APIs, each hop with its parent id and a leaf badge.
Figure 9. Expanding the trip-tips card. cms-api (:4204) calls trips (:4202) and discover (:4203), and discover calls the four public APIs. Each hop names its parent, and the lowest hops are leaf.
  • If a card says “No request ids on these mocks (inferred chain)”, re-record through the dashboard proxy (npm run dev:proxy:record) so parent → child links are stored.

Other dashboard pages that help here

PageUse it in WanderWeird to…
NetworkWatch “live traffic through the dashboard proxy and SDKs”. You can toggle network logging and body capture, which is off by default, and clear the log. With Redis, events are stored with a TTL. It’s most useful with dev:proxy:record
OverridesChange fields in a replayed response without re-recording, for example making a trip status or the weather weirder. It also has override groups
Date ConfigFreeze or shift dates returned by getCurrentDate() per scenario. A date set on a client lane (such as wanderweird-demo) overrides the scenario date for that lane’s proxied requests. The app’s dev menu sets the same thing
StatisticsThe landing page (/): file count, size, endpoints, service hops per chain, replay-mode buckets, slowest and largest leaf hops
MemoryMemory usage overall and per scenario. Check it when the hop buffer or Redis grows during long recording sessions
Statistics page: 40 mock files, 34.3 KB, 10 endpoints, 35 service hops, and a Replay mode panel with 39 Pending.
Figure 10. Statistics for Testing_Scenario. Nearly everything is Pending because the default records request-only stubs. (Mock path redacted.)

From a hop to its mock. Opening a hop’s mock (here the Open-Meteo forecast) shows Edit Mock with a Service chain (9 hops) tree that highlights where the mock sits. The Request tab has the Replay mode choices Use saved mock, Refresh on next request, Always refresh from live and Always use live API, plus Copy cURL. Picking Always refresh from live shows a “Saved” toast.

The Edit Mock page for an Open-Meteo forecast mock, with a Service chain tree highlighting the mock's position.
Figure 11. Every mock shows where it sits in its service chain.
Replay mode options: Use saved mock, Refresh on next request, Always refresh from live (selected) and Always use live API, plus a Saved toast.
Figure 12. Four replay modes per mock. Changing one saves straight away.

Walkthrough: trace a login → TravelerDashboard flow across services

  1. Start everything:
    npm run dashboard:sqlite        # terminal 1
    npm run dev:proxy:record        # terminal 2
    npm run lane:hello              # map wanderweird-demo → scenario "hello"
    npm run dev:mobile              # terminal 3 (Metro)
  2. In the Metro terminal press t. The Atlas live page opens.
  3. Open the app before logging in. If the app checks the session first, GET /api/auth/me returns a 401 with an ERR badge, which is expected. Press f to show only errors. (The step-by-step captures in this guide don’t include this step; Figure 4, from an earlier session, shows such a row.)
  4. Log in as wanderer / wanderer. The login call goes through the gateway (:4200) to auth-api (:4201).
  5. The app now loads the dashboard with POST /graphql, and the row shows TravelerDashboard. It reads “N nested · click expand”. Click it, or press e, to see gateway → graphql-api (:4206) → auth / trips / wander / lore, with lore → cms and wander → open APIs underneath.
  6. Hit trace on the root row to re-run it with include-trace, or curl to copy it.
  7. Press p to pause while you read, then Render docs to save an offline HTML copy under mock-data/atlas-html/.
  8. Switch to the dashboard at http://127.0.0.1:3002/hops?scenario=hello. The same flow appears as a card with “N service hops”, a shared root request id, and entry, leaf, and Pending badges. Use Copy link to share it.
  9. Optional: on Network, inspect the raw events. On Overrides, tweak a response and replay the flow.

Handy knobs

VariableValuesEffect
MOCKIFYER_RUNTIMEfilesystem (default), proxy, offWhere mocks live / whether fetch is patched
MOCKIFYER_RECORDtrueRecord calls that miss
MOCKIFYER_RECORD_RESPONSEStrue / false (default)Store full bodies or just stubs
MOCKIFYER_ACTIVATION_MODEalways, client_id_header, offclient_id_header only mocks requests that carry the client id. It’s the default in proxy mode
MOCKIFYER_CLIENT_IDe.g. wanderweird-demoShared lane id
MOCKIFYER_PATHe.g. ../../mock-dataMock folder
MOCKIFYER_PROXY_URLhttp://127.0.0.1:3002Dashboard used in proxy mode
EXPO_PUBLIC_MOCKIFYER_BACKENDhybrid, redisApp backend
EXPO_PUBLIC_MOCKIFYER_MODEon, off, manual, launch_clientApp runtime mode
EXPO_PUBLIC_GATEWAY_URLURLOverride the gateway (Android emulator default: http://10.0.2.2:4200)
OPENTRIPMAP_API_KEYkeyEnables nearby POIs on Discover (free signup)

Troubleshooting

  • Nothing shows up in /hops. Check that the services were started with a record script and that the app sends the wanderweird-demo client id. In client_id_header mode, requests without that id are ignored.
  • Mocks have no bodies. That’s expected, because the default is stubs only. Record again with MOCKIFYER_RECORD_RESPONSES=true.
  • better-sqlite3 NODE_MODULE_VERSION error with dashboard:sqlite. Run npm --prefix packages/mockifyer-dashboard rebuild better-sqlite3.
  • Android emulator can’t reach the APIs. Use 10.0.2.2 (the default), or set EXPO_PUBLIC_GATEWAY_URL.
  • The CMS menu looks basic. Umbraco isn’t running, so you’re seeing the seed fallback. Start it with npm run cms:run or npm run cms:up.
  • Discover has no POIs. Set OPENTRIPMAP_API_KEY.
  • Atlas page is empty. Capture only starts when you press t in the Metro terminal. Check curl http://localhost:8081/mockifyer-network-events.
  • Hops cards say “inferred chain”. Re-record with npm run dev:proxy:record so parent ids are stored.
  • Dev menu can’t create scenarios. Start npm run dashboard.

FAQ

Do I need Umbraco, Docker or Redis?

No. npm run dev plus the app is enough. Everything else is optional.

Filesystem or proxy?

Filesystem is the simplest and keeps everything in mock-data/. Proxy routes everything through the dashboard, which gives you a central SQLite or Redis store and the Network tab.

Are the destinations real?

No, they’re all made up: Atlantis Boardwalk, Moon Base Brunch Bar, Narnia Customs Queue, Upside-Down Farmers Market, Bermuda Triangular Buffet, Cloud Nine B&B. The weather and FX data come from real open APIs and are matched to each destination’s “real-world cousin”.

Where do bottom tabs come from?

From the CMS. Each tabScreen under mobileApp becomes a tab, and nested contentPage items become stacked screens at /(tabs)/{screenKey}/content/{...slug}.

Sources

Find tools for your stack

Answer a few questions to find tools that match your needs.