donuts 0.1.3
donuts: ^0.1.3 copied to clipboard
donuts.focus ui. focus domain modeling.
Focus domain modeling and UI.
- You can generate a layered architecture boilerplate for domain-driven design
- Once you have written the entity, you can generate the repository, factory, and application_service.
- The generated code will be extensible to suit your project
Motivation #
-
Domain-Driven Design is a Good Practice. But Domain-driven design has good point and boring stuff point.
-
Good Point
- Can be written directly from domain knowledge that is important to the business
- Code is easier to maintain etc.
-
Boring stuff Point
- Many boiler plates
- ex.
- repository
- factory
- application_service
- ex.
- Many boiler plates
-
The factory, repository, and application_service operate Entity. Then, if Entity can be defined, they can be generated.
Code Example #
define
// aggregate_root
generated code
// factory
// factory_impl
// repository
// repository_impl
// in_memory_repository_impl
// application_service
// list_state
// single_state
// list view
// detail view
// create modal
Generate list view router list #
generate GoRouter routes navigate to ListView
https://pub.dev/packages/annotation_indexer
TODO #
-
Make any class usable within an extended
part offile -
plan 1: Allow specifying imports in the @AggregatorRoot annotation
-
generate interface for method_to_swagger_yaml
-
Generate code using
riverpodandflutter_hooksconsidering dependencies -
Allow injecting initial in-memory data from outside
-
Performance Tuning
- ❌ Reduce the initial build time which takes more than 15 minutes