Designed for Flutter development, this starter app incorporates Clean Architecture and Domain-Driven Design while offering 100% test coverage. With features like AI-ready architecture, type-safe routing, and adaptive UI, it provides a solid foundation for enterprise applications, ensuring both security and scalability.
Flutter Enterprise Starter
A comprehensive and AI-ready enterprise-grade Flutter starter application utilizing Clean Architecture, Domain-Driven Design (DDD), and Hexagonal Architecture. This project boasts 100% test coverage, ensuring robust and reliable application development.
Key Features
| Feature | Description |
|---|---|
| π€ AI-Ready Architecture | Includes 23 architecture rules that facilitate AI-assisted development. |
| π§ͺ 100% Test Coverage | Thorough tests implemented across all layers of the application. |
| ποΈ CQRS Pattern | Distinct separation between Commands (for writing data) and Queries (for reading data). |
| π Type-Safe Routing | Implemented using go_router_builder, ensuring compile-time route safety. |
| βοΈ Environment Configuration | Employed --dart-define-from-file for secure and easy configuration management. |
| π§± Mason Bricks | Code generators create consistent feature scaffolding. |
| π± Adaptive UI | Material 3 layouts accommodating a 5-class breakpoint system. |
| π Token Refresh | Automatic handling of 401 responses with thread-safe token refresh. |
| π‘οΈ Security | Features secure storage, certificate pinning, and code obfuscation to safeguard data. |
| π Feature-First i18n | Localization handled per feature with ARB files using gen_l10n. |
| βΏ Accessibility | Compliance with WCAG 2.1 standards, incorporating semantic labels for improved user experience. |
| π Structured Logging | Implemented IAppLogger that supports environment-specific output. |
Architecture Overview
This project adheres to Hexagonal Architecture (Ports & Adapters) aligned with DDD tactical patterns. Hereβs an overview:
ββββββββββββββββββββββββββββββββ
β PRESENTATION β
β βββββββββββββββ ββββββββββββ β
β β Pages β β Widgets β β
β β (Views) β β (Reusable)β β
β βββββββββββββββ ββββββββββββ β
ββββββββββββββββββββββββββββββββ€
β APPLICATION β
β βββββββββββββββ ββββββββββββ β
β β Commands β β Queries β β
β β (Write Ops) β β (Read Ops)β β
β βββββββββββββββ ββββββββββββ β
ββββββββββββββββββββββββββββββββ€
β DOMAIN β
β βββββββββββββββ ββββββββββββ β
β β Entities β βValue Objectsββ
β β (Identity) β β(Validation) ββ
β βββββββββββββββ ββββββββββββ β
ββββββββββββββββββββββββββββββββ
Testing
This project ensures 100% test coverage across all layers utilizing various testing types such as Unit, Widget, BLoC, and Integration tests. Employing Very Good CLI, it provides effective coverage reporting capabilities. Hereβs how to run tests:
very_good test --coverage
Testing Types
| Type | Location |
|---|---|
| Unit | test/ |
| Widget | test/ |
| BLoC | test/ |
| Integration | integration_test/ |
Getting Started
To set up the Flutter Enterprise Starter:
# 1. Clone the repository
git clone https://github.com/deveminsahin/starter_app.git
cd starter_app
# 2. Install dependencies
very_good packages get
# 3. Generate code
dart run build_runner build --delete-conflicting-outputs
# 4. Run the application
flutter run --flavor development --target lib/main_development.dart --dart-define-from-file=config/development.json
Environment Configuration
Implementing a secure, type-safe environment configuration strategy is essential. The following configuration example is utilized:
config/
βββ development.json.example # Example file for development configuration
βββ staging.json.example # Example file for staging configuration
βββ production.json.example # Example file for production configuration
By including architecture rules and features tailored for enterprise applications, this starter app fosters efficient and effective development practices for Flutter applications. Explore the documentation for further insights and project initialization details.
No comments yet.
Sign in to be the first to comment.