PitchHut logo
starter_app
An AI-ready enterprise-grade starter app for Flutter developers.
Pitch

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.

Description

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

FeatureDescription
πŸ€– AI-Ready ArchitectureIncludes 23 architecture rules that facilitate AI-assisted development.
πŸ§ͺ 100% Test CoverageThorough tests implemented across all layers of the application.
πŸ—οΈ CQRS PatternDistinct separation between Commands (for writing data) and Queries (for reading data).
πŸ” Type-Safe RoutingImplemented using go_router_builder, ensuring compile-time route safety.
βš™οΈ Environment ConfigurationEmployed --dart-define-from-file for secure and easy configuration management.
🧱 Mason BricksCode generators create consistent feature scaffolding.
πŸ“± Adaptive UIMaterial 3 layouts accommodating a 5-class breakpoint system.
πŸ”„ Token RefreshAutomatic handling of 401 responses with thread-safe token refresh.
πŸ›‘οΈ SecurityFeatures secure storage, certificate pinning, and code obfuscation to safeguard data.
🌐 Feature-First i18nLocalization handled per feature with ARB files using gen_l10n.
β™Ώ AccessibilityCompliance with WCAG 2.1 standards, incorporating semantic labels for improved user experience.
πŸ“Š Structured LoggingImplemented 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

TypeLocation
Unittest/
Widgettest/
BLoCtest/
Integrationintegration_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.

0 comments

No comments yet.

Sign in to be the first to comment.