bachhoan88/FlutterCleanArchitecture
63.2
Adequate · 21 September 2026
3.5k
lines of production code
Dart
with C++
4
measurements over time
What this system is
This system is a cross-platform mobile and desktop application built with Flutter, supporting Android, iOS, Linux, and Windows. It manages movie-related data through a repository pattern that leverages Riverpod for state management and Hive for local storage. The application features a presentation layer that handles UI states and exceptions, while also supporting internationalization with Japanese language translations.
Features
Add Japanese language support to resource mapping
The ResourceMapper now supports Japanese localization. A new import for the Japanese resource bundle (res\_ja.dart) was added, and the mapper's logic was updated to return a Japanese-specific Resource instance when the input data is 'ja', ensuring correct localization for Japanese users.
lib/src/domain/mapper · high confidence
Add Japanese language translations
Added the Japanese (ja) localization file (res\_ja.arb) containing translations for key UI strings such as app name, menu items, and error messages.
lib/res · high confidence
Added Linux desktop platform support
The Linux desktop environment is now supported. This includes the necessary CMake build configuration, GTK application entry points, and Flutter plugin registration to enable running the app on Linux.
linux · high confidence
Added Windows platform support for the application
The application now supports the Windows platform. This change introduces the necessary CMake build configurations, C++ runner code, and Flutter engine integration files required to build and run the app on Windows. Users can now install and run the application on Windows 10 and later, with support for high-DPI scaling and plugin registration.
windows · high confidence
Introduce base presentation classes for state and view management
Added new base classes \BaseStatelessView\ and \BaseViewModel\ to the presentation layer, providing a standardized way to handle UI states such as loading, errors, toasts, dialogs, and redirects. The \BaseViewModel\ now exposes observable properties for various exception types (snack, toast, dialog, alert, redirect, inline tags) and a loading state, while \BaseStatelessView\ implements the corresponding UI logic to display these states. Existing files \common\_state\_listener.dart\ and \common\_state\_view.dart\ were updated to remove unnecessary null checks on \WidgetsBinding.instance\.
lib/src/presentation/base · high confidence
Behavioural changes
Android manifest and Gradle build configuration updates
The Android app's manifest now explicitly sets the main activity as exported, which may affect how the app is discovered or launched by other apps or system components. Additionally, the Android build system has been upgraded to use Gradle 7.2, which may introduce changes in build behavior or compatibility.
android · medium confidence
Exception classes updated to carry richer context data
The exception handling classes in the domain layer have been updated to include additional context fields. DialogException now stores a Dialogs object instead of a single Dialog, and InlineException now stores a typed list of Tag objects instead of an untyped list. Additionally, RedirectException has been extended to include a dynamic 'data' field, allowing it to carry extra payload information alongside the redirect target.
lib/src/domain/exception · medium confidence
Introduce Hive-based local storage abstraction
A new AppStorage class has been added to manage local data persistence using the Hive library. This change replaces the previous preferences implementation with a Hive-backed storage solution, allowing the application to store and retrieve user preferences more efficiently.
lib/src/data/local · medium confidence
Make movie type parameter optional
The fetchMovies method in the MovieRepository now accepts an optional type parameter, allowing callers to retrieve movies without specifying a type. This change modifies the repository interface to support more flexible querying by making the type argument nullable.
lib/src/domain/repository · high confidence
Migrate presentation layer to Riverpod and Flutter 3.0
The presentation layer has been migrated from the Flutter Hooks-based architecture to the Riverpod state management library. This change updates the dependency injection and view-model providers to use \ref.watch\ instead of \ref.read\ for reactive state updates, and replaces \HookWidget\ with \ConsumerWidget\ or \BaseStatelessView\ in the UI components. Additionally, the app's text theme has been updated to use Flutter 3.0's new text style names (e.g., \headlineMedium\ instead of \headline4\), and unused widgets like \StatefulWrapper\ have been removed.
lib/src/presentation/ui · high confidence
Migrate to Riverpod and Hive for dependency injection and storage
The application has been updated to use the Riverpod state management library, replacing the previous provider implementation. This includes changing provider read calls to watch calls in the network and repository layers to properly handle reactive state. Additionally, the app now initializes Hive for local storage, replacing the previous preferences-based storage mechanism with a new AppStorage abstraction.
lib/src/data/di · high confidence
Project setup and documentation updates
The project now includes standard repository documentation and legal files: a Code of Conduct, a Contributing guide, and an MIT License. The README has been updated to document the data flow, exception handling, and environment requirements (Dart 2.12+, Flutter 2.0+). Additionally, the analysis options have been updated to include generated files (mocks, generators) in the analyzer's exclusion list and adjust linting rules.
(repo-wide) · high confidence
Refactor ExceptionMapper to use language code instead of Riverpod
The ExceptionMapper no longer depends on the Riverpod state container or the AppProvider for retrieving the user's language code. Instead, the language code is passed directly as a constructor argument, simplifying the dependency injection and removing the need for the hooks\_riverpod and app\_provider imports.
lib/src/data/mapper · high confidence
Refactor authentication header and token refresh logic
The header interceptor now retrieves the authentication token via a new AppStorage interface instead of the previous AppPrefs class, and adds error handling for platform info retrieval. The token interceptor has been changed from Interceptor to QueuedInterceptor, and the token refresh logic now compares the request token with the stored token to decide whether to refresh, replacing the previous lock/unlock mechanism.
lib/src/data/remote/interceptor · high confidence
Removal of Flutter dependency and immutable annotation
The code in lib/src/constants.dart has been updated to remove the import of the Flutter Cupertino library and the @immutable annotation on the Constants class. This change eliminates the dependency on Flutter for this specific file, likely as part of a broader effort to decouple core logic from the Flutter framework.
lib/src · high confidence
Removes web-specific HTTP client adapter
The DioBuilder no longer automatically configures a browser-specific HTTP client adapter for web platforms. The code that instantiated BrowserHttpClientAdapter for web requests has been removed, meaning web requests will now use the default HTTP client adapter instead of a specialized browser adapter.
lib/src/data/remote/builder · medium confidence
Rename and relocate Action enum to GlobalAction
The \Action\ enum has been renamed to \GlobalAction\ and moved from \lib/src/domain/annotation/action.dart\ to \lib/src/domain/model/action.dart\. Consequently, the \Dialog\ class has been renamed to \Dialogs\, and its \positiveAction\ and \negativeAction\ fields now use the new \GlobalAction\ type. This change consolidates the action definitions into the domain model layer.
lib/src/domain/annotation, lib/src/domain/model · high confidence
Switch local storage from SharedPreferences to Hive
The app's local preference storage has been migrated from the shared\_preferences package to Hive. This change replaces the previous asynchronous SharedPreferences API with Hive's Box-based storage, affecting how user data, tokens, and first-run flags are read and written locally.
lib/src/data/local/pref · high confidence
Updated MovieRepositoryImpl to use language code instead of Riverpod for exception mapping
The MovieRepositoryImpl constructor no longer accepts a Riverpod Reader; instead, it takes a languageCode string. This language code is passed to the ExceptionMapper, indicating a shift away from the Riverpod dependency in this component.
lib/src/data · medium confidence
Updated code coverage report for data layer
The \coverage/lcov.info\ file has been updated to reflect the current state of code coverage for the data layer. The report includes coverage metrics for \app\_error.dart\, \movie\_db\_error\_data\_model.dart\, \error\_data\_model.dart\, \fetch\_movies\_usecase.dart\, and several model files. Notably, \movie\_info\_data\_model.g.dart\ and \movie\_image\_data\_model.g.dart\ show 0% line coverage, indicating these generated files are currently untested or excluded from the coverage analysis.
coverage · medium confidence
Updated data models to use nullable JSON types and modern equality/hashCode implementations
The data models in lib/src/data/model have been updated to use nullable JSON types (e.g., Map\<String, Object?\>) and modern equality/hashCode implementations (using Object.hash/Object.hashAll). This change affects all data models in the lib/src/data/model directory, including collection, company, country, error, genre, image, language, movie, movie info, movie db error, movie image, and user data models. The changes also include removing unused json\_annotation imports and updating generated code to use the new type signatures.
lib/src/data/model · high confidence
Updated generated asset, color, and font definitions
The generated code in lib/gen has been updated to include new asset references (icMenu, icNetflix), new color definitions (including MaterialColor and MaterialAccentColor entries for crimsonRed and yellowOcher, plus several new single-color constants), and a new font family (Muli). These changes reflect updates to the underlying asset, color, and font configurations used by the application.
lib/gen · high confidence
Updated remote API and response serialization to use new Dart 2.12-compatible patterns
The remote API layer and response models have been updated to use the new $checkedCreate API and arrow-function syntax, replacing the older $checkedNew pattern. This change, required for Dart 2.12 compatibility, also introduces explicit header variable initialization in the generated API client code, ensuring that HTTP requests are constructed with properly initialized header maps rather than inline empty maps.
lib/src/data/remote/api, lib/src/data/remote/response · high confidence
iOS build environment upgraded to support modern iOS versions and multi-environment workflows
The iOS project has been upgraded to Xcode 13 (objectVersion 54, LastUpgradeCheck 1300) and targets a minimum iOS version of 11.0. This change introduces dedicated build schemes and configurations for dev, stag, and prod environments, enabling distinct build settings for each. Additionally, the default Runner scheme now includes the RunnerTests target in the test action, and the app's Info.plist has been updated with keys to support modern iPhone features.
ios · high confidence
macOS build system updated to support CocoaPods and updated plugins
The macOS build configuration has been updated to integrate CocoaPods, adding the Pods framework and associated build phases to the Xcode project. This change also updates the plugin registry to use the new 'path\_provider\_foundation' plugin and removes the deprecated 'shared\_preferences\_macos' plugin, reflecting a shift in how native dependencies are managed on macOS.
macos · medium confidence
Test coverage
Add unit tests for movie use cases and home view model
Added unit tests for the FetchMoviesUsecase and HomeViewModel, including generated Mockito mocks for the repository and use case. The previous manual mock classes in the test/src/mock directory were removed in favor of the new test files.
test · high confidence
Dependencies
Updated Flutter dependencies and native build configurations
The project's dependencies have been updated to newer versions, including Flutter 3.0, dio ^4.0.3, retrofit ^3.0.0, and hive for local storage. On the native side, the Android build was upgraded to compileSdk and targetSdk 33 with Kotlin 1.6.10 and Gradle 7.1.3, while iOS was updated to support iOS 11.0 and added the fluttertoast plugin.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 57 → 63 (+6.2)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 97 (-2.9)
- Architecture 100 → 91 (-9.3)
- Maturity 39 → 51 (+12.3)
- Readiness 53 → 52 (-1.0)
- Security 81 → 93 (+12.4)
- Domain Modelling 100 → 100 (+0.0)
Resolved (10)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High CVE: [GHSA redacted] (pubspec.lock)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Test reliability not included
- This asset README is a thin one-line 'You can customize the launch screen with your own desired assets by replacing the image files in this directory.' and does not explain how to replace or reference images. (ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md)
- complexity unreadable for .dart, .kt, .swift — churn × complexity hotspots could not be measured
- dormant codebase — no living knowledge left to concentrate
New (32)
- AppError.from (cognitive 17) (lib/src/data/app_error.dart)
- AppError.from (cyclomatic 19) (lib/src/data/app_error.dart)
- CommonStateListener.observer (cognitive 22) (lib/src/presentation/base/common_state_listener.dart)
- CommonStateListener.observer (cyclomatic 16) (lib/src/presentation/base/common_state_listener.dart)
- CommonStateView.build (cognitive 19) (lib/src/presentation/base/common_state_view.dart)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (12 lines × 2) (lib/src/presentation/base/common_state_listener.dart)
- Duplicated block (12 lines × 2) (lib/src/presentation/ui/detail/component/screen_shot_view.dart)
- Duplicated block (12 lines × 3) (lib/src/presentation/ui/detail/component/screen_shot_view.dart)
- Duplicated block (13 lines × 3) (lib/src/presentation/ui/detail/component/screen_shot_view.dart)
- Duplicated block (14 lines × 2) (lib/src/presentation/ui/home/component/category_view_holder.dart)
- Duplicated block (16 lines × 4) (lib/src/presentation/ui/detail/component/screenshot_view_holder.dart)
- Duplicated block (19 lines × 2) (lib/src/presentation/ui/home/component/my_list_view.dart)
- Duplicated block (23 lines × 2) (lib/src/presentation/base/common_state_listener.dart)
- Duplicated block (24 lines × 2) (lib/src/presentation/ui/home/component/category_view_holder.dart)
- High CVE: [GHSA redacted] (pubspec.lock)
- High: security finding (details withheld)
- High: security finding (details withheld)
- …and 12 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
bachhoan88/FlutterCleanArchitecture was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 68fd3ec2178eb04f45163128c9da1e8426fb01d4 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.