Keyboard Shortcuts

j / kScroll down / up
ggScroll to top
GScroll to bottom
K / /Open search
?Show this help
EscClose search / help
n / NNext / previous section
hGo to landing
dGo to docs
:Command mode — type section name

Press ? or Esc to close

Getting Started

Getting Started

Clone, install, run. Environment is injected at compile time — there is no committed .env.

Prerequisites

ToolVersion
Flutter SDK3.11+
Dartbundled with Flutter
Xcode / Android Studiolatest stable

Install & run

terminal
# Install dependencies
flutter pub get

# Run on a connected device / simulator
flutter run --dart-define=BASE_URL=https://api.example.com
flutter run --dart-define-from-file=env/dev.json

Base URL and environment name come from AppConstants via String.fromEnvironment. Without a define, it falls back to a safe default.

lib/config/constants/app_constants.dart
class AppConstants {
  static const baseUrl = String.fromEnvironment(
    'BASE_URL',
    defaultValue: 'https://api.example.com',
  );
}

class AppConfig {
  static const env = String.fromEnvironment('ENV', defaultValue: 'development');
  static bool get isDev => env == 'development';
}

Bootstrap sequence

main() calls bootstrap() once. It initializes Firebase, registers every feature's DI, and then runs the app. There is no lazy per-route registration — all dependencies are wired at startup.

lib/main.dart
Future<void> main() async {
  await bootstrap();
  runApp(const MyApp());
}

Where to look first

app/app_bootstrap.dartDI registration, Firebase init
app/app_router.dartAll routes, auth guard, shell
app/app.dartProviders + global overlays
config/Network, theme, l10n, ui, utils
features/One folder per product feature
sam's arch — A Pragmatic Flutter Architecture