Ash Framework

The Ash Framework’s official site, ash-hq.org, proclaims, "Model your domain, derive the rest." While this statement resonates once you’re familiar with Ash, it might not immediately clarify the framework’s essence for newcomers.

Believe me, investing time in understanding Ash is worthwhile. My background is rooted in Ruby on Rails, and I transitioned to Phoenix for its speed and scalability. However, Ash elevates the development process to an other level.

This documentation covers the current Ash 3.x line (3.24+ at the time of writing). Ash 3.x is a significant evolution over 2.x: resources now live inside domains, you register actions explicitly, and the Ash.Api concept has been renamed to Ash.Domain. If you see a 2.x tutorial online, translate it in your head before copy-pasting. For example, code_interface do define_for App.Shop end in the resource is now a define :name, action: :create line on the domain, and App.Shop.Product.create!(attrs) has become App.Shop.create_product!(attrs).

Like the Phoenix Framework the Ash Framework has no shortage of online documentation. But most of it is not beginner friendly and very often a mystery in itself. This book and the @elixir-phoenix-ash YouTube channel is my endeavor to bridge this knowledge gap.

If a section doesn’t resonate with you, skip it. You can circle back later if needed. I recommend reading the book in order (start with resources), but it’s not required.

For feedback or inquiries about training (both onsite and remote), please reach out to me at sw@wintermeyer-consulting.de.

For official support, visit the Ash Framework community on https://elixirforum.com. The community is incredibly welcoming, so don’t hesitate to pose any questions you might have. See you there!

Getting Started

Igniter is the recommended way to get started with Ash. It provides a powerful code generator that handles all the setup and configuration for you, so you can focus on building your application rather than configuring dependencies.

To create a new Ash application, first install the Igniter archive:

$ mix archive.install hex igniter_new

Then create your application with Ash pre-installed:

$ mix igniter.new my_app --install ash

For a Phoenix application with Ash and PostgreSQL support:

$ mix igniter.new my_app --with phx.new --install ash,ash_postgres

You can also use the interactive web installer at https://ash-hq.org/#get-started to create a custom setup command tailored to your needs.

For more details and alternative approaches, see our Ash Setup Guide.