flutter_clean_architect_gen 0.0.2 copy "flutter_clean_architect_gen: ^0.0.2" to clipboard
flutter_clean_architect_gen: ^0.0.2 copied to clipboard

A CLI tool to generate Clean Architecture structure in Flutter projects.

flutter_clean_architect_gen 🚀

A command-line tool that automatically generates a Clean Architecture folder structure for your Flutter projects.

This helps you quickly scaffold new features following clean architecture principles — keeping your app modular, scalable, and easy to maintain.

✨ Features

🔧 Generate new feature modules with one command

🧱 Automatically creates folders for core, data, domain, and features layers

🚀 Quickly initialize a clean architecture project structure

🧩 Keeps your project organized and consistent

🧠 Simple, CLI-based, and easy to integrate into your Flutter workflow

🧰 Installation

Activate globally using Dart:

dart pub global activate flutter_clean_architect_gen

Or, if you want to use it locally in your Flutter project:

flutter pub add dev:flutter_clean_architect_gen

⚙️ Usage

Run any of the following commands inside your Flutter project 👇

🏗 Initialize Clean Architecture structure

Creates the base folder structure:

dart run flutter_clean_architect_gen init

✅ This command creates:

lib/ ├── core/ │ ├── constants/ │ ├── errors/ │ ├── network/ │ ├── usecases/ │ ├── utils/ │ └── widgets/ ├── data/ │ ├── datasources/ │ ├── models/ │ └── repositories/ ├── domain/ │ ├── entities/ │ ├── repositories/ │ └── usecases/ └── features/

🧩 Create a new feature module

To add a new feature (e.g., auth, user, or home):

dart run flutter_clean_architect_gen create_feature <feature_name>

Example:

dart run flutter_clean_architect_gen create_feature auth

It generates the following structure:

lib/features/auth/ ├── data/ │ ├── datasources/ │ ├── models/ │ └── repositories/ ├── domain/ │ ├── entities/ │ ├── repositories/ │ └── usecases/ └── presentation/ ├── pages/ ├── providers/ └── widgets/

🧱 Command Summary Command Description dart run flutter_clean_architect_gen init Initializes the base clean architecture folder structure dart run flutter_clean_architect_gen create_feature <feature_name> Generates a new feature module with proper folder layers dart pub global activate flutter_clean_architect_gen Installs the package globally for CLI use 💡 Example Workflow

Step 1: Initialize structure #

dart run flutter_clean_architect_gen init

Step 2: Add a new feature #

dart run flutter_clean_architect_gen create_feature home

Step 3: Add another feature #

dart run flutter_clean_architect_gen create_feature user

📦 Output Example

After running both commands, your folder tree will look like this:

lib/ ├── core/ ├── data/ ├── domain/ └── features/ ├── home/ │ ├── data/ │ ├── domain/ │ └── presentation/ └── user/ ├── data/ ├── domain/ └── presentation/

🧑‍💻 Contributing

Pull requests are welcome! If you’d like to improve this CLI, fork the repo and submit your ideas.

13
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool to generate Clean Architecture structure in Flutter projects.

License

unknown (license)

Dependencies

ansicolor, path

More

Packages that depend on flutter_clean_architect_gen