flutter_archx
A production-ready CLI tool to scaffold enterprise-grade Flutter projects with a scalable, clean architecture template.
Features
- ποΈ Enterprise Architecture β Clean Architecture with data, domain, and feature layers
- β‘ GetX Integration β State management, routing, and dependency injection out of the box
- π Dio Networking β Pre-configured HTTP client with interceptors and error handling
- π Secure Storage β FlutterSecureStorage and GetStorage wrappers ready to use
- π¨ Theme System β Complete theme configuration with colors, typography, and dimensions
- π¦ 8 Feature Modules β Authentication, Dashboard, Employees, Attendance, Payroll, Leave, Recruitment, Reports
- π§© Shared Components β Reusable widgets, dialogs, layouts, and components
- βοΈ Environment Config β Dev, Staging, and Production environment support with flavors
Installation
dart pub global activate flutter_archx
Usage
Create a new project
flutter-arch create my_awesome_app
With custom organization
flutter-arch create my_awesome_app --org com.mycompany
Available options
flutter-arch create --help
| Option | Description | Default |
|---|---|---|
--org |
Organization identifier | com.example |
--description |
Project description | (auto) |
--no-git |
Skip git initialization | false |
Generated Architecture
lib/
βββ main.dart
βββ app/
β βββ app.dart
β βββ routes/
β βββ bindings/
β βββ config/
β βββ theme/
βββ core/
β βββ constants/
β βββ enums/
β βββ errors/
β βββ exceptions/
β βββ extensions/
β βββ helpers/
β βββ utils/
β βββ validators/
β βββ network/
β βββ storage/
β βββ services/
βββ data/
β βββ models/
β βββ datasources/
β βββ repositories/
βββ domain/
β βββ entities/
β βββ repositories/
β βββ usecases/
βββ features/
β βββ authentication/
β βββ dashboard/
β βββ employees/
β βββ attendance/
β βββ payroll/
β βββ leave/
β βββ recruitment/
β βββ reports/
βββ shared/
βββ widgets/
βββ components/
βββ dialogs/
βββ layouts/
Architecture Overview
This CLI generates a project following Clean Architecture principles with GetX for state management:
Layers
- App β Application configuration, routing, theming, and global bindings
- Core β Framework-agnostic utilities, networking, storage, and services
- Data β Models, data sources (remote/local), and repository implementations
- Domain β Business entities, repository contracts, and use cases
- Features β Feature-specific modules with their own bindings, controllers, views, and widgets
- Shared β Reusable UI components shared across features
Requirements
- Dart SDK
>=3.5.0 - Flutter SDK installed and available in PATH
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
MIT License β see LICENSE for details.
Libraries
- flutter_archx
- flutter_archx β Enterprise Flutter Architecture CLI