A demo project exploring Ash Framework actions through functional programming concepts.
See the blog post Ash Framework: A Closer Look at Actions
This project demonstrates how Ash actions operate as Either pipelines, using superhero dispatch as a practical example of multi-resource operations, Kleisli composition, and closure under context.
- Elixir 1.15 or later
- Erlang/OTP compatible with your Elixir version
-
Clone the repository and navigate to the project:
git clone https://github.com/JKWA/ash-actions.git cd ash-actions -
Install dependencies:
mix setup
-
Start the Phoenix server:
mix phx.server
Or run inside IEx for interactive exploration:
iex -S mix phx.server
-
Visit
localhost:4000from your browser.
The app uses Ash Actions to enforce domain rules and report problems. A typical UI would hide invalid actions, this one does not. Instead, it allows all actions and reports domain errors.