cfc 1.0.10 copy "cfc: ^1.0.10" to clipboard
cfc: ^1.0.10 copied to clipboard

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

pub package

๐Ÿงผ 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

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

๐Ÿ“„ License #

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

๐Ÿ™Œ Credits

Inspired by Clean Architecture and the Flutter community

1
likes
160
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

lints

More

Packages that depend on cfc