2024-05-02 07:25:16 +12:00
![Logo ](https://github.com/ash-project/ash/blob/main/logos/cropped-for-header-black-text.png?raw=true#gh-light-mode-only )
![Logo ](https://github.com/ash-project/ash/blob/main/logos/cropped-for-header-white-text.png?raw=true#gh-dark-mode-only )
2020-10-21 06:54:35 +13:00
2024-05-02 07:25:16 +12:00
![Elixir CI ](https://github.com/ash-project/ash_phoenix/workflows/CI/badge.svg )
2020-10-21 07:38:50 +13:00
[![License: MIT ](https://img.shields.io/badge/License-MIT-yellow.svg )](https://opensource.org/licenses/MIT)
[![Hex version badge ](https://img.shields.io/hexpm/v/ash_phoenix.svg )](https://hex.pm/packages/ash_phoenix)
2024-05-02 07:25:16 +12:00
[![Hexdocs badge ](https://img.shields.io/badge/docs-hexdocs-purple )](https://hexdocs.pm/ash_phoenix)
# AshPhoenix
2020-10-21 06:54:35 +13:00
2024-05-02 07:25:16 +12:00
Welcome! This is the package for integrating [Phoenix Framework ](https://www.phoenixframework.org ) and [Ash Framework ](https://hexdocs.pm/ash ). It provides tools for integrating with Phoenix forms (`AshPhoenix.Form`), Phoenix LiveViews (`AshPhoenix.LiveView`) and more.
2021-07-16 06:43:11 +12:00
2024-05-02 07:25:16 +12:00
## Installation
2020-10-21 06:54:35 +13:00
2024-05-02 08:47:24 +12:00
Add `ash_phoenix` to your list of dependencies in `mix.exs` :
```elixir
2024-05-14 03:37:50 +12:00
{:ash_phoenix, "~> 2.0.0"}
2024-05-02 08:47:24 +12:00
```
2020-10-21 07:38:50 +13:00
2024-05-02 07:25:16 +12:00
## Whats in the box?
2020-10-21 06:54:35 +13:00
2024-05-02 07:25:16 +12:00
- `AshPhoenix.Form` - A form data structure for using resource actions with phoenix forms
2024-05-02 07:31:01 +12:00
- `AshPhoenix.Form.Auto` - Tools to automatically determine nested form structures based on calls to `manage_relationship` for an action.
2024-05-02 07:25:16 +12:00
- `AshPhoenix.FilterForm` - A form data structure for building filter statements
- `AshPhoenix.LiveView` - Helpers for querying data and integrating changes
- `AshPhoenix.SubdomainPlug` - A plug to determine a tenant using subdomains for multitenancy
- `AshPhoenix.FormData.Error` - A protocol to allow errors to be rendered in forms
- `Phoenix.HTML.Safe` implementations for `Ash.CiString` , `Ash.NotLoaded` and `Decimal`
- `AshPhoenix.SubdomainPlug` for multitenant subdomain-based applications.
2024-05-02 08:48:42 +12:00
- `mix ash_phoenix.gen.live` for generating liveview modules
- `mix ash_phoenix.gen.html` for generating controllers and views
2022-10-04 19:05:43 +13:00
2024-05-02 07:25:16 +12:00
## Tutorials
2022-10-04 19:05:43 +13:00
2024-05-02 07:25:16 +12:00
- [Getting Started with Ash and Phoenix ](documentation/tutorials/getting-started-with-ash-and-phoenix.md )
2022-10-04 19:05:43 +13:00
2024-05-02 07:25:16 +12:00
## Topics
2022-10-04 19:05:43 +13:00
2024-05-02 07:25:16 +12:00
- [Union Forms ](documentation/topics/union-forms.md )