cfc 1.0.10
cfc: ^1.0.10 copied to clipboard
A CLI tool to scaffold clean architecture feature folders in Flutter.
๐งผ Clean Feature Creator #
โจ Save time. Stay consistent. Scale your codebase the clean way.
CFC is a Dart CLI tool that automates the creation of feature-driven folders following the Clean Architecture pattern in Flutter projects.
๐ Getting Started #
1. Install Globaly #
dart pub global activate --source path .
and then
dart pub global activate cfc
2. Usage #
In project directory just run:
cfc <feature_name>
๐ฆ What It Does #
CFC generates a full boilerplate structure inside your Flutter lib/ directory for a given feature name, including:
lib/
โโโ features/
โโโ your_feature/
โโโ data/
โ โโโ datasources/
โ โ โโโ remote/
โ โ โ โโโ your_feature_remote_datasource.dart
โ โ โโโ local/
โ โ โโโ your_feature_local_datasource.dart
โ โโโ models/
โ โ โโโ your_feature_dto.dart
โ โโโ repo/
โ โโโ your_feature_repo_impl.dart
โโโ domain/
โ โโโ entity/
โ โ โโโ your_feature.dart
โ โโโ repo/
โ โ โโโ your_feature_repo.dart
โ โโโ usecases/ โ ready for use case classes
โโโ presentation/
โโโ pages/
โโโ your_feature_page.dart
Each file is pre-filled with basic template code (classes, stubs, and comments) to jump-start your feature development.
-
โ Class names based on the feature name
-
๐ง Clean Architecture folder layout
-
โจ Auto-generated boilerplate for
- Data sources (remote/local)
- DTOs
- Repositories
- Domain entities
- UI Pages
๐ License #
MIT License ยฉ 2025 arg0nath โ Built with โค๏ธ for clean, scalable Flutter codebases.
๐ Credits
Inspired by Clean Architecture and the Flutter community