arch_wizard 1.0.3 copy "arch_wizard: ^1.0.3" to clipboard
arch_wizard: ^1.0.3 copied to clipboard

A powerful CLI tool to scaffold Flutter clean architecture features...

Arch Wizard πŸ§™β€β™‚οΈβœ¨ #

Pub Version License: MIT Style: Very Good Analysis


Effortless Flutter Feature Scaffolding with Clean Architecture #

Arch Wizard is a powerful, flexible command-line tool designed to automate the creation of entire feature modules for Flutter apps β€” structured according to clean architecture principles. Save time, reduce boilerplate, and maintain consistency across your projects and teams.


✨ Key Features #

  • Automated Scaffolding: Generate a complete feature with domain, data, and presentation layers using a single command.
  • Clean Architecture Enforcement: Keep your code modular and maintainable.
  • Supports Multiple State Management Solutions: BLoC, Riverpod, GetX, Provider.
  • Automatic Dependency Injection Registration: Seamlessly update your get_it setup.
  • Production-Ready Templates: Includes robust error handling and architecture best practices.
  • Automatic Global Failure Classes Generation: When creating a feature, Arch Wizard automatically creates the global Failure classes and FailureMapper files (if they don't exist) in your project’s lib/core/error/ directory.
    This ensures consistent and reusable error handling across your entire app without manual setup.

πŸš€ Installation #

Install Arch Wizard globally via Dart's pub tool to use it anywhere:

dart pub global activate arch_wizard

Ensure your PATH includes pub global executables, so the command arch_wizard is recognized.


πŸ›  Usage #

Step 1: Run the Feature Creation Command #

From the root of your Flutter project, run:

arch_wizard create_feature --name <feature_name> --state <state_management>

Replace <feature_name> with your desired feature name (e.g., login). Choose your preferred state management from bloc, riverpod, getx, or provider.


Step 2: Example Commands #

# Generate a Login feature using BLoC
arch_wizard create_feature --name login --state bloc

# Generate a Product feature using Riverpod
arch_wizard create_feature --name product --state riverpod

# Generate a Profile feature using GetX
arch_wizard create_feature --name profile --state getx

# Generate a Cart feature using Provider
arch_wizard create_feature --name cart --state provider

Step 3: What Happens? #

  • Creates the full directory structure inside: lib/features/<feature_name>/
  • Generates domain, data, and presentation files with appropriate templates.
  • Automatically updates your DI file (e.g., lib/injection_container.dart) with new imports and registrations.

βš™οΈ Command Options #

Option Alias Description Allowed Values Default
--name -n Name of the feature to create Any valid string (e.g., login) β€”
--state -s State management approach bloc, riverpod, getx, provider bloc

πŸ’‘ Tips for Customization #

  • Generated templates include clear comments and TODOs to guide you customizing API calls, UI, and business logic.
  • Supports multi-layer clean architecture, so you can replace or extend any layer independently.
  • Easily integrate with your existing codebase by following the generated file and folder structure.

πŸ“œ License #

Arch Wizard is open source software licensed under the MIT License. See the LICENSE file for details.


Happy coding! πŸŽ‰ #

Build clean, scalable Flutter apps faster with Arch Wizard.


5
likes
130
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful CLI tool to scaffold Flutter clean architecture features...

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

args, equatable, get_it, mason_logger

More

Packages that depend on arch_wizard