🧱 Blocraft CLI

blocraft is a simple CLI tool to generate a clean architecture folder structure for your Flutter projects.


🔧 Installation

To install blocraft globally, run:

dart pub global activate blocraft

Make sure that your Dart pub cache global executables path is added to your system PATH:

export PATH="$PATH":"$HOME/.pub-cache/bin"

🚀 Usage

Generate the core, shared, and features base folders:

blocraft init

Generate the folder structure for a specific feature (e.g., auth):

blocraft feature auth

📂 Generated Folder Structure

After running blocraft init:

lib/
└── src/
    ├── core/
    │   ├── error/
    │   ├── utils/
    │   ├── theme/
    │   └── routes/
    ├── shared/
    │   ├── usecases/
    │   ├── widgets/
    │   └── helpers/
    └── features/

After running blocraft feature <feature_name> (e.g., blocraft feature auth):

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

📖 About

Created by Singgi — a simple tool to speed up Flutter clean architecture setup by scaffolding boilerplate folders.