Are There Any Ash Framework Starter or Boilerplate Projects?

That’s a cool idea :+1: mix ash.gen.calculation Name.Of.Calc --resource MyApp.Foo.Bar could also add it to the resource module. I think you might be surprised at just how actually doable that is.

For an adventurous soul:

  • mix igniter.gen.task ash.gen.calculation
  • update the docs of the task
  • modify the positional and schema keys to have the described options
  • use Igniter.Project.Module.create_module to create the module
  • go to Ash.Resource.Igniter and copy the add_new_attribute logic into a add_new_calculation function and adjust it accordingly
  • call that new function from the igniter task if the resource flag is set.

Alternatively, there are plans to make mix ash.gen.resource merge into existing resources, so we could add --calculation foo:type:Module to that task, and if the module doesn’t exist it is created as a shell (by delegating to mix ash.gen.calculation) meaning that the calculation gen task doesn’t know about resources it just creates the shell of a calculation.