Flutter Clean Architecture scaffolder - Create production-ready Flutter apps with Clean Architecture in seconds.
fwen is a command-line tool that scaffolds Flutter applications following Clean Architecture principles. It generates a complete project structure with configurable state management, navigation, dependency injection, and optional integrations for Firebase, authentication, analytics, testing, and CI/CD.
- 🏗️ Clean Architecture - Pre-configured layer separation (core, features, shared)
- ⚡ Fast - Create a full project in seconds with interactive or non-interactive CLI
- 🔧 Configurable - Support for Bloc, Provider, Riverpod, GoRouter, AutoRoute, and more
- 📦 Batteries Included - Optional Firebase, authentication, persistence, analytics setup
- 🧪 Testing Ready - Generated projects include testing structure
- 🚀 Production-Ready - Bootstrap error handling, logging, and best practices
- State Management: Bloc, Provider, Riverpod
- Navigation: GoRouter, AutoRoute, Navigator 2.0
- Dependency Injection: GetIt, Provider, Riverpod
- Firebase: Auth, Firestore, Functions, Analytics, Messaging, Storage
- Authentication: Email, Google, Apple, Phone
- API Layer: Dio, Retrofit
- Persistence: Shared Preferences, Hive, Isar
- Analytics: Firebase Analytics, Sentry, Mixpanel
- CI/CD: GitHub Actions, GitLab CI
- iOS, Android, Web, macOS, Windows, Linux
- Python 3.11+
- Flutter 3.22.0+
- Dart 3.4.0+
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install fwen
uv pip install fwen
# Or run directly with uv
uvx fwen --project-name my_apppip install fwengit clone https://github.com/calvingit/fwen.git
cd fwen
uv pip install -e .Run without arguments for step-by-step prompts:
fwenPass all options via command-line arguments:
# Basic usage
fwen --project-name my_app --org com.example
# Full example with all options
fwen \
--project-name my_awesome_app \
--org com.mycompany \
--description "My Awesome App" \
--state-management bloc \
--navigation go_router \
--platforms ios android web \
--include-api \
--api-choice dio \
--yes- Flutter Architecture Guide - architecture design and recommended directory structure
- Flutter Template Guide - template registry, decision matrix, and extension rules
Required:
--project-name- Project name in snake_case
Basic Options:
--org- Organization ID (default: com.example)--description- Project description--output-dir- Output directory (default: current)
Architecture:
--state-management- bloc|provider|riverpod (default: bloc)--navigation- go_router|auto_route|navigator (default: go_router)--dependency-injection- get_it|provider|riverpod (default: get_it)--no-examples- Disable example scenarios. Default behavior enablesinclude_examplesand appliesscenario.commerce_referenceintolib/.
Platforms:
--platforms- ios android web macos windows linux (default: ios android)
Features:
--include-auth----auth-methodsemail google apple phone--include-firebase----firebase-servicesauth firestore analytics messaging storage--include-api----api-choicedio retrofit fetch--include-persistence----persistence-choiceshared_preferences hive isar--include-analytics----analytics-choicefirebase_analytics sentry mixpanel--include-testing----testing-typesunit widget integration--include-ci----ci-choicegithub_actions gitlab_ci
Other:
--feature-name- Create initial feature--yes, -y- Skip confirmation--interactive, -i- Force interactive mode
Template Commands:
fwen templates list- Show full template registry metadatafwen templates explain- Show selected templates for current/default CLI configfwen templates explain --state-management riverpod --navigation auto_route --no-examples- Explain template selection for a specific architecture combination
- Default behavior uses
include_examples=True, so generator selectsscenario.commerce_reference. scenario.commerce_referencecopiestemplates/scenarios/commerce_reference/lib/**into generated projectlib/**.--no-examplessetsinclude_examples=False, so generator skipsscenario.commerce_reference.
Example:
# Includes scenario.commerce_reference by default
fwen --project-name shop_app --org com.example
# Skips scenario.commerce_reference
fwen --project-name shop_app --org com.example --no-examplesUse the feature generator script to add new features:
uv run python scripts/feature-dev.py <FeatureName>Example:
uv run python scripts/feature-dev.py AuthCreates:
lib/features/auth/domain/entities/auth_entity.dartlib/features/auth/domain/repositories/auth_repository.dartlib/features/auth/domain/usecases/get_auth_usecase.dartlib/features/auth/data/models/auth_model.dartlib/features/auth/data/repositories/auth_repository_impl.dartlib/features/auth/presentation/pages/auth_page.dart- Updates
lib/app/routes.dartwith new route
| Category | Options |
|---|---|
| State Management | Bloc, Provider, Riverpod |
| Navigation | GoRouter, AutoRoute, Navigator 2.0 |
| DI | GetIt, Provider, Riverpod |
| Platforms | iOS, Android, Web, macOS, Windows, Linux |
| API | Dio, Retrofit, Fetch |
| Persistence | Shared Preferences, Hive, Isar |
| Analytics | Firebase Analytics, Sentry, Mixpanel |
| CI/CD | GitHub Actions, GitLab CI |
We welcome contributions! Please see CONTRIBUTING.md for details.
MIT © calvingit
Made with ❤️ by the Flutter community