A Flutter starter codebase built on Clean Architecture principles for maintainable, scalable, and flexible apps.
This repository is a reference codebase for structuring Flutter apps with Clean Architecture. Each feature is split into data, domain, and presentation layers, with Riverpod for dependency injection and state, auto_route for navigation, and Dio for networking. Working auth, posts, and users features show the pattern end to end.
- Feature-first Clean Architecture: data (DTOs, data sources, repositories), domain (entities, interfaces, use cases), and presentation (screens).
- Example features: login (auth), posts, and users.
- Riverpod providers for dependency injection and state management.
- Typed routing with auto_route code generation.
- Networking layer with Dio and HTTP client providers and a central API config.
| Area | Technology |
|---|---|
| Framework | Flutter, Dart 3 |
| State management | Riverpod |
| Navigation | auto_route |
| Networking | Dio, http |
| Fonts | Google Fonts |
- Flutter SDK (Dart 3.11 or newer)
git clone https://github.com/RithyBondeth/Flutter-CleanArchitecture-Codebase.git
cd Flutter-CleanArchitecture-Codebase
flutter pub get
dart run build_runner build --delete-conflicting-outputs
flutter runFlutter-CleanArchitecture-Codebase/
└── lib/
├── cores/
│ ├── config/ # API configuration
│ └── network/ # Dio and HTTP client providers
├── features/
│ ├── auth/ # data / domain / presentation / providers
│ ├── posts/
│ └── users/
├── routes/ # auto_route router
└── main.dart
Rithy Bondeth — Full Stack Developer & AI Engineer
Distributed under the MIT License. See LICENSE for details.