makdumanarchitect 1.0.2 copy "makdumanarchitect: ^1.0.2" to clipboard
makdumanarchitect: ^1.0.2 copied to clipboard

You can create a clean structure and benefit from its features

MakdumanArchitect #

A powerful Flutter package that implements Clean Architecture principles, providing a robust and scalable project structure with essential features out of the box.

Pub Version License: MIT

Features πŸš€ #

  • βœ… Clean Architecture folder structure
  • βœ… Pre-configured state management with Provider
  • βœ… Network handling with Dio
  • βœ… Local storage with Hive
  • βœ… Internet connectivity management
  • βœ… Firebase integration (Remote Config, Analytics, Crashlytics)
  • βœ… Push notifications (Firebase Messaging & Awesome Notifications)
  • βœ… Internationalization support with easy_localization
  • βœ… In-app review integration
  • βœ… Responsive design utilities with flutter_screenutil
  • βœ… SVG support with flutter_svg
  • βœ… Loading indicators with flutter_easyloading

Installation πŸ“¦ #

Add makdumanarchitect to your pubspec.yaml:

dev_dependencies:
  makdumanarchitect: ^1.0.0

Run:

flutter pub get

Quick Start πŸƒβ€β™‚οΈ #

Generate the project structure:

flutter pub run makdumanarchitect:main

Project Structure πŸ“ #

The package creates a well-organized project structure following Clean Architecture principles:

β”‚   β”œβ”€β”€ scripts
β”‚   β”‚   └── build_sh.dart (<1 KB)
β”‚   └── src
β”‚       β”œβ”€β”€ core
β”‚       β”‚   β”œβ”€β”€ base
β”‚       β”‚   β”‚   β”œβ”€β”€ model
β”‚       β”‚   β”‚   β”‚   └── base_model.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ view
β”‚       β”‚   β”‚   β”‚   └── base_view.dart (1 KB)
β”‚       β”‚   β”‚   └── viewModel
β”‚       β”‚   β”‚       └── base_view_model.dart (<1 KB)
β”‚       β”‚   β”œβ”€β”€ constants
β”‚       β”‚   β”‚   β”œβ”€β”€ app
β”‚       β”‚   β”‚   β”‚   └── app_constants.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ colors
β”‚       β”‚   β”‚   β”‚   └── color_constants.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ endPoints
β”‚       β”‚   β”‚   β”‚   └── end_point_constants.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ enums
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ app_themes_enums.dart (<1 KB)
β”‚       β”‚   β”‚   β”‚   β”œβ”€β”€ http_types_enums.dart (<1 KB)
β”‚       β”‚   β”‚   β”‚   └── network_results_enums.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ local
β”‚       β”‚   β”‚   β”‚   └── local_constants.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ navigation
β”‚       β”‚   β”‚   β”‚   └── navigation_constants.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ notification
β”‚       β”‚   β”‚   β”‚   └── notification_constants.dart (<1 KB)
β”‚       β”‚   β”‚   β”œβ”€β”€ textStyles
β”‚       β”‚   β”‚   β”‚   └── text_style_constants.dart (3 KB)
β”‚       β”‚   β”‚   └── theme
β”‚       β”‚   β”‚       └── theme_constants.dart (<1 KB)
β”‚       β”‚   β”œβ”€β”€ exports
β”‚       β”‚   β”‚   └── constants_exports.dart (<1 KB)
β”‚       β”‚   β”œβ”€β”€ extensions
β”‚       β”‚   β”‚   β”œβ”€β”€ context_extension.dart (2 KB)
β”‚       β”‚   β”‚   └── sized_box_extension.dart (<1 KB)
β”‚       β”‚   β”œβ”€β”€ mixins
β”‚       β”‚   β”‚   β”œβ”€β”€ device_orientation.dart (<1 KB)
β”‚       β”‚   β”‚   └── show_bar.dart (1 KB)
β”‚       β”‚   └── services
β”‚       β”‚       β”œβ”€β”€ analytics
β”‚       β”‚       β”‚   └── analytics_service.dart (2 KB)
β”‚       β”‚       β”œβ”€β”€ local
β”‚       β”‚       β”‚   └── local_service.dart (1 KB)
β”‚       β”‚       β”œβ”€β”€ navigation
β”‚       β”‚       β”‚   β”œβ”€β”€ navigation_route.dart (<1 KB)
β”‚       β”‚       β”‚   └── navigation_service.dart (1 KB)
β”‚       β”‚       β”œβ”€β”€ network
β”‚       β”‚       β”‚   β”œβ”€β”€ network_exception.dart (2 KB)
β”‚       β”‚       β”‚   β”œβ”€β”€ network_service.dart (3 KB)
β”‚       β”‚       β”‚   └── response_parser.dart (<1 KB)
β”‚       β”‚       β”œβ”€β”€ purchase
β”‚       β”‚       β”‚   └── purchase_manager.dart (5 KB)
β”‚       β”‚       β”œβ”€β”€ remote_config
β”‚       β”‚       β”‚   └── remote_config_service.dart (1 KB)
β”‚       β”‚       β”œβ”€β”€ size
β”‚       β”‚       β”‚   └── size_service.dart (<1 KB)
β”‚       β”‚       └── theme
β”‚       β”‚           └── theme_service.dart (<1 KB)
β”‚       └── pages
β”‚           └── home
β”‚               β”œβ”€β”€ model
β”‚               β”‚   β”œβ”€β”€ post_model.dart (<1 KB)
β”‚               β”‚   └── post_model.g.dart (<1 KB)
β”‚               β”œβ”€β”€ view
β”‚               β”‚   └── home_view.dart (1 KB)
β”‚               β”œβ”€β”€ viewModel
β”‚               β”‚   └── home_view_model.dart (1 KB)
β”‚               └── widget
β”‚                   └── one_item.dart (<1 KB)
β”œβ”€β”€ pubspec.yaml (2 KB)
└── scripts
    └── build.sh (<1 KB)

Total compressed archive size: 71 KB

Core Features Breakdown πŸ›  #

Base Classes

  • BaseModel - Foundation for all models with JSON serialization
  • BaseView - Template for all views with lifecycle management
  • BaseViewModel - Base for all ViewModels with state management

Services

  • Network Service - Dio-based HTTP client with interceptors
  • Local Storage - Hive implementation for persistent storage
  • Navigation Service - Clean navigation management
  • Analytics Service - Firebase Analytics integration
  • Remote Config - Firebase Remote Config setup
  • Purchase Manager - In-app purchase handling
  • Notification Service - Push notification management

Utils

  • Context extensions for responsive design
  • SizedBox extensions for cleaner spacing
  • Device orientation utilities
  • Snackbar and dialog mixins

Usage Examples πŸ’‘ #

Creating a New Page #

class HomeView extends BaseView<HomeViewModel> {
  @override
  Widget build(BuildContext context) {
    return BuilderWidget<HomeViewModel>(
      viewModel: viewModel,
      builder: () => Scaffold(
        // Your widget tree
      ),
    );
  }
}

Using Network Service #

class ApiService {
  Future<ResponseModel> fetchData() async {
    return await NetworkService.instance.get<ResponseModel>(
      EndPointConstants.endpoint,
      model: ResponseModel(),
    );
  }
}

Local Storage #

await LocalService.instance.setValue('key', 'value');
final value = await LocalService.instance.getValue('key');

Contributing 🀝 #

Contributions are welcome! Please feel free to submit a Pull Request.

License πŸ“„ #

This project is licensed under the MIT License - see the LICENSE file for details.

Author ✍️ #

Mehmet Akduman - GitHub


If you find this package helpful, please give it a ⭐️ on GitHub!