1. Product-surface boundary
The Flutter application and public web live in one repository but ship independently. Flutter owns native navigation, Firebase sessions, camera and scan capabilities, and techpicks:// deep links. The web owns crawlable device pages, metadata, sitemaps and shareable URLs. UI widgets are not forced into a shared layer; stable slugs, fixtures and design-token projections form the cross-surface contract.
2. TechAPI to build catalog
The full TechAPI source spans multiple categories and a large JSON tree. A build tool selects supported devices, validates required scoring fields, slugs and sources, and emits a versioned assets/catalog/v1.json. Failure retains the previous catalog rather than blending incomplete remote data into runtime behavior.
3. App domain and personalization
A repository loads the bundled catalog into device models. The scoring service applies user weights to performance, camera, display, battery and value to produce a TP Index. Ranking, compare and detail views consume the same score result. Firebase profiles provide account state and weights without mutating the public catalog source of truth.
4. Guidance, scan and links
Gemini guidance receives user constraints and selected-device context to explain recommendation reasons. A scan opens detail only after resolving to a known catalog slug; uncertain recognition returns candidate selection. The same slug identifies a device in Flutter deep links and web /devices/{slug} routes.
5. Synchronization and failure boundary
Offline ranking uses the catalog pinned at release time, so TechAPI downtime does not block core exploration; freshness waits for the next build. A smoke tool compares remote round trips with local fixture contracts. Firebase and Gemini outages remain limited to identity and guidance while public web pages and local comparison continue independently.
6. State and catalog ownership
Riverpod providers own search, comparison, preference and ranking state; DeviceRepository owns the query contract; assets/catalog/v1.json owns the release-time source. SharedPreferences rank snapshots are local personalization, not a server ledger.
Large-catalog parsing, multi-device filtering and TP Index recomputation affect startup and frame cost. Isolate parsing, provider selection, snapshot-version checks and golden performance budgets require validation. Live price and inventory are missing.
8. Security, observability and debt
Firebase and Gemini configuration require platform-specific secret and user-input boundaries. Widget, golden and offline tests protect regressions, while crash-free rate and P95 startup time have not been measured. Catalog generation and app contracts should be validated by one schema.