1. Bootstrap and identity boundary
main.dart initializes the Flutter binding and Firebase, then injects InterestProvider through MultiProvider. LoginPage calls Firebase Auth directly for email, Google and anonymous credentials. Successful authentication replaces the route with MainPage; logout and account deletion use the same Firebase session boundary.
2. Presentation and state boundary
MainPage switches among home, news, watchlist, order, assets and current-price screens with a BottomNavigationBar. An IndexedStack retains those widgets across tab changes. Shared watchlist entries live in a ChangeNotifier-based InterestProvider, but no disk or Firestore adapter persists them, so a process restart resets the list.
3. Quote and news read path
Home calls GLOBAL_QUOTE, the quote screen calls TIME_SERIES_INTRADAY, and news calls NEWS_SENTIMENT directly from the Flutter client. Each screen checks the HTTP status and maps JSON straight into view state. Exceptions end loading and expose a local error path, but there is no shared API client, cache or retry policy.
4. Chat path
XsChatbotPage sends a JSON POST to an external /question endpoint and reads template.outputs[0].simpleText.text into the in-memory chat list. The view exposes loading and error text, but conversation history is not persisted and there is no provider fallback.
5. Trust and failure boundaries
Firebase owns identity; Alpha Vantage and the chatbot server are independent availability boundaries. API calls and credentials are currently coupled to client code, so a production version would require a server proxy, secret management, rate limiting and a structured error contract. Order and asset screens are simulations and never create financial transactions.
6. State and data ownership
Firebase owns the identity session, Provider owns the watchlist, and each tab State owns selection and response data. A broker ledger or persisted order state is missing; portfolio and order screens are local presentation state only.
Quote and news calls are exposed to rate limits and network latency. Request deduplication, short symbol caches, timeout and retry budgets, and stale-data labeling are required; chatbot failure should remain isolated from market exploration.
8. Security, observability and debt
API keys and the chatbot endpoint should move out of the client, with TLS, input length and response-schema validation. Unified telemetry and error classification are missing. Financial accuracy and latency metrics have not been measured.