blueprint_cli 0.0.2%2B4

SDKflutter
Platformandroidioswindowslinuxmacos

A CLI tool for quickly bootstrapping Flutter projects and adding feature modules with clean architecture.

📝 blueprint_cli

blueprint_cli is a CLI tool that helps Flutter developers kickstart and scale their projects quickly with clean folder architecture and prebuilt templates. 🚀

✨ Features

  • Project Scaffolding

    • blue_print create-project --name <project_name>
    • Instantly sets up a Flutter project with essential packages and a well-structured architecture:
      • core/ contains:
        • Routing setup
        • Dependency injection
        • Networking utilities
        • Common Widgets
        • Helper functions
        • Initial theming setup
  • Feature Boilerplate Generator

    • blue_print add-feature --name <feature_name>
    • Adds a complete feature module with:
      • data/ → data sources, models, repositories
      • logic/ → cubits and logic holders
      • ui/ → views and widgets
    • Every folder includes ready-to-code templates.

📦 Installation

dart pub global activate blueprint_cli

Make sure you add the Dart SDK to your system's path.

🛠 Usage

Create a new project

blue_print create-project --name <project_name>

Add a new feature

blue_print add-feature --name <feature_name>

📁 Output Structure

🔧 After running blue_print create-project --name my_awesome_app:

lib/
│
├── core/
│   │
│   ├── helpers/              # Utility functions and common helpers
│   │
│   ├── network/              # Networking layer (API calls, result handling, error parsing)
│   │
│   ├── themes/               # Centralized themes and styling
│   │
│   ├── widgets/              # Reusable shared widgets
│   │
│   ├── di/                   # Dependency injection setup
│   │
│   └── routes/               # App routing configuration
│
└── features/                 # Modular feature-based structure

The core/ layer provides a robust foundation of reusable modules that support scalability and maintainability across the app.

🧩 After running blue_print add-feature --name login:

lib/
│
├── core/                            # Contains core modules (helpers, networking, DI, etc.)
│
└── features/
    │
    └── login/
        │
        ├── data/                      # Responsible for dealing with API requests
        │   │
        │   ├── models/               # Data models used in the login feature
        │   │
        │   ├── data sources/         # Contains Remote and Local Data Sources
        │   │
        │   └── repos/                # Contains the API repository
        │
        ├── logic/                    # Contains Cubits and Logic Holders
        │   │
        │   └── login_cubit/          # Contains LoginCubit and LoginState
        │
        └── ui/
            │
            ├── views/                # Contains the view file(s)
            │
            └── widgets/              # Contains the UI components/widgets

📦 Packages Included

The blueprint_cli project template comes preconfigured with several useful packages to help you get started with your Flutter projects efficiently. Below are the packages included in the template:

Package NamePurpose
flutter_screenutilFor responsive design and screen size adaptability
shared_preferencesTo store simple key-value pairs locally on the device
get_itService locator for dependency injection
dioPowerful HTTP client for network requests
pretty_dio_loggerLogs Dio requests and responses for better debugging
freezed_annotationCode generation for immutable classes and sealed unions (using freezed)
json_annotationProvides annotations for JSON serialization and deserialization
flutter_blocState management using Bloc or Cubit pattern
retrofitAPI client generator that uses annotations for network calls
retrofit_generatorCode generation for retrofit API client
build_runnerRequired for code generation (e.g., retrofit, freezed, json_serializable)
freezedCode generation for immutable classes, union types, and copyWith methods
json_serializableCode generation for converting objects to and from JSON

These packages are ready for use, but feel free to modify, add, or remove any packages based on your project requirements.