How nateshmbhat/flutter-multi-module-app works
1. This repository is a Flutter application, with a single Dart UI codebase deployed through the standard Flutter host layers for Android, iOS, and Web. The architecture is primarily “Flutter app + platform shells.”
2. The root lib/main.dart is the top-level Dart entrypoint for the app. It likely bootstraps the application and hands off to the shared app widget code in lib/core.
3. lib/core is a separate Dart package inside the repo, not just a folder. Its own pubspec.yaml, lib/main.dart, and lib/my_app.dart indicate a reusable app core layer that likely contains the main MaterialApp/app scaffold and shared UI setup.
4. lib/onboarding is another independent Dart package. Its separate pubspec.yaml and lib/screens/my_screen/my_screen.dart show a feature-oriented package dedicated to onboarding UI, rather than being mixed into the root app package.
5. The main in-repo architectural boundary is therefore between:
- the root app entrypoint,
- the shared/core app layer,
- and the onboarding feature package.
This suggests a modular Flutter structure, where feature code can be developed and tested somewhat independently.
6. The feature flow appears to center on onboarding screens. The presence of lib/onboarding/lib/screens/my_screen/my_screen.dart implies a screen-based UI module that is likely invoked from the core app shell during startup or navigation.
7. Platform-specific directories are standard Flutter host wrappers:
- android/ contains the Android launcher app and native entrypoint (MainActivity.java),
- ios/ contains the iOS runner (AppDelegate.swift, Xcode project, launch storyboard),
- web/ contains the static web bootstrap (index.html, manifest.json, icons).
These layers are thin adapters around the Dart app rather than separate application logic.
8. The Android and iOS code appear to be mostly boilerplate shell code generated by Flutter. Their main job is to launch the Dart runtime, provide app icons/launch screens, and manage platform packaging.
9. The repo includes tests at multiple levels:
- root test/widget_test.dart,
- lib/core/test/widget_test.dart,
- lib/onboarding/test/widget_test.dart.
This indicates each package can be validated independently, which matches the modular package layout.
10. analysis_options.yaml, root Makefile, and the package-level pubspec.yaml files suggest the repo is organized with standard Flutter/Dart tooling and likely supports package-local development, analysis, and test execution. There is no sign of backend services, databases, or message brokers in the repository tree.
11. From an architecture-diagram perspective, the important picture is:
Flutter framework runtime at the center, root app entrypoint on top of a shared core package, feature package(s) such as onboarding feeding UI screens into the app, and thin platform launchers on Android/iOS/Web around the edges.
12. In short, this is a modular Flutter frontend repo rather than a multi-service system. The meaningful boundaries are package boundaries inside lib/, with platform folders acting only as deployment targets.
Main entry points: lib/main.dart App entry · analysis_options.yaml Tooling · lib/main.dart Core entry · my_app.dart App shell
Components 15
Flutter app
Root entrypoint and shared app flow
- Flutter runtime · Shared Dart/Flutter execution environment
- App entry · Top-level app bootstrap in the root package
lib/main.dart
Core package
Reusable shared app layer
- Core entry · Package-local entrypoint for the shared core layer
lib/core/lib/main.dart - App shell · Shared application widget and UI wiring
lib/core/lib/my_app.dart
Onboarding package
Feature module for onboarding UI
- Onboarding entry · Package-local entrypoint for the onboarding module
lib/onboarding/lib/main.dart - Onboarding screen · Primary onboarding UI screen
lib/onboarding/lib/screens/my_screen/my_screen.dart
Platform shells
Android, iOS, and web host layers
- Android app · Android launcher and packaging layer
android/app - MainActivity · Android host activity that boots Flutter
android/app/src/main/java/com/nuclei/falcon/MainActivity.java - iOS app · iOS runner and packaging layer
ios/Runner - AppDelegate · iOS host application delegate
ios/Runner/AppDelegate.swift - Web app · Static web bootstrap and assets
web
Tooling
Build, analysis, and tests
- Root test · Top-level widget test for the app package
test/widget_test.dart - Core test · Widget test for the core package
lib/core/test/widget_test.dart - Onboarding test · Widget test for the onboarding package
lib/onboarding/test/widget_test.dart - Tooling · Repository-level analysis and build automation
analysis_options.yaml
Connections 16
- Flutter runtime → App entry: runs · Flutter executes the root Dart entrypoint
- App entry → Core entry: delegates to · Root package hands off to the shared core layer
- Core entry → App shell: bootstraps · Core entrypoint builds the shared app shell
- App shell → Onboarding entry: uses feature · Shared app flow integrates the onboarding module
- Onboarding entry → Onboarding screen: opens · Onboarding entrypoint shows the primary screen
- Android app → MainActivity: contains · Android package contains the launcher activity
- MainActivity → Flutter runtime: starts · Android host starts the Flutter runtime
- iOS app → AppDelegate: contains · iOS package contains the application delegate
- AppDelegate → Flutter runtime: starts · iOS host starts the Flutter runtime
- Web app → Flutter runtime: loads · Web bootstrap loads the Flutter app
- Root test → App entry: validates · Top-level test exercises the root app
- Core test → App shell: validates · Core test exercises the shared app shell
- Onboarding test → Onboarding screen: validates · Onboarding test exercises the feature screen
- Tooling → App entry: analyzes · Repository tooling applies to the Dart app code
- Tooling → Core entry: analyzes · Repository tooling applies to the core package
- Tooling → Onboarding entry: analyzes · Repository tooling applies to the onboarding package