Flutter ScaleGuard v0.5.0

Sample architecture scan · Project: FlareHabit
Scan path: C:/Development/Flutter Projects/FlareHabit

Architecture intelligence
Medium risk

Composite architecture score

Executive summary

This codebase shows early-stage coupling patterns that may reduce feature isolation as the team scales.

Dominant risk category
Coupling Risk
69% of total penalty
Most expensive risk
Feature → feature imports
−15.0 · cross_feature_coupling
Hotspot (source)
lib/features/habit_details
43 findings
Hotspot (target)
lib/features/habits
76 findings

Representative findings

+88 additional similar findings in this category.

Note: cross_feature_coupling reached its penalty cap — the score may understate severity for this rule.

Top fix priorities

1
lib/features/habit_details

Habit details feature

61 findings · dominant: cross_feature_coupling

Avoid direct feature-to-feature imports.

2
lib/features/habit_creation

Habit creation feature

46 findings · dominant: cross_feature_coupling

Avoid direct feature-to-feature imports.

3
lib/features/habits

Habits feature

15 findings · dominant: service_locator_abuse

Limit service locator usage to composition roots.

Hotspots by area

Location Total Breakdown
lib/features/habit_details 61 cross_feature_coupling: 43 · service_locator_abuse: 13 · layer_violations: 4 · god_files: 1
lib/features/habit_creation 46 cross_feature_coupling: 27 · hardcoded_scale_risks: 7 · service_locator_abuse: 5 · god_files: 4 · layer_violations: 3
lib/features/habits 15 service_locator_abuse: 6 · god_files: 4 · cross_feature_coupling: 3 · hardcoded_scale_risks: 1 · layer_violations: 1
lib/features/profile 9 service_locator_abuse: 5 · cross_feature_coupling: 3 · layer_violations: 1
lib/features/achievements 8 cross_feature_coupling: 6 · service_locator_abuse: 2
lib/features/home_page.dart 6 cross_feature_coupling: 6
lib/features/settings 5 hardcoded_scale_risks: 2 · layer_violations: 2 · service_locator_abuse: 1
lib/features/rewards 4 cross_feature_coupling: 3 · service_locator_abuse: 1
lib/features/onboarding 3 layer_violations: 2 · service_locator_abuse: 1
lib/core/navigation 1 god_files: 1

Findings by category

Coupling Risk
Feature Module Imports Another Feature
91 across 31 files · reduces isolation and scaling flexibility

Features importing each other directly increase coupling and reduce scalability.

Avoid direct feature-to-feature imports. Move shared contracts into a shared domain layer or introduce an abstraction.

Global Dependency Access Across Boundaries
34 across 15 files · reduces architectural clarity

Global dependency access hides dependencies and reduces architectural clarity.

Limit service locator usage to composition roots. Inject dependencies explicitly into classes.

Structural Risk
Layer Boundary Crossed
13 across 11 files · may increase coupling and future refactor cost

Crossing layer boundaries increases coupling and makes refactoring harder.

Ensure domain does not depend on data or presentation. Move implementations behind interfaces.

Maintainability Risk
Oversized File
10 across 10 files · increases change surface and review complexity

Large files increase change surface and reduce maintainability.

Split large files into smaller focused components. Separate responsibilities by layer or feature.

Configuration / Release Risk
Runtime Configuration Embedded in Code
10 across 3 files · increases release and environment risk

Hardcoded configuration reduces flexibility across environments.

Move configuration to environment-based or external config files. Avoid embedding runtime values in code.