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

retracted

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

Arch Wizard 🧙✨ #

Pub Version License: MIT style: very good analysis

A powerful and flexible command-line tool to scaffold complete features for your Flutter projects using a clean architecture pattern. Drastically reduce boilerplate and enforce consistency across your team.


Features #

  • Automated Scaffolding: Generate the entire directory structure for a new feature with a single command.
  • Clean Architecture: Enforces a solid, scalable architecture with a clear separation of layers (Domain, Data, Presentation).
  • State Management Support: Out-of-the-box templates for BLoC, Riverpod, GetX, and Provider.
  • Automatic DI Registration: Automatically injects your new dependencies and imports into a get_it service locator file.
  • Production-Ready Templates: Generates code with robust error-handling patterns.

Installation #

Activate arch_wizard from your terminal to make it available as a system-wide command.

dart pub global activate arch_wizard

Usage #

1. Prepare Your Project (One-Time Setup)

For the automatic dependency injection to work, arch_wizard needs to know where to insert the new code. In your project's get_it setup file (e.g., lib/injection_container.dart), add the two markers.

import 'package:get_it/get_it.dart';

// The Arch Wizard will add new import statements right below this line.
// [IMPORT_GENERATE_HERE]

final sl = GetIt.instance;

Future<void> init() async {
  // The Arch Wizard will add new feature dependencies right below this line.
  // [DI_GENERATE_HERE]
}

2. Run the Command

Navigate to the root directory of your Flutter project and run the create_feature command.

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

Examples:

# Create a 'login' feature using BLoC
arch_wizard create_feature --name login --state bloc

# Create a 'cart' feature using Riverpod
arch_wizard create_feature --name cart --state riverpod

The tool will create all the necessary files in lib/features/<your_feature_name>/ and update your dependency injection file automatically.


Command Options #

Option Abbreviation Description Allowed Values Default
--name -n The name of the feature. (string)
--state -s The state management solution. bloc, riverpod, getx, provider bloc

Bugs or Requests #

If you encounter any problems, feel free to open an issue.


License #

This project is licensed under the MIT License - see the LICENSE file for details.

5
likes
0
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, get_it, mason_logger

More

Packages that depend on arch_wizard