DestinationRouter.js
Source file: packages/app-ui/src/flows/DestinationRouter.js
Module: package-app-ui
Size: 58 lines
SHA-256: 905cd91a86f1da7ca6a42c13371cb41595d29ed1de3b9362893f86ed539912b3
Responsibility
Owns the shared customer screens, interactions, styles and approved brand assets.
Declared entry points
DEFAULT_HOST— source line 9.venueSlugs— source line 10.slugPattern— source line 11.parse— source line 12.host— source line 17.segments— source line 20.allowed— source line 21.venue— source line 24.raw— source line 26.open— source line 39.route— source line 40.
Imports and dependencies
No direct import declarations detected in this file.
Behaviour and audit locations
- Line 2:
* It has no WordPress, Capacitor, payment or demonstration dependency. - Line 16:
// Reject schemes such as javascript:, private URL user credentials and ports.
Destination validation
The shared router takes proposed venue/table URLs from QR, NFC-style links and app links. Its purpose is to validate approved origins and path structure before mutating ordering context. A URL is a navigation instruction, not an identity token or redemption authority. Tests should cover allowed/unknown hosts, malformed paths, cross-venue baskets and cold-start links. Future event/offer links need a real content resolver before claiming exact-record navigation.
Relationship to the system
This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.
Change verification
Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.