cfc 1.0.0 copy "cfc: ^1.0.0" to clipboard
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 #

  1. Data sources (remote/local)
  2. DTOs
  3. Repositories
  4. Domain entities
  5. UI Pages

๐Ÿง  Smart name formatting (snake_case, PascalCase, camelCase) #

๐Ÿ›  Easy to extend with your own templates and naming rules #

๐Ÿ—บ Roadmap #

๐Ÿค Contributing #

  1. Contributions and feature requests are welcome!
  2. Fork the repo
  3. Add your changes
  4. Open a PR

๐Ÿ“„ License #

MIT License ยฉ 2025 โ€” Built with โค๏ธ for clean, scalable Flutter codebases.

๐Ÿ™Œ Credits

Inspired by Clean Architecture and the Flutter community.

1
likes
0
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool to scaffold clean architecture feature folders in Flutter.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on cfc