generate_structure 1.0.2 copy "generate_structure: ^1.0.2" to clipboard
generate_structure: ^1.0.2 copied to clipboard

A CLI tool to generate folder structures (MVVM, MVC, MVP, Clean Architecture, Feature-based) for Flutter projects.

🏗 generate_structure #

🛠️ A Dart CLI tool to generate clean folder structures for your Flutter projects — in seconds.

Say goodbye to repeating the same folders every time you start a new screen or feature. Just run one command and get your project or screen structure ready with your favorite architecture style.


✨ Features #

  • Scaffold Flutter app or feature folder structure instantly

  • Supports the following architectures:

    • ✅ MVVM (Model-View-ViewModel)
    • ✅ MVC (Model-View-Controller)
    • ✅ MVP (Model-View-Presenter)
    • ✅ Clean Architecture
    • ✅ Feature-based (simple modular)
  • Interactive prompts:

    • Choose between whole app structure or single feature
    • Choose structure type
    • Auto handle duplicates

🚀 Installation #

Install globally using Dart:

dart pub global activate generate_structure
Ensure global executables are in your PATH:

Mac/Linux:

bash
Copy
Edit
export PATH="$PATH":"$HOME/.pub-cache/bin"
Windows (PowerShell):

powershell
Copy
Edit
$env:PATH += ";$env:USERPROFILE\AppData\Local\Pub\Cache\bin"
⚙️ Usage
Just run:

bash
Copy
Edit
generate_structure
And follow the interactive steps:

Select: Whole Application or Single Feature

Choose: Structure Type (MVVM, MVC, etc.)

(If Feature) Enter: Feature name (e.g. auth, profile)

📁 Example Output by Structure
🔷 MVVM (feature: auth)
kotlin
Copy
Edit
lib/
├── core/
│   ├── utils/
│   └── services/
├── features/
│   └── auth/
│       ├── data/
│       │   ├── models/
│       │   └── repo/
│       └── presentation/
│           ├── cubit/
│           └── view/
│               └── widgets/
🔶 MVC (feature: profile)
sql
Copy
Edit
lib/
├── core/
├── features/
│   └── profile/
│       ├── model/
│       ├── view/
│       └── controller/
🟢 MVP (feature: home)
arduino
Copy
Edit
lib/
├── core/
├── features/
│   └── home/
│       ├── model/
│       ├── view/
│       └── presenter/
⚪ Clean Architecture (feature: orders)
kotlin
Copy
Edit
lib/
├── core/
├── features/
│   └── orders/
│       ├── data/
│       │   ├── datasources/
│       │   └── repositories/
│       ├── domain/
│       │   ├── entities/
│       │   ├── repositories/
│       │   └── usecases/
│       └── presentation/
│           ├── cubit/
│           └── views/
🔸 Feature-Based Simple (feature: cart)
kotlin
Copy
Edit
lib/
├── features/
│   └── cart/
│       ├── data/
│       ├── view/
│       └── logic/
🔄 Updating the Tool
To update to the latest version:

bash
Copy
Edit
dart pub global activate generate_structure
2
likes
0
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool to generate folder structures (MVVM, MVC, MVP, Clean Architecture, Feature-based) for Flutter projects.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on generate_structure