Summary: The 7Mind iOS and Android consumer app. One Flutter codebase, three flavors (zpp, staging, production), single brand despite the “monorepo” naming. Sources: direct code inspection (pubspec.yaml, lib/app.dart, lib/app/app_module.dart, android/app/build.gradle, codemagic.yaml, .github/workflows/, Makefile, .fvmrc, documentation/mkdocs.yaml) Last updated: 2026-05-15


Purpose

The primary 7Mind consumer product: a Flutter app delivering guided meditations, courses, sleep content, breathing exercises, and an Aury AI companion (German-locale, feature-flagged). All business logic, content, subscriptions, and identity are served by elixir-backend. Despite the plural “mobile-apps-monorepo” name, only the 7Mind brand ships from this repo. There is no 7Sleep app code here. The repo also publishes a public MkDocs site for internal mobile engineering documentation.

Stack

  • Flutter 3.41.9 pinned via .fvmrc, Dart SDK >=3.8 <4.0
  • State / routing / DI: flutter_bloc 8.1.6, flutter_modular 6.4.1 (modular routing + DI; Modular.get<T>() pattern)
  • HTTP: dio 5.9.0 + retrofit 4.7.3 (codegen-driven API clients)
  • Local storage: drift 2.28.2 (SQLite ORM)
  • Localization: easy_localization + intl 0.20.2 (locales: en, de, fr, it, es; fallback en)
  • Codegen: build_runner 2.6.0, json_serializable 6.10.0, copy_with_extension_gen 15.0.1, drift_dev 2.28.2, flutter_gen_runner
  • Lints: very_good_analysis 6.0.0
  • Testing: flutter_test, bloc_test 9.1.7, mocktail 1.0.4, patrol 3.15.2 (e2e, staging flavor only)

Key Files / Entry Points

  • lib/main_staging.dart and lib/main_production.dart — flavor entry points (both delegate to runBlissApp() in lib/app.dart)
  • lib/app.dart — shared initialization, API base URL configuration (lib/app.dart:82-90)
  • lib/app/app_module.dartflutter_modular route table, navbar wiring, auth guards, deep-link route aliases
  • lib/app/routes/deep_link_handler.dartapp_links capture + Adjust shortlink resolution. See mobile-deep-linking
  • lib/features/core/network/ — Dio provider, custom interceptors (user-agent, accept-language, timezone, accept)
  • lib/features/core/data/services/configuration/feature_flags.dart — ConfigCat-backed flags
  • lib/features/core/data/services/configuration/amplitude_configurations_provider.dart — Amplitude Experiment provider (api.lab.amplitude.com)
  • lib/features/ai_companion/ — Aury in-app AI chat companion. See aury-companion
  • lib/bliss_ui_library/ — internal UI component library (“Bliss” is internal naming for the design system)
  • Makefile — targets: generate, translations, lint, run, run_release, coverage, plus ci_* variants
  • codemagic.yaml — production build pipelines. See mobile-build-pipeline
  • documentation/docs/index.md + documentation/mkdocs.yaml — published MkDocs site
  • .fvmrc — pins Flutter version

Deployment

Mobile builds are split across two CI systems. See mobile-build-pipeline for the full breakdown.

  • Production iOS / Android builds: Codemagic only. codemagic.yaml defines 7 workflows for iOS (TestFlight) and Android (Google Play internal track) across staging, production, and ZPP submission flavors. Patrol e2e runs on Firebase Test Lab via Codemagic.
  • GitHub Actions (in .github/workflows/): CI-only. Active workflows: test.yml, analyze.yml, internal_builds.yml, verify_code_gen.yml, localize-gen.yml, codecov.yml, title-validation.yml, translations.yml, release_drafter.yml, release_drafter_release.yml, publish_catalog.yml, publish_catalog_pr.yml, supernova.yml. None produce shipping iOS or Android artifacts.
  • Docs publish: publish_documentation.yml builds MkDocs and uploads to the GCS bucket mobile.6mind.de (service account [email protected]). Doc site: https://mobile.6mind.de/site.

