π Cleany β Flutter Clean Architecture Generator
Cleany is not just a feature generator β it is a complete automation solution designed to bootstrap a new Flutter project with a fully organized Clean Architecture structure using the Cubit state management pattern.
It simplifies the entire project setup process, allowing you to focus on business logic instead of repetitive configurations.
π How Cleany Works
To get the most out of Cleany, you should start your project from scratch. The tool prepares everything you need to launch a complete, well-structured Flutter application.
π§± 1. Core Structure Building (Core Automation)
When running the Core generation command, Cleany automatically creates all essential files and folders required for any professional Flutter project, including:
- constants
- error handling
- navigation
- network configurations
- theme
- di
π§ 2. Dependency Management
Cleany adds all necessary packages required for a Clean Architectureβbased project directly into your pubspec.yaml, such as:
- Dio
- get_it
- logger
- bloc
- retrofit
- flutter_dotenv
- injectable
- supabase_flutter
- cached_network_image
- flutter_bloc
- equatable
- dartz
- dio
- go_router
- get_storage
- intl
- dart_mappable
- hydrated_bloc
- uuid
- image_picker
- flutter_svg
- connectivity_plus
- permission_handler
- url_launcher
- flutter_secure_storage
- path_provider
- package_info_plus
- share_plus
- lottie
- gap
- shimmer
- sizer
- build_runner
- dart_mappable_builder
- retrofit_generator
- injectable_generator
π§© 3. Feature Generation
When generating a new feature (Example: cleany auth), Cleany produces the full feature structure following Clean Architecture principles:
π¦ Presentation Layer
- Cubit
- States
- Pages
- Widgets
π© Domain Layer
- Entities
- Repositories
- Usecases
π§ Data Layer
- DataSources
- Models
- Repositories
It also automatically adds:
- Routing entries for the new feature
- Dependency Injection configuration
So your new module becomes instantly usable.
π Usage
Generate a Feature
cleany <feature_name>
General Command
cleany [options]
Examples
cleany auth
# Generates a new feature (auth) with all Clean Architecture layers + routing + DI.
cleany -c
# Generates the essential Core folders and files for the initial project structure.
cleany -d
# Inserts the required Clean Architecture dependencies (Cubit, Dio, GetIt) into pubspec.yaml.
π§© Summary
Cleany is your gateway to starting new Flutter projects with a strong and scalable Clean Architecture foundation from day one.
π¦ Feature Structure Generated
-
β Data Layer
- datasources
- models
- repositories
-
β Domain Layer
- entities
- repositories
- usecases
-
β Presentation Layer
- cubit
- states
- pages
- widgets
Includes base classes for instant 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-AR_json
- 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-US_json
- 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
- print_help_method
- utils/extension/extensions
- utils/file_modifier
- utils/Loger