generate_structure 1.0.5

SDKdartflutter
Platformandroidioswindowslinuxmacosweb

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

🏗 generate_structure

Are you tired of repeating the same folder setup every time you start a new Flutter screen or feature?

This simple Dart CLI tool lets you generate clean folder structures for your Flutter project in seconds — MVVM, MVC, MVP, Clean Architecture, or even a simple feature-based layout. All with just one command.


✨ Features

  • 🏗 Generate full project structure or just a feature/screen
  • 🧱 Supports:
    • MVVM (Model-View-ViewModel)
    • MVC (Model-View-Controller)
    • MVP (Model-View-Presenter)
    • Clean Architecture
    • Simple Feature-Based Layout
  • ❓ Interactive prompts — you choose what you want
  • ♻️ Smart — skips existing folders, no duplication

🚀 Installation

Activate it globally using Dart:

dart pub global activate generate_structure
Then add it to your PATH:

On Mac/Linux:
bash
Copy
Edit
export PATH="$PATH":"$HOME/.pub-cache/bin"
On Windows (PowerShell):
powershell
Copy
Edit
$env:PATH += ";$env:USERPROFILE\AppData\Local\Pub\Cache\bin"
⚙️ Usage
Just run:

bash
Copy
Edit
generate_structure
Then follow the interactive CLI:

Choose between "Whole App" or "Single Feature"

Pick your structure style (MVVM, MVC, MVP, etc.)

(If Feature) Type your feature name (e.g. auth, home, etc.)

That’s it — your folder structure is generated 🎯

📁 Example Outputs
🔷 MVVM (Feature: auth)
kotlin
Copy
Edit
lib/
├── core/
│   ├── utils/
│   └── services/
├── features/
│   └── auth/
│       ├── data/
│       │   ├── models/
│       │   └── repo/
│       └── presentation/
│           ├── cubit/
│           └── view/
│               └── widgets/
🔶 MVC (Feature: profile)
vbnet
Copy
Edit
lib/
├── models/
├── controllers/
├── views/
│   └── profile/
│       └── widgets/
🟢 MVP (Feature: home)
arduino
Copy
Edit
lib/
├── models/
├── presenters/
├── views/
│   └── home/
│       └── widgets/
⚪ Clean Architecture (Feature: orders)
kotlin
Copy
Edit
lib/
├── features/
│   └── orders/
│       ├── domain/
│       │   ├── entities/
│       │   ├── repositories/
│       │   └── usecases/
│       ├── data/
│       │   ├── datasources/
│       │   ├── models/
│       │   └── repositories/
│       └── presentation/
│           ├── bloc/
│           ├── pages/
│           └── widgets/
🔸 Feature-Based Simple (Feature: cart)
sql
Copy
Edit
lib/
├── features/
│   └── cart/
│       ├── controller/
│       ├── model/
│       └── view/
│           └── widgets/
🔄 Update the Tool
To get the latest version:

bash
Copy
Edit
dart pub global activate generate_structure
❤️ Why Use It?
Code organization is not just a preference — it's a productivity boost.
generate_structure helps you start clean and stay consistent from day one.

## 👨‍💻 Created By

**Kareem Mahmoud**  
📧 kareem01229526319@gmail.com  
📍 Flutter Developer | Architecture-Driven Engineer | Code Generator Enthusiast | Crafting Scalable UIs & Developer Tools

🚀 I build tools that help Flutter developers build faster and cleaner.