Dependencies

External services:

  • Backend API: elixir-backend at https://magic.6mind.de/ (staging) and https://magic.7mind.de/ (production)
  • Chargebee (chargebee_flutter 0.4.8) for subscription billing. See chargebee-billing
  • SSO providers: google_sign_in 6.2.2, sign_in_with_apple 6.1.4, flutter_facebook_auth 7.1.2. Tokens stored via flutter_secure_storage 9.2.4. No supertokens SDK in pubspec.yaml; sessions are mediated by the backend. See supertokens-auth
  • Firebase: firebase_core 3.15.0 + firebase_messaging 15.2.9 for push only. No firebase_auth is listed in pubspec.yaml
  • Sentry (sentry_flutter 9.8.0) for crash and error reporting
  • Rudderstack (rudder_sdk_flutter 3.3.0) as the primary CDP. See mobile-analytics-stack
  • Adjust (adjust_sdk 5.4.4) for install attribution and iOS shortlink resolution
  • Amplitude Experiment for runtime configuration and A/B testing (via AmplitudeConfigurationsProvider, endpoint api.lab.amplitude.com)
  • ConfigCat (configcat_client 4.1.1) for feature flags (e.g. isAuryEnabled)
  • Braze (braze_plugin 16.0.0) for engagement, in-app messaging, push
  • Algolia (algoliasearch 1.41.1, algolia_client_search 1.34.1) for content search
  • Firebase Test Lab for Patrol e2e (driven by Codemagic)

Internal: Consumes elixir-backend. No path or git dependencies on other 7Mind repos in pubspec.yaml. api-contracts is not referenced directly; serialization is hand-rolled via json_serializable and Retrofit-generated clients.

Integration Points

  • Calls elixir-backend Public API for all business logic, content, billing reconciliation, and identity
  • Receives deep links from Aury B2B2C partner webview (see mobile-deep-linking)
  • Emits events to Rudderstack and Braze in parallel with the backend (see mobile-analytics-stack)
  • Push notifications delivered via FCM and APNs (firebase_messaging)
  • Content search resolved against Algolia indices (separate indices per brand on the backend side, but only the 7Mind index is consumed here)

Conventions

  • Environment is selected by main file, not by --dart-define. To switch staging vs production, run a different --target lib/main_*.dart. Firebase options are checked in as firebase_staging_options.dart and firebase_production_options.dart; secrets are injected at CI time.
  • Android flavors: zpp, staging (both ID-suffixed .stg, deeplink scheme sevenmindstg), production (no suffix, scheme sevenmind). Staging package ID is historically de.seven_mind.android.stg, production is de.sevenmind.android (the seven_mind vs sevenmind inconsistency is intentional and historical, do not “fix” it).
  • Deep-link route alias gotcha: /courseDetail is registered as an alias of /courseDetails at lib/app/app_module.dart:216-221 because the Aury webview emits the singular form. Preserve both. See mobile-deep-linking.
  • AuthGuard() protects most routes: unauthenticated users see splash → welcome → auth flows only.
  • Modular initial-route helper: routes commonly chain .toModuleDefaultMainRoute() which appends /home to a module’s initial route.
  • Patrol is wired only for the staging flavor in pubspec.yaml. Running e2e against the production flavor needs extra config.
  • Stale Makefile targets: runDach, runStagingDach, and references to main_production_dach.dart / main_staging_dach.dart / --flavor productionDach exist in the Makefile but the matching main files and Android flavor are not present. Treat these targets as dead.
  • Lint exclusions: lib/**.g.dart and lib/initializations/settings/** are excluded from analysis. Lints extend very_good_analysis with relaxations (no docs required, relaxed line length, no cascades enforcement).
  • Docs site: every change to documentation/docs/** on main redeploys mobile.6mind.de. Build is MkDocs material theme via GitHub Actions.

Agent Change Log

2026-05-15 — stub created, awaiting content seeding from code inspection 2026-05-15 — initial knowledge extraction from codebase