cfc 1.0.0
cfc: ^1.0.0 copied to clipboard
A CLI tool to scaffold clean architecture feature folders in Flutter.
๐งผ CFC - Clean Folder Creator #
CFC is a Dart CLI tool that automates the creation of feature-driven folders following the Clean Architecture pattern in Flutter projects.
โจ Save time. Stay consistent. Scale your codebase the clean way.
๐ Getting Started #
1. Install Locally #
dart pub global activate --source path .
This lets you run cfc from anywhere in your terminal.
2. Usage #
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_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.
๐ Example #
cfc type_selection
This will create the full structure inside:
lib/features/type_selection/
โ Class names are auto-formatted (PascalCase / camelCase) based on the feature name #
๐ง Clean Architecture folder layout #
โจ Auto-generated boilerplate for #
- Data sources (remote/local)
- DTOs
- Repositories
- Domain entities
- UI Pages
๐ง Smart name formatting (snake_case, PascalCase, camelCase) #
๐ Easy to extend with your own templates and naming rules #
๐บ Roadmap #
๐ค Contributing #
- Contributions and feature requests are welcome!
- Fork the repo
- Add your changes
- Open a PR
๐ License #
MIT License ยฉ 2025 โ Built with โค๏ธ for clean, scalable Flutter codebases.
๐ Credits
Inspired by Clean Architecture and the Flutter community.