• Stars
    star
    1,474
  • Rank 31,880 (Top 0.7 %)
  • Language
    Elixir
  • License
    MIT License
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A declarative, extensible framework for building Elixir applications.

Logo Logo

Elixir CI License: MIT Hex version badge

Dependency

def deps do
  [
    {:ash, "~> 2.13.3"}
  ]
end

What is Ash?

Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can model anything, like a database table, an external API, or even custom code. Ash provides a rich, and extensive set of tools for interacting with and building on top of these resources. By modeling your application as a set of resources, other tools know exactly how to use them, allowing extensions like AshGraphql and AshJsonApi to provide top tier APIs with minimal configuration. With filtering/sorting/pagination/calculations/aggregations, pub/sub, policy authorization, rich introspection, and much more built-in, and a comprehensive suite of tools to allow you to build your own extensions, the possibilities are endless.

For those familiar with Phoenix, you can think of Ash as a declarative application modeling layer designed to replace your Phoenix contexts.

Ash Framework 2.0

Ash Framework 2.0 has been released! This begins the official stable release cycle (although it was already quite stable). Thanks to everyone in the community who helped make this possible, from the contributors, the curious, to those already using Ash in prod. I'm eternally grateful for all of your support.

Additionally, I'd like to thank Alembic, who have brought me on to work on Ash full time. Alembic is building complex software with small teams in record time by leveraging tools like Ash Framework and Phoenix LiveView.

Along with the 2.0 release of core, the AshPostgres, AshPhoenix and AshArchival packages have had 1.0 version released as well. AshGraphql is next up, and should be released in the next few weeks. Feel free to dive in to it before then, though :).

Is Ash an alternative to X?

Ash is not meant to be an alternative to Phoenix, Ecto, or Absinthe. Ash uses Ecto under the hood, AshGraphql uses Absinthe. Phoenix is absolutely the recommended way to build web interfaces on top of your Ash application (there is a whole package dedicated to it, AshPhoenix). Ash is not meant to be the only way that you ever interact with your data, so it is almost a certainty that you will need to use Ecto in some cases. For instance, Ash does not currently support bulk actions or atomic updates. For this reason, you can implement custom actions for things that can be encapsulated in your resource, and you have all of Elixir at your disposal to implement custom behavior outside of your resources, with a wide array of escape hatches in between.

Extensions

Extensions in 1.0+

  • AshPostgres - Back a resource with postgres. Rich querying capabilities, supporting aggregates, calculations, and fragments. Comes with a migration generator to get you up and running in record time!
  • AshPhoenix - Helpers to integrate Ash Resources with Phoenix. Tools like AshPhoenix.Form allow you to build forms over your resources, and manage complex nested related data with one data structure.
  • AshArchival - A tiny but powerful extension. Get archival (A.K.A soft deletion) with one line of code.

Extensions <1.0

  • AshGraphql - Create a GraphQL from your resources with only a few lines of code. Backed by the excellent Absinthe library. It comes with its own fully implemented dataloader, and automatically derives all the types, fields, and mutations automatically. Getting a relay compatible GraphQL API is as easy as setting the relay? toggle.
  • AshJsonApi - Create a JSON:API spec compliant API in minutes.
  • AshAdmin - A rich admin UI automatically derived from your resource definitions.
  • AshCsv - Back your resource with a CSV file.
  • Spark - The core declarative DSL library that backs Ash and its extensions.

Unreleased Extensions

  • AshPaperTrail - Creates and manages a versions table for a resource, and writes all changes to that version resource. With one line of code.
  • AshJsonApiWrapper - Back your resource with an external API using finch and configuration to describe how your resource maps to the response from the external service.

Your Own Extensions

All of the extensions above are created with a set of tools that are free to use to create your own extensions. They can all be used as a basis point, or as inspiration. Many users have created their own extensions for various reasons. An extension can both add to the resource's DSL and programatically restructure the resource. For example, AshArchival adds an attribute, modifies every destroy action, and adds a "base filter" to the resource. This allows for extremely powerful extensions.

Links

Contributors

Ash is made possible by its excellent community!

Become a contributor

More Repositories

1

ash_postgres

The PostgreSQL data layer for Ash Framework
Elixir
123
star
2

spark

Tooling for building DSLs in Elixir
Elixir
111
star
3

ash_admin

A super-admin UI dashboard for Ash Framework applications, built with Phoenix LiveView.
Elixir
92
star
4

ash_phoenix

Utilities for integrating Ash and Phoenix
Elixir
91
star
5

igniter

Elixir
69
star
6

ash_graphql

The extension for building GraphQL APIs with Ash
Elixir
65
star
7

ash_hq

The Ash Framework homepage and documentation site.
Elixir
46
star
8

reactor

Reactor is a dynamic, concurrent, dependency resolving saga orchestrator.
Elixir
41
star
9

ash_paper_trail

The extension for keeping an audit log of changes to your Ash resources.
Elixir
28
star
10

ash_oban

The extension for integrating Ash resources with Oban.
Elixir
22
star
11

ash_tutorial

A Tutorial for Ash
22
star
12

ash_archival

An Ash extension to implement archival (soft deletion) for resources.
Elixir
16
star
13

splode

Aggregatable and consistent errors for Elixir
Elixir
15
star
14

ash_state_machine

The extension for building state machines with Ash resources.
Elixir
15
star
15

ash_double_entry

A customizable double entry bookkeeping system backed by Ash resources.
Elixir
14
star
16

ash_sqlite

The SQLite data layer for Ash Framework.
Elixir
14
star
17

ash_cloak

An Ash extension to seamlessly encrypt and decrypt resource attributes.
Elixir
14
star
18

ash_json_api_wrapper

Elixir
13
star
19

ash_example

An example application for the Ash Framework
Elixir
12
star
20

ash_events

An event-architecture extension for Ash.
Elixir
12
star
21

ash_csv

The CSV data layer for Ash Framework
Elixir
11
star
22

ash_blog

A Blog data layer backed by markdown files
Elixir
7
star
23

iterex

External iterators for Elixir
Elixir
7
star
24

quix

An example/eductational application for the ElixirConf 2023 training
Elixir
5
star
25

ash_sql

A library containing some shared Ecto-based sql data layer functionality.
Elixir
4
star
26

ash_mysql

Elixir
4
star
27

ash_policy_authorizer

A policy based access authorizer for the Ash Framework
Elixir
4
star
28

opentelemetry_ash

The Open Telemetry integration for Ash Framework
Elixir
4
star
29

example_with_auth

A WIP in progress translation of an example boilerplate application with `mix phx.gen.auth`
Elixir
3
star
30

ash_money

The extension for working with money types in Ash.
Elixir
3
star
31

ash_auth

An authentication tool-kit for use with Ash Framework
3
star
32

ash_vaxine

A Vaxine data layer for Ash
Elixir
3
star
33

ash_appsignal

The AppSignal APM integration for Ash Framework
Elixir
3
star
34

simple_sat

A simple, dependency free boolean satisfiability solver.
Elixir
2
star
35

ash_pow

A Pow integration extension for Ash Framework
Elixir
1
star
36

ash_livebook

Smart Cells and helpers for working with Ash in LiveBook
Elixir
1
star