donuts 0.1.5 copy "donuts: ^0.1.5" to clipboard
donuts: ^0.1.5 copied to clipboard

donuts.focus ui. focus domain modeling.

English | 日本語

Focus on 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 points and boring stuff points.

  • 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.for example repository, factory, and application service
  • 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

detail
// repository

// 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 of file

  • plan 1: Allow the specification of imports in the @AggregatorRoot annotation

  • generate interface for method_to_swagger_yaml

  • Generate code using riverpod and flutter_hooks considering dependencies

  • Allow injecting initial in-memory data from outside

  • Optimize performance

    • ❌ Reduce the initial build time which takes more than 15 minutes