code_structure

A CLI tool to scaffold solid code frame for your Dart/Flutter projects.

Installation

Activate the package globally:

dart pub global activate code_structure

Usage

Navigate to your project directory and run:

build code structure

You will be prompted to choose your architecture pattern:

Choose your architecture pattern:
  1. Clean Architecture + BLOC
  2. Clean Architecture + GetX
  3. MVVM + Riverpod

Enter your choice (1-3):

This command will:

  1. Show interactive menu with architecture options
  2. Clone the selected architecture template from the repository
  3. Copy the lib folder structure into your current project
  4. Automatically update the pubspec.yaml with your project name
  5. Update all package imports to match your project name
  6. Clean up temporary files

Example

# Create a new directory for your project
mkdir my_awesome_app
cd my_awesome_app

# Initialize the code structure
build code structure

# Choose your architecture (e.g., enter "1" for Clean Architecture + BLOC)
Enter your choice (1-3): 1

The tool will fetch the code frame for your selected architecture and set up your project.

Features

  • ๐Ÿš€ Quick project scaffolding
  • ๐Ÿ“ Organized folder structure
  • โš™๏ธ Automatic project name configuration
  • ๐Ÿงน Clean and minimal setup

Repository

https://github.com/ThawSoe/code_structure

Libraries

code_structure