flutter_archx

pub package License: MIT

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