🚀 Cleany — Flutter Clean Architecture Generator

Cleany is more than a feature generator—it’s a complete automation toolkit designed to bootstrap full Flutter projects following Clean Architecture and Cubit state management.

With Cleany, you eliminate repetitive setup steps and focus entirely on writing real business logic.


🚀 How Cleany Works

For the best experience, start with a fresh Flutter project. Cleany prepares a full, production-ready architecture instantly—no manual setup required.


🧱 1. Core Structure Automation

Running the Core command generates all foundational components of a scalable Flutter application:

  • constants
  • error handling
  • navigation
  • network configuration
  • theming
  • dependency injection (DI)

Each file comes pre-filled with ready-to-use boilerplate code.


🔧 2. Automatic Dependency Management

Cleany injects all essential Clean Architecture packages directly into your pubspec.yaml, including:

  • flutter_dotenv
  • multiple_result
  • flutter_bloc / bloc
  • dart_mappable
  • dio / retrofit
  • easy_localization
  • flutter_secure_storage
  • sizer
  • supabase_flutter
  • get_storage
  • get_it
  • go_router
  • injectable
  • equatable
  • package_info_plus / device_info_plus
  • build_runner
  • dart_mappable_builder
  • retrofit_generator
  • injectable_generator … and more.

No manual editing required—everything is wired automatically.


🧩 3. Feature Generation (as Screen)

When running:

cleany -s profile

Cleany generates a complete Clean Architecture feature module:

🟦 Presentation

  • Cubit
  • States
  • Pages
  • Widgets

🟩 Domain

  • Entities
  • Repositories
  • Usecases

🟧 Data

  • DataSources
  • Models
  • Repository Implementations

Cleany also updates:

  • Routing configuration
  • Dependency Injection setup

Your feature becomes functional immediately.


🧩 4. Feature Generation (as Widget)

For standalone widgets:

cleany -w card_profile

Cleany generates:

🟦 Presentation

  • Cubit
  • States
  • Pages (if needed)

🟩 Domain

  • Entities
  • Repositories
  • Usecases

🟧 Data

  • DataSources
  • Models
  • Repositories

Perfect for reusable UI modules.


📘 Usage

Create a full Screen Feature

cleany -s <feature_name>

Create a Widget Feature

cleany -w <feature_name>

General Command

cleany [options]

Examples

cleany auth
# Generates a full CLEAN feature with routing & DI.

cleany -c
# Builds the entire core folder structure.

cleany -a
# Injects all essential Clean Architecture dependencies.

🧩 Summary

Cleany jump-starts your Flutter projects with a complete, scalable Clean Architecture setup—instantly. From Core generation to Feature creation, DI wiring, and routing automation, Cleany gives you everything you need to start building real functionality from day one.


📦 Feature Structure Generated

✅ Data Layer

  • datasources
  • models
  • repositories

✅ Domain Layer

  • entities
  • repositories
  • usecases

✅ Presentation Layer

  • cubit
  • states
  • pages
  • widgets

Includes pre-built base classes for immediate development.


📦 Core Structure Generated

constants/
    app_colors.dart
    app_images.dart
    app_enums.dart

errors/
    failure.dart

navigation/
    app_router.dart
    routers.dart

theme/
    app_theme.dart
    app_text_theme.dart
    cubit/
        theme_state.dart
        theme_cubit.dart

network/
    dio_client.dart
    network_exceptions.dart
    api_endpoints.dart

extensions/
    context_extensions.dart
    string_extensions.dart
    color_extensions.dart

widgets/
    loading_widget.dart

utils/
    validators.dart
    formatters.dart

services/
    local_keys_service.dart
    logger_service.dart

di/
    configure_dependencies.dart
    third_party_config.dart

common/

Libraries

generate/generate_core_base
generate/generate_feature_screen_structure
generate/generate_feature_widget_structure
get_content/content/ar_json_content
get_content/content/core_files/constants/app_colors
get_content/content/core_files/constants/app_enums
get_content/content/core_files/constants/app_icons.dart
get_content/content/core_files/constants/app_images
get_content/content/core_files/di/configure_dependencies
get_content/content/core_files/di/third_part
get_content/content/core_files/errors/failure
get_content/content/core_files/errors/network_exceptions
get_content/content/core_files/extensions/color_extensions
get_content/content/core_files/extensions/context_extensions
get_content/content/core_files/extensions/string_extensions
get_content/content/core_files/global/cubit/public_cubit
get_content/content/core_files/global/cubit/public_state
get_content/content/core_files/navigation/app_router
get_content/content/core_files/navigation/routes
get_content/content/core_files/network/api_endpoints
get_content/content/core_files/network/dio_client
get_content/content/core_files/services/app_device_utils
get_content/content/core_files/services/local_keys_service
get_content/content/core_files/setup
get_content/content/core_files/theme/app_text_theme
get_content/content/core_files/theme/app_theme
get_content/content/core_files/utils/formatters
get_content/content/core_files/utils/validators
get_content/content/core_files/widgets/loading_widget
get_content/content/en_json_content
get_content/content/features_files/date/base_local_data_source_file
get_content/content/features_files/date/base_remote_data_source_file
get_content/content/features_files/date/model_file
get_content/content/features_files/date/repository_data_file
get_content/content/features_files/domain/entity_domain_file
get_content/content/features_files/domain/repository_domain_file
get_content/content/features_files/domain/use_case_domain_file
get_content/content/features_files/presentation/cubit
get_content/content/features_files/presentation/screen_feature
get_content/content/features_files/presentation/state
get_content/content/features_files/presentation/widget
get_content/content/main_content
get_content/content/sub_features_files/date/base_local_data_source_file
get_content/content/sub_features_files/date/base_remote_data_source_file
get_content/content/sub_features_files/date/model_file
get_content/content/sub_features_files/date/repository_data_file
get_content/content/sub_features_files/domain/entity_domain_file
get_content/content/sub_features_files/domain/repository_domain_file
get_content/content/sub_features_files/domain/use_case_domain_file
get_content/content/sub_features_files/presentation/cubit
get_content/content/sub_features_files/presentation/state
get_content/content/sub_features_files/presentation/widget_feature
get_content/get_file_core_content
get_content/get_file_screen_feature_content
get_content/get_file_widget_feature_content
initialize/initialize_add_packages
initialize/initialize_feature_screen
initialize/initialize_feature_widget
initialize/initialize_folders_core
utils/extension/extensions
utils/file_modifier
utils/logger