# flutter_clean_architecture_riverpod_template **Repository Path**: honley/flutter_clean_architecture_riverpod_template ## Basic Information - **Project Name**: flutter_clean_architecture_riverpod_template - **Description**: No description available - **Primary Language**: Dart - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-28 - **Last Updated**: 2025-09-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## π§ Overview This project adopts **Clean Architecture** with **modular feature-based organization** and **Riverpod** for scalable, testable, and reactive state management. It is implemented based on a real Figma UI design and documented API for realistic use-case simulation. - π¨ Figma Design: [Omar Appointment App UI](https://www.figma.com/design/WB4GtMqCEZqJtuaWXd2oYd/Omar---Appointment-App?node-id=157-8718) - π API Docs: [Appointment API (Postman)](https://documenter.getpostman.com/view/25727519/2s9YCBt9De#04261fee-8b05-42af-b3c7-9d213bd817fe) The app architecture separates the codebase into three primary layers: - **Data** - **Domain** - **Presentation** Each feature lives in its own module, promoting isolation, maintainability, and reusability. --- ## π Project Structure ### πΉ Core Layer (Shared Modules) The `core/` directory provides app-wide configurations, helpers, services, and reusable UI components. Includes: - **Base Classes**: `BaseRemoteDataSource`, `BaseLocalDataSource` - **Core Providers**: Shared instances (e.g., Dio, SharedPreferences, Hive, SecureStorage ,APi) managed via Riverpod - **Helpers**: `SharedPrefHelper`, `.env` config loading - **Routing**: `AppRouter`, route names (via `go_router`) - **Themes**: Color palette, text styles, assets, dimensions - **Utils**: `AppStrings`, constants, validators, extensions - **Widgets**: Custom form fields, dialogs, loaders, etc. --- ### πΉ Features Layer Each feature is structured into `data`, `domain`, and `presentation` sub-layers. **Example: `features/auth/`** #### π¦ `data/` Responsible for data handling: - **datasources/** - `local/`: `local_data_source.dart`, `local_data_source_impl.dart` - `remote/`: `remote_data_source.dart`, `remote_data_source_impl.dart` - **models/**: DTOs like `user_model.dart` - **mappers/**: Convert between DTOs and domain entities - **repositories/**: Implements domain repositories - **providers/**: Riverpod providers for datasources, mappers, etc. #### π¦ `domain/` Defines business logic: - **entities/**: Core domain models like `User` - **repositories/**: Abstract contracts - **usecases/**: Business logic (e.g. `LoginUseCase`) - **providers/**: Expose domain logic via Riverpod #### π¦ `presentation/` Handles UI and state: - **screens/**: UI screens (e.g., `login_screen.dart`) - **widgets/**: Reusable UI components - **providers/**: Riverpod providers managing UI state - **notifiers/providers/**: `StateNotifierProvider`, `AsyncNotifier`, etc.