Repository navigation
feat(demo): add Production Mode as a dry-run warning - #18
Merged
Merged
Conversation
added 9 commits
November 5, 2026 13:05
The demo must show that only the base URL changes between an app emulator and the real vendor. A dry run builds and records the call and sends nothing, and a live call carries no Authorization header, so the demo never needs or touches a credential.
The presenter changes a vendor's base URL while the demo runs, so each call asks the switch where its vendor is now. GET and PUT /api/targets read and change it, and an invalid URL is reported before a run, not after it fails.
A dry run or an unreachable URL reached the UI as raw JSON. The wire proxy puts the reason in detail, so the error is now that sentence.
The presenter shows the mechanism by changing a vendor's base URL from the emulator to its service. The non-dismissable banner says which mode runs, the gear overlay edits each URL, and the inspector marks a dry run as not sent.
Production Mode must say plainly what is and is not sent, since Live puts real traffic on the network.
A dry run that stopped the flow read as a broken demo, and no vendor credential is ever connected. A vendor pointed at its own URL is still answered by the app emulator and the call records where it would have gone. Live sends are removed.
The style guide has no warning color. Production Mode is not an error, so it needs a color that reads as caution without borrowing the error coral. Also corrects the stale 'SaaS Apps' wording in the brand README.
…mo menu Production Mode now keeps the demo working: app emulators answer and the inspector tags each call with where it would have gone. The run-style buttons are gone with Live. The Demos button folds into the page title.
The demo holds no vendor credential and nobody should connect one, so the guide now says the app emulator still answers every call.
added 4 commits
November 5, 2026 13:50
The inspector was a separate page with its own header layout. Both views now share the header with Demo and Demo Inspector as tabs, and the demo's progress lives above the router so switching views keeps it. The arrow beside the tabs still opens the inspector in a second browser tab.
The Open Demo Inspector button became a tab, so the usage guide and the scenario describe the tabs and the arrow beside them.
With both views on one tab, the tabs say where you are, so the title, the demo menu and the scenario panel are the same on each.
The Production Mode pill shrank to fit the banner text and wrapped onto two lines. It now keeps its width and the text beside it wraps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The demo should show the mechanism behind "LocalStack for SaaS Applications": the app's code is the same whether it calls an app emulator or the real vendor, and only the base URL changes. Nobody should connect production credentials to a demo, so nothing is ever sent to a vendor. Production Mode shows the mechanism without breaking the demo.
Changes
shared/wire: addSwitch, which holds the base URL each vendor has been pointed at, and a proxy that asks it for the target on every call. A vendor pointed at its own service's URL is still answered by the app emulator, and the recorded call carrieswould_send_to, the URL it would have gone to. An empty or malformed URL is reported in the state and fails the call that uses it with a message that says what to do.shared/seed: show the proxy's reason as the error, instead of raw JSON.GET /api/targetsandPUT /api/targetsread and change it. Reset and readiness only ever use the app emulators.web/packages/brand: add--ls-warning(amber) and awarningbadge variant. The style guide has no warning color, so it is an addition like--ls-danger, documented in the brand README, which also drops the stale "SaaS Apps" wording. The overlay backdrop uses the palette's navy, not black.apps/acme-commerce-lenders/docs/usage.mdexplains the modes.There is no way to send a call to a vendor's service. An earlier version had a Live run style, which was removed in
2420493because it needed credentials the demo does not have and made the demo look broken.Tests
Driven against the running demo (LocalStack Stripe, local Plaid and Xero): with Stripe and Xero pointed at
https://api.stripe.comandhttps://api.xero.com, the whole flow ran from apply to settled. 14 of the 18 calls to read and connect carriedwould_send_to, only for Stripe and Xero. Pointing both back at the emulators returned to Demo Mode.Related
Follows
localstack-samples/localstack-app-emulators#17.