getx_boilerplate_cli 1.0.1
getx_boilerplate_cli: ^1.0.1 copied to clipboard
Command-line interface to generate premium Flutter starter boilerplates utilizing GetX and Clean Architecture.
GetX Boilerplate CLI ๐ #
An enterprise-grade, developer-friendly Command-Line Interface (CLI) tool to instantly scaffold a premium Flutter starter template. Built upon Clean Feature-First Architecture, GetX, Centralized Dependency Injection, Singleton Routing, and deeply customizable Premium UI Components.
Instead of manually cloning a repository and performing tedious search-and-replace naming configurations, this CLI automates the entire process in seconds!
โก Quick Start #
1. Install the CLI Globally #
Activate the CLI tool on your local machine using the Dart SDK package manager:
dart pub global activate getx_boilerplate_cli
Tip
Ensure your system's PATH environment variable includes the Dart SDK pub-cache/bin directory so you can run the command directly from any terminal.
2. Scaffold a New Project #
Run the create command followed by your desired project name (in lowercase with underscores):
getx_boilerplate_cli create my_awesome_app
โ๏ธ What the CLI Handles Automatically #
When you run the create command, the CLI performs the following tasks:
- ๐ฅ Repository Cloning: Clones the absolute latest production-ready template from parentroots/getx.
- ๐งน Git History Cleanup: Deletes the cloned
.gitdirectory so you start with a clean git history for your team. - ๐ง Smart Package Renaming: Recursively scans and renames all namespace declarations and imports from
getx_templatetomy_awesome_app(inpubspec.yaml, Dart source files, Android package manifests, Kotlin imports, iOS configurations, and CMake build configurations). - ๐ Directory Sorting: Renames files and directory packages containing
getx_templateto match your new project. - ๐ฆ Dependency Resolution: Automatically runs
flutter pub getinside the generated project directory so it's ready to run immediately.
๐๏ธ Generated Project Architecture #
The generated project is structured using the industry-proven Clean Feature-First Architecture:
lib/
โโโ core/ # App-wide foundations & configurations
โ โโโ bindings/ # Centralized global Dependency Injection (FENIX-enabled)
โ โโโ config/ # App lifecycle observers & configurations
โ โโโ constants/ # Static app constants (API, storage keys, colors, strings)
โ โโโ errors/ # Global error handling logic & custom exceptions
โ โโโ localization/ # Internationalization & translations
โ โโโ network/ # Singleton HTTP (Dio) and WebSocket Clients
โ โโโ routing/ # Singleton navigation & routes registration
โ โโโ theme/ # Curated light/dark theme config, radius, & typography
โ โโโ utils/ # Helper utilities & extensions
โ
โโโ component/ # Globally shared, highly customizable Common UI widgets
โ โโโ dialogs/ # App dialogs & Common Snackbars
โ โโโ layout/ # Lists, Grids, Dropdowns, Radios, Scaffolds, and CommonText
โ โโโ loading/ # Common shimmers, page loaders & loading overlays
โ โโโ pickers/ # Compressed Multi-Image, Date, Time, and Country pickers
โ โโโ states/ # Empty, Error, Offline, and Retry state views
โ
โโโ features/ # Self-contained modules (Domain layers)
โโโ [feature_name]/ # Example: auth, home, profile
โโโ data/ # Module-specific API integrations & data models
โโโ screen/ # Flattened UI Presentation Layer (View + Controller)
๐ Boilerplate Key Highlights #
- ๐ข Feature-First Clean Architecture: Highly scalable and team-friendly structure.
- ๐ฆ Dependency Injection: Centralized, memory-efficient global bindings using GetX
fenix: truelazy instantiations. - ๐ฃ๏ธ Singleton Routing: Simplified route configurations and transitions in one centralized Singleton class.
- ๐ High-Performance Network Client: Custom
ApiClient(Dio Singleton) with automatic request logs, request headers, token injection, and structured error handling. - ๐ฑ Connectivity Service: Real-time internet connection observer dynamically checking and alerting connection status.
- ๐จ Curated Common UI Components: Customizable components like
CommonAppBar,CommonImage,CommonDatePicker,CommonMultiImagePicker,CommonSearchBar, and more.
๐ Run the Generated App #
After generating the app, simply run:
cd my_awesome_app
flutter run
๐ License #
This project is licensed under the MIT License. See the LICENSE file in the repository for details.