cleany 0.0.60
cleany: ^0.0.60 copied to clipboard
A CLI tool to generate Clean Architecture feature structure for Flutter projects
π 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/