riverpod_simple_architecture
A opinionated riverpod simple architecture with built in features for production ready flutter apps.
Generated by [mason][1] 🧱
##📚 My Library Features:
✅ State Management - Riverpod: A powerful state management solution that includes extensions for caching, refreshing, debounce, cancel token, and an easyWhen extension for default loading and error widgets. 🔄🔀
✅ Routing - Auto Route: Auto Route provides automatic code generation for routing, making it easier to navigate between different screens or pages in your app. 🛣️🔄
✅ API Client - Dio: Dio is an HTTP client for making API requests. This library includes a fix for handling bad certificates, an error handler, and a time response interceptor. 🌐❌⏰
✅ UI Framework - velocity_x: velocity_x is a UI framework that simplifies and accelerates the development of user interfaces. It provides a wide range of widgets and utilities to build beautiful and responsive UIs. 💨🎨
✅ Theming with Persistence - flex_color_scheme: flex_color_scheme allows you to easily theme your app and persist the theme settings. It provides flexibility and customization options for creating visually appealing interfaces. 🎨💾
Check flex_color_scheme docs Check flex_color_scheme playground
✅ Alerting UIs - flash: flash is a library that helps you create appealing and informative alert messages and notifications within your app. It enhances the user experience by providing visually pleasing feedback. ⚡📢
✅ Database - Hive with Storage Provider: Hive is a lightweight and efficient NoSQL database solution. This library includes a storage provider for Hive, allowing you to persist data locally in your app. 🗄️💾
✅ Localization & Internationalization - l10n: This library provides tools and utilities for managing localization and internationalization in your app. It enables you to easily support multiple languages and customize the user experience based on the user's locale. 🌍🌐
✅ Default UIs - No Internet Widget, App Locale UI: Using the internet_connection_checker library, this feature provides default UI components for handling scenarios like no internet connection and app locale selection. 🌐🚫🌍
✅ Responsive UI - responsive_framework: responsive_framework helps you build responsive UIs that adapt to different screen sizes and orientations. It simplifies the process of creating layouts that look great on various devices. 📱💻🖥️
Check responsive framework docs
✅ Logging - talker_flutter: talker_flutter is a logging library that facilitates easy logging and debugging within your app. It helps you track and analyze app behavior, making development and troubleshooting more efficient. 🗣️🐛
Note: The library features you provided are described with emojis and colorful markdown for enhanced readability
Getting Started 🚀
Install using Mason
dart pub global activate mason_cli
Install brick from https://brickhub.dev/
mason add -g riverpod_simple_architecture
OR
Install brick from github
mason add -g riverpod_simple_architecture --git-url https://github.com/Shreemanarjun/river_bricks --git-path bricks/riverpod_simple_architecture
Upgrade to newer version
mason upgrade --global
Variables ✨
Variable | Description | Default | Type |
---|---|---|---|
project_name | Name of current project | string |
Make using (with prompt)
mason make riverpod_simple_architecture
OR (without prompt as an argument)
mason make riverpod_simple_architecture --project_name "Your Project Name"
Outputs 📦
📦lib
┣ 📂app
┃ ┣ 📂view
┃ ┃ ┗ 📜app.dart
┃ ┗ 📜app.dart
┣ 📂const
┃ ┣ 📜app_urls.dart
┃ ┗ 📜resource.dart
┣ 📂core
┃ ┣ 📂local_storage
┃ ┃ ┣ 📜app_storage.dart
┃ ┃ ┗ 📜app_storage_pod.dart
┃ ┣ 📂router
┃ ┃ ┣ 📜auto_route_observer.dart
┃ ┃ ┣ 📜router.dart
┃ ┃ ┣ 📜router.gr.dart
┃ ┃ ┗ 📜router_pod.dart
┃ ┗ 📂theme
┃ ┃ ┣ 📜app_theme.dart
┃ ┃ ┗ 📜theme_controller.dart
┣ 📂data
┃ ┗ 📂service
┣ 📂features
┃ ┣ 📂counter
┃ ┃ ┣ 📂controller
┃ ┃ ┃ ┣ 📂notifier
┃ ┃ ┃ ┃ ┗ 📜counter_notifier.dart
┃ ┃ ┃ ┗ 📜counter_state_pod.dart
┃ ┃ ┣ 📂view
┃ ┃ ┃ ┣ 📂widgets
┃ ┃ ┃ ┗ 📜counter_page.dart
┃ ┃ ┗ 📜counter.dart
┃ ┗ 📂theme_segmented_btn
┃ ┃ ┣ 📂controller
┃ ┃ ┃ ┗ 📜selection_theme_pod.dart
┃ ┃ ┗ 📂view
┃ ┃ ┃ ┗ 📜theme_segmented_btn.dart
┣ 📂l10n
┃ ┣ 📂arb
┃ ┃ ┣ 📜app_en.arb
┃ ┃ ┗ 📜app_es.arb
┃ ┗ 📜l10n.dart
┣ 📂shared
┃ ┣ 📂api_client
┃ ┃ ┗ 📂dio
┃ ┃ ┃ ┣ 📜bad_certificate_fixer.dart
┃ ┃ ┃ ┣ 📜default_api_error_handler.dart
┃ ┃ ┃ ┣ 📜default_api_interceptor.dart
┃ ┃ ┃ ┣ 📜default_time_response_interceptor.dart
┃ ┃ ┃ ┣ 📜dio_client_provider.dart
┃ ┃ ┃ ┗ 📜form_data_interceptor.dart
┃ ┣ 📂exception
┃ ┃ ┗ 📜base_exception.dart
┃ ┣ 📂helper
┃ ┃ ┗ 📜global_helper.dart
┃ ┣ 📂pods
┃ ┃ ┣ 📜internet_checker_pod.dart
┃ ┃ ┗ 📜locale_pod.dart
┃ ┣ 📂riverpod_ext
┃ ┃ ┣ 📜asynvalue_easy_when.dart
┃ ┃ ┣ 📜cache_extensions.dart
┃ ┃ ┣ 📜cancel_extensions.dart
┃ ┃ ┣ 📜riverpod_extensions.dart
┃ ┃ ┗ 📜riverpod_observer.dart
┃ ┗ 📂widget
┃ ┃ ┣ 📜app_locale_popup.dart
┃ ┃ ┣ 📜no_internet_widget.dart
┃ ┃ ┗ 📜responsive_wrapper.dart
┣ 📜bootstrap.dart
┣ 📜init.dart
┣ 📜main.dart
┣ 📜main_development.dart
┣ 📜main_production.dart
┗ 📜main_staging.dart
📦test
┣ 📂app
┃ ┗ 📂view
┃ ┃ ┗ 📜app_test.dart
┣ 📂core
┃ ┣ 📂storage
┃ ┃ ┗ 📜app_storage_test.dart
┃ ┗ 📂theme
┃ ┃ ┗ 📜theme_controller_pod_test.dart
┣ 📂features
┃ ┣ 📂counter
┃ ┃ ┣ 📂pod
┃ ┃ ┃ ┗ 📜counter_pod_test.dart
┃ ┃ ┗ 📂view
┃ ┃ ┃ ┗ 📜counter_page_test.dart
┃ ┗ 📂theme_segment_btn
┃ ┃ ┗ 📂view
┃ ┃ ┃ ┗ 📜theme_segment_btn_test.dart
┣ 📂helpers
┃ ┣ 📜helpers.dart
┃ ┗ 📜pump_app.dart
┣ 📂shared
┃ ┣ 📂api_client
┃ ┃ ┗ 📂dio
┃ ┃ ┃ ┗ 📜dio_client_provider_test.dart
┃ ┣ 📂exception
┃ ┃ ┗ 📜exception_test.dart
┃ ┣ 📂pods
┃ ┃ ┣ 📜internet_checker_pod_test.dart
┃ ┃ ┗ 📜locale_pod_test.dart
┃ ┣ 📂riverpod_ext
┃ ┃ ┣ 📜asynvalue_easywhen_test.dart
┃ ┃ ┗ 📜cache_extension_test.dart
┃ ┗ 📂widgets
┃ ┃ ┣ 📜app_locale_popup_test.dart
┃ ┃ ┗ 📜no_interenet_widget_test.dart
┣ 📜init_test.dart
┗ 📜widget_test.dart
License 🍀
MIT License
Copyright (c) 2023 Shreeman Arjun Sahu
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.