@@ -11,220 +11,102 @@ A production-ready Flutter project template implementing Clean Architecture prin
1111 <img src =" https://flutter.dev/assets/images/shared/brand/flutter/logo/flutter-lockup.png " alt =" Flutter " height =" 100 " />
1212</p >
1313
14- ## 🌟 Features
15-
16- - ** Clean Architecture** — Separation of concerns with domain, data, and presentation layers
17- - ** Riverpod State Management** — Powerful and testable state management solution
18- - ** Multi-language Support** — Full internationalization with easy language switching and localized assets
19- - ** Locale-Aware Navigation** — Router integration with locale-based navigation support
20- - ** Analytics Integration** — Flexible analytics system for tracking user behavior and app performance
21- - ** Push Notifications** — Complete notification handling with deep linking and background processing
22- - ** Biometric Authentication** — Secure fingerprint and face recognition support
23- - ** Feature Flags** — A/B testing and staged rollouts with remote configuration
24- - ** Advanced Image Handling** — Lazy loading, caching, SVG support, image effects, and animated placeholders
25- - ** Structured Logging** — Comprehensive logging system with levels, tags, and performance tracking
26- - ** Advanced Caching System** — Memory and disk caching with TTL, encryption, and type-safe APIs
27- - ** Dynamic Theming** — Customizable themes with light/dark mode support and persistence
28- - ** Comprehensive Utilities** — Rich set of extensions for DateTime, BuildContext, Widget, String, and more
29- - ** Error Handling** — Consistent error handling with custom Failure classes
30- - ** Dependency Injection** — Clean dependency management with Riverpod
31- - ** Accessibility** — Complete accessibility support with screen reader, high contrast, and dynamic text sizes
32- - ** Offline-First Architecture** — Keep working offline with queued changes and smart synchronization
33- - ** App Update Flow** — Force updates, in-app updates, and update notifications
34- - ** App Review System** — Smart rating prompts and feedback collection
35- - ** CI/CD Integration** — GitHub Actions workflows and Fastlane scripts for automated delivery
36- - ** Code Generation Tools** — Feature generator for rapid development
37- - ** Project Renaming Tools** — Easy app and package renaming across all platforms
38- - ** Example Implementations** — Ready-to-use screens demonstrating the architecture
39- - ** Extensive Documentation** — Detailed guides for architecture, utilities, and extensions
40-
41- ## 📖 Documentation
42-
43- Comprehensive documentation is available in the ` /docs ` folder:
44-
45- - [ Architecture Guide] ( docs/ARCHITECTURE_GUIDE.md ) - Detailed explanation of the project structure and principles
46- - [ Utilities Guide] ( docs/UTILITIES_GUIDE.md ) - How to use the utility extensions and helpers
47- - [ Localization Guide] ( docs/LOCALIZATION_GUIDE.md ) - Complete guide to multi-language support
48- - [ Image Handling Guide] ( docs/IMAGE_HANDLING_GUIDE.md ) - Advanced guide for image loading, processing, and effects
49- - [ Biometric Auth Guide] ( docs/BIOMETRIC_AUTH_GUIDE.md ) - Implementing secure biometric authentication
50- - [ Feature Flags Guide] ( docs/FEATURE_FLAGS_GUIDE.md ) - Using feature flags and remote configuration
51- - [ Analytics Guide] ( docs/ANALYTICS_GUIDE.md ) - Tracking and analyzing user behavior
52- - [ Accessibility Guide] ( docs/ACCESSIBILITY_GUIDE.md ) - Making your app accessible to all users
53- - [ Offline Architecture Guide] ( docs/OFFLINE_ARCHITECTURE_GUIDE.md ) - Building offline-first apps
54- - [ CI/CD Guide] ( docs/CICD_GUIDE.md ) - Setting up continuous integration and delivery
55- - [ Interactive Documentation] ( docs/index.html ) - Browser-based interactive documentation with examples
56- - [ DateTime Extensions Guide] ( docs/datetime_extensions.html ) - Complete reference for date and time utilities
57- - [ Advanced Features Summary] ( docs/ADVANCED_FEATURES_SUMMARY.md ) - Overview of all advanced features
14+ ## 🌟 Key Features
15+
16+ - ** Clean Architecture** — Domain, data, and presentation layers separation
17+ - ** Riverpod State Management** — Powerful, testable state management
18+ - ** Multi-language Support** — Full internationalization with language switching
19+ - ** Advanced Caching** — Memory and disk caching with type-safety
20+ - ** Biometric Authentication** — Secure fingerprint and face recognition
21+ - ** Feature Flags** — A/B testing and staged rollouts
22+ - ** Analytics Integration** — Flexible event tracking
23+ - ** Push Notifications** — Deep linking and background handling
24+ - ** Accessibility** — Screen reader and dynamic text support
25+ - ** Offline-First** — Work seamlessly with or without connection
26+ - ** CI/CD Ready** — Automated workflows with GitHub Actions
27+
28+ [ See All Features] ( docs/FEATURES.md )
29+
30+ ## � Documentation
31+
32+ - [ Architecture Guide] ( https://ssoad.github.io/flutter_riverpod_clean_architecture/architecture.html ) - Project structure and principles
33+ - [ Utility Tools] ( docs/TOOLS.md ) - CLI tools for development
34+ - [ Feature Documentation] ( docs/FEATURES.md ) - Core features explained
35+ - [ Code Examples] ( docs/EXAMPLES.md ) - Usage examples
36+ - [ Online Documentation] ( https://ssoad.github.io/flutter_riverpod_clean_architecture/ ) - Complete reference
5837
5938## 🏗️ Project Structure
6039
61- The project follows a feature-first organization with a core module for shared functionality:
62-
6340``` plaintext
6441lib/
65- ├── core/ # Core functionality used across features
66- │ ├── cli/ # Command-line utilities
67- │ ├── constants/ # App-wide constants
68- │ ├── docs/ # Documentation helpers
69- │ ├── error/ # Error handling
70- │ ├── generators/ # Code generation helpers
71- │ ├── localization/ # Internationalization
72- │ ├── network/ # Network services
73- │ ├── providers/ # Core providers
74- │ ├── router/ # Routing with locale support
75- │ ├── storage/ # Local storage & caching
76- │ ├── theme/ # Theming
77- │ ├── ui/ # Shared UI components
78- │ └── utils/ # Utility functions and extensions
79- ├── examples/ # Example implementations
80- │ ├── cache_example.dart
81- │ ├── language_selector.dart
82- │ ├── localization_demo.dart
83- │ ├── localization_assets_demo.dart
84- │ └── theme_showcase.dart
85- ├── features/ # Feature modules
86- │ ├── auth/ # Authentication feature
87- │ ├── home/ # Home screen feature
88- │ ├── settings/ # App settings feature
89- │ └── ui_showcase/ # UI component showcase
90- ├── gen/ # Generated code
91- ├── l10n/ # Localization files
92- │ └── arb/ # ARB translation files for multiple languages
93- └── main.dart # App entry point
94- ```
95-
96- Each feature follows the Clean Architecture pattern with three layers:
97-
98- ``` plaintext
99- feature/
100- ├── data/ # Data layer
101- │ ├── datasources/ # Remote and local data sources
102- │ ├── models/ # Data models
103- │ └── repositories/ # Repository implementations
104- ├── domain/ # Domain layer
105- │ ├── entities/ # Business objects
106- │ ├── repositories/ # Repository interfaces
107- │ └── usecases/ # Business logic
108- └── presentation/ # Presentation layer
109- ├── providers/ # State management
110- ├── screens/ # UI screens
111- └── widgets/ # UI components
42+ ├── core/ # Core shared functionality
43+ ├── features/ # Feature modules
44+ │ └── feature_name/ # Individual feature
45+ │ ├── data/ # Data layer (repositories, sources)
46+ │ ├── domain/ # Domain layer (entities, use cases)
47+ │ └── presentation/ # UI layer (screens, providers)
48+ ├── examples/ # Example implementations
49+ └── main.dart # Application entry point
11250```
11351
114- ## 🚀 Getting Started
115-
116- ### Prerequisites
117-
118- - Flutter SDK (version 3.7.0 or higher)
119- - Dart SDK (version 3.0.0 or higher)
120- - An IDE with Flutter support (VS Code, Android Studio, or IntelliJ)
121-
122- ### Installation
123-
124- 1 . Clone the repository:
52+ [ Full Architecture Overview] ( docs/ARCHITECTURE.md )
12553
126- ``` bash
127- git clone https://github.com/yourusername/flutter_riverpod_clean_architecture.git
128- ```
54+ ## 🚀 Quick Start
12955
130- 2 . Navigate to the project directory:
131-
132- ``` bash
133- cd flutter_riverpod_clean_architecture
134- ```
135-
136- 3 . Install dependencies:
137-
138- ``` bash
139- flutter pub get
140- ```
141-
142- 4 . Run the app:
143-
144- ``` bash
145- flutter run
146- ```
147-
148- ## 🛠️ Utility Scripts
149-
150- The project includes several utility scripts that help streamline development:
56+ ``` bash
57+ # Clone the repository
58+ git clone https://github.com/ssoad/flutter_riverpod_clean_architecture.git
15159
152- ### App Renaming
60+ # Navigate to the project directory
61+ cd flutter_riverpod_clean_architecture
15362
154- Easily rebrand your app across all platforms with a single command:
63+ # Install dependencies
64+ flutter pub get
15565
156- ``` bash
157- ./rename_app.sh --app-name " Your App Name " --package-name com.yourcompany.appname
66+ # Run the app
67+ flutter run
15868```
15969
160- This script updates:
161-
162- - App display name in Android, iOS, macOS, Windows, Linux, and Web
163- - Package/bundle identifiers in all platforms
164- - File structures and import references
165- - Build configurations for all supported platforms
70+ [ Detailed Getting Started Guide] ( docs/GETTING_STARTED.md )
16671
167- ### Language Generation
72+ ## 🛠️ Development Tools
16873
169- Add new languages or update translations with the localization helper :
74+ The template includes several utility scripts to streamline development :
17075
171- ``` bash
172- ./generate_language.sh --add fr,es,de # Add French, Spanish, and German
173- ./generate_language.sh --sync # Synchronize all ARB files with the base English file
174- ./generate_language.sh --gen # Generate Dart code from ARB files
175- ```
76+ - ** App Renaming** — Update app name and package ids across platforms
77+ - ** Feature Generator** — Scaffold new features with clean architecture
78+ - ** Language Generator** — Add and manage translations
79+ - ** Test Generator** — Create test scaffolds for features
17680
177- ### Feature Generation
81+ [ Development Tools Documentation ] ( docs/TOOLS.md )
17882
179- Quickly scaffold new features with all the necessary files:
83+ ## 🧪 Testing
18084
18185``` bash
182- ./create_feature.sh feature_name # Create a new feature structure
183- ```
184-
185- ## 📝 Core Features
186-
187- ### Analytics Integration
86+ # Run all tests
87+ flutter test
18888
189- Track user interactions and app performance with a flexible analytics system:
89+ # Run tests for a specific feature
90+ flutter test test/features/auth
19091
191- ``` dart
192- // Access analytics
193- final analytics = ref.watch(analyticsProvider);
92+ # Generate coverage report
93+ flutter test --coverage && genhtml coverage/lcov.info -o coverage/html
94+ ```
19495
195- // Log screen views
196- analytics.logScreenView('HomeScreen', parameters: {'referrer': 'deeplink'});
96+ ## 🤝 Contributing
19797
198- // Log user actions
199- analytics.logUserAction(
200- action: 'button_tap',
201- category: 'engagement',
202- label: 'sign_up_button',
203- );
98+ Contributions are welcome! Please read our [ Contributing Guidelines] ( docs/CONTRIBUTING.md ) for more information.
20499
205- // Track errors
206- analytics.logError(
207- errorType: 'network_error',
208- message: 'Failed to fetch user data',
209- isFatal: false,
210- );
100+ ## 📄 License
211101
212- // Measure performance
213- analytics.logPerformance(
214- name: 'image_processing',
215- value: 340.5,
216- unit: 'ms',
217- );
102+ This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
218103
219- // Use automatic screen tracking
220- return AnalyticsScreenView(
221- screenName: 'ProductDetailsScreen',
222- parameters: {'product_id': product.id},
223- child: Scaffold(/* ... */),
224- );
225- ```
104+ ## 📚 Resources
226105
227- ### Push Notifications
106+ - [ Flutter Documentation] ( https://docs.flutter.dev/ )
107+ - [ Riverpod Documentation] ( https://riverpod.dev/ )
108+ - [ Clean Architecture Guide] ( https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html )
109+ - [ Effective Dart Style Guide] ( https://dart.dev/guides/language/effective-dart )
228110
229111Complete notification handling with deep linking and background processing:
230112
@@ -532,73 +414,22 @@ context.goWithLocale('/products', const Locale('es'));
532414final path = LocaleAwareRouter.getLocalizedPath('/settings');
533415```
534416
535- ## 🧪 Testing
536417
537- ``` bash
538- # Run all tests
539- flutter test
540-
541- # Run tests for a specific feature
542- flutter test test/features/auth
543-
544- # Generate coverage report
545- flutter test --coverage && genhtml coverage/lcov.info -o coverage/html
546- ```
547-
548- The project follows a comprehensive testing strategy:
549-
550- - Unit tests for business logic and utilities
551- - Widget tests for UI components
552- - Integration tests for feature workflows
553- - Golden tests for visual regression
554418
555419## 🤝 Contributing
556420
557- Contributions are welcome! Please feel free to submit a Pull Request.
558-
559- 1 . Fork the repository
421+ Contributions are welcome! Please read our [ Contributing Guidelines] ( docs/CONTRIBUTING.md ) for more information.
560422
561- 2 . Create your feature branch (` git checkout -b feature/amazing-feature ` )
562-
563- 3 . Commit your changes (` git commit -m 'Add some amazing feature' ` )
564-
565- 4 . Push to the branch (` git push origin feature/amazing-feature ` )
423+ ## 📄 License
566424
567- 5 . Open a Pull Request
425+ This project is licensed under the MIT License - see the [ LICENSE ] ( LICENSE ) file for details.
568426
569- ## 📄 License
427+ ## � Resources
570428
571- This project is licensed under the MIT License - see the LICENSE file for details.
572-
573- ## 🔍 Core Modules
574-
575- - ** Analytics** : Comprehensive event tracking with privacy controls
576- - ** Authentication** : Secure biometric authentication with session management
577- - ** Feature Flags** : Runtime feature toggling with A/B testing support
578- - ** Images** : Advanced image handling with processing, caching, SVG support, visual effects, and animated placeholders
579- - ** Localization** : Multi-language support with context extensions and asset localization
580- - ** Logging** : Structured logging with levels, tags, and performance tracking
581- - ** Notifications** : Complete push notification system with deep linking
582- - ** Error Handling** : Custom Failure class hierarchy for consistent error handling
583- - ** Network** : Type-safe API client with automatic error handling and retry mechanisms
584- - ** Storage** : Secure storage for sensitive data with encryption support
585- - ** Router** : Go Router integration with locale-aware navigation
586- - ** Constants** : App-wide constants for consistent configuration
587- - ** Providers** : Core providers for app-wide state management
588- - ** UI Components** : Reusable widgets that follow the app's design system
589-
590- ### Utility Extensions
591-
592- - ** BuildContext Extensions** : Easy access to theme, localization, navigation, and screen properties
593- - ** DateTime Extensions** : Formatting, comparison, manipulation, and human-readable representations
594- - ** String Extensions** : Validation, formatting, and transformation utilities
595- - ** Widget Extensions** : Padding, margin, gesture, and conditional rendering helpers
596- - ** Iterable Extensions** : Collection manipulation and transformation utilities
597-
598- ### Development Tools
599-
600- - ** App Renaming** : Cross-platform app and package name renaming script
601- - ** Localization Management** : Tools for adding and synchronizing translations
429+ - [ Flutter Documentation] ( https://docs.flutter.dev/ )
430+ - [ Riverpod Documentation] ( https://riverpod.dev/ )
431+ - [ Clean Architecture Guide] ( https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html )
432+ - [ Effective Dart Style Guide] ( https://dart.dev/guides/language/effective-dart )
602433- ** Feature Generation** : Scaffold new features with clean architecture structure
603434- ** Linting** : Custom lint rules for code quality
604435- ** Documentation** : Comprehensive guides and examples
0 commit comments