A High-Integrity Flutter application built with rigor, reliability, and strict engineering standards derived from the Joint Strike Fighter (JSF) C++ Coding Standards.
This repository serves as the official reference implementation for the Mission-Critical Flutter (MCF) methodology.
It demonstrates how to build safetyβcritical mobile applications where failure is not an option.
Standard Flutter encourages rapid prototyping β but speed introduces risk.
Missionβcritical systems demand something else:
- Deterministic behavior
- Architectural isolation
- Total type safety
- Predictable state flow
MCF enforces a strict Dart subset to eliminate entire classes of runtime errors such as:
TypeErrorNullPointer- Race conditions
- Illegal layer access
- Uncaught UI states
- Architecture: Strict separation of Presentation, Domain, and Data Layers.
- Safety: Zero tolerance for
dynamic, implicit casts, or unsafely nullable logic. - State: Immutable, exhaustive, unidirectional state machines.
- Verification: 100% business logic test coverage + Golden tests for UI stability.
This project follows a Clean Architecture pattern with a strict Composition Root, ensuring that dependencies only flow downward.
main.dart is the single entry point that assembles the complete dependency graph.
The Domain layer is completely pure:
β No Flutter
β No JSON
β No HTTP
β No UI imports
lib/
βββ domain/ # PURE LOGIC (Rules, Entities, Failures, Interfaces)
β βββ entities/
β βββ failures/
β βββ repositories/ # Abstract Contracts Only
β
βββ data/ # INFRASTRUCTURE (Serialization, Networking)
β βββ models/ # DTOs -> Entities
β βββ repositories/ # Concrete Implementations
β
βββ presentation/ # UI + State (Flutter Only)
β βββ cubit/ # Logic Containers (Enforce Rule 5.1)
β βββ screens/ # Stateless Widgets
β
βββ main.dart # COMPOSITION ROOT
State must always flow downward.
UI elements never mutate state directly.
- UI dispatches an event/intent
- Cubit processes the event using Domain logic
- Cubit emits a new immutable state
- UI rebuilds based on that state
No shortcuts. No mutable leaks. Zero ambiguity.
To avoid human error and enforce strict compliance, use the official MCF CLI:
Pub.dev: https://pub.dev/packages/mcf_cli
Repository: https://github.com/LosPhilly/mcf_cli
dart pub global activate mcf_climcf create feature user_profileThis creates:
- Domain entity + repository contract
- Data DTO + repository implementation
- Presentation Cubit + State + UI scaffold
- Strict imports + analysis rules
| Rule | Description | Status |
|---|---|---|
| MCF 2.2 | Strict Layer Isolation | βοΈ Enforced |
| MCF 3.1 | Strict Analysis (no implicit casts/inference) | βοΈ Enforced |
| MCF 3.4 | No bang operator ! allowed |
βοΈ Zero tolerated |
| MCF 4.1 | Stateless Widgets by default | βοΈ Required |
| MCF 5.1 | Unidirectional State Flow | βοΈ Mandatory |
| MCF 6.5 | Heavy JSON parsing offloaded to isolates | βοΈ compute() used |
| MCF 6.6 | Async reentrancy guards | βοΈ Implemented |
| MCF 7.5 | Golden tests for critical UI | βοΈ Included |
- Flutter SDK 3.10.0+
- Dart SDK 3.0.0+ (sealed classes support)
Clone the repository:
git clone https://github.com/LosPhilly/mission-critical-flutter
cd flightappInstall dependencies:
flutter pub getRun:
flutter runThis project uses the Mission-Critical Test Pyramid:
100% branch coverage for Cubits + Domain logic.
flutter test test/presentation/cubit/user_cubit_test.dartEnsures correct wiring between state and UI.
flutter test test/presentation/screens/profile_screen_test.dartEnsures pixel-perfect UI rendering over time.
Run:
flutter test test/presentation/screens/profile_screen_golden_test.dartRegenerate after intentional UI changes:
flutter test --update-goldens| Component | Technology |
|---|---|
| Framework | Flutter |
| Language | Dart (Strict Mode) |
| State Management | flutter_bloc |
| Equality | equatable |
| Networking | http |
| Testing | mocktail β’ bloc_test |
| Linting | very_good_analysis (MCFβcustomized) |
Licensed under the MIT License.
See the LICENSE file for full details.
"The difference between a prototype and a product is not features; it is predictability."
If you reference this architecture or implementation:
Phillips, Carlos. (2025). Mission-Critical Flutter: Building High-Integrity Applications.



