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:
- Show interactive menu with architecture options
- Clone the selected architecture template from the repository
- Copy the
libfolder structure into your current project - Automatically update the
pubspec.yamlwith your project name - Update all package imports to match your project name
- 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