A SOLID Clean Architecture foundation for learning to craft scalable Flutter apps.
I've found it increasingly frustrating to find a clean architecture sample app that is up to date with the latest Flutter best practices. Further, the quality of Flutter documentation is fantastic, but posts on StackOverflow and Medium are often out of date, don't provide a complete picture, or are simply bad coding practice.
This sample app is intended to be a tool for developers who want to learn how to craft scalable Flutter apps using SOLID clean architecture principles the right way. ;-)
Of course, many developers will have differing opinions on what the "right way" is. So more specifically, this sample app is my attempt to collect everything I've personally learned, read, tried, refactored, and implemented in Flutter in the same place. Then, I'll filter that through 15 years of software development experience and distill it into an opinionated sample app that will:
- Demonstrate actual general software best practices
- Provide an example of a directory structure to organize a complex Flutter app
- Provide an example of state management using the BLoC pattern in Flutter
- Adhere to Clean Architecture principles
- Serve as a Bootstrap for new Flutter apps
- Integrate many common Flutter packages
- BLoC
- Flutter Serializeable
- Equatable
- Copy With
- go_router
- GetIt
- firebase_auth
- firebase_core
- firebase_firestore
If you come across something I can improve or want to suggest a cleaner approach, or maybe something you'd like to see added in the future, please feel free to open an issue or submit a pull request.
This clean architecture sample app is a work in progress and will be updated to provide a concrete example of a real world app.
The following features are planned:
- Authentication (Firebase)
- User Management
- User Profile
- User Settings
- User Preferences
- User Roles
- User Permissions
- User Notifications
- Automaton Clean Architecture Reference
- Automated Build via GitHub Actions
- Deploy to GitHub Pages
- In Memory Storage
- Shared Preferences
- Local Storage (File System
- Local Storage (SQL Lite)
- Remote Storage (Firestore)
- Remote API REST calls
- Web Socket connections
- Camera access
- Barcode scanning
- QR Code scanning
- Mermaid Diagrams
- Intrinsic Animations
- State Management
- Futures
- Streams
- Remote Crashlytics
- Cute Automaton UI
- Cute Automaton Animations
- Cute Automaton Sounds
- Cute Automaton Voice
- Cute Automaton Emojis
- Cute Automaton State indicators
- Routing via GoRouter
- Dependency Injection via GetIt
- State Management via BLoC
- Equatable
- Copy With
- Themes
- Dark Mode
- Reusable/Common Custom Widgets
- What to do when you see 'has been given unbounded constraints' in Flutter
- What to do when you see 'A RenderFlex overflowed by N pixels on the right' in Flutter
- How to Design UIs that scale to different screen sizes
- A simple Flame game running on the Automaton's face
- Device sensor data
- Unit Testing
- Widget Testing
- Integration Testing
- Mocking
- Code Coverage
- Linter Rules and VeryGoodAnalysis Rules
- Capturing feedback from users
- Google Fonts
- Font Awesome
- Loading Assets
- Loading Assets from a different library