The Ash Framework homepage and documentation site.
Find a file
2023-07-05 19:59:24 -04:00
.github
.vscode
assets fix: Correct formatting of all list positions, and remove margins from prose paragraphs inside list items 2023-05-03 11:14:52 +08:00
config improvement: super secret project, don't read this commit 2023-04-01 17:08:37 -04:00
iOS
lib fix: problematic z-index on top bar 2023-07-05 19:59:24 -04:00
priv chore: remove twitter fix tag links 2023-07-05 19:22:09 -04:00
rel
scripts improvement: scripts/rpc tools 2023-05-15 19:53:35 -04:00
test
.check.exs
.credo.exs
.dockerignore
.formatter.exs
.gitignore
.tool-versions improvement: overhaul the front page 2023-07-03 22:52:48 -04:00
CHANGELOG.md
dialyzer.ignore_warnings
Dockerfile chore: remove unnecessary variable in dockerfile 2023-05-11 17:04:08 -04:00
fly.toml improvement: add libcluster 2023-02-05 23:52:43 -05:00
LICENSE.md
livebook.livemd
mix.exs improvement: overhaul the front page 2023-07-03 22:52:48 -04:00
mix.lock improvement: more feature items 2023-07-05 19:46:32 -04:00
README.md

AshHq

Getting Started

  1. Fork and clone this repository.
  2. Set up the project by running mix do deps.get, deps.compile, setup
  3. Run mix import to import the latest dependencies from hex (this may take a while)
  4. Install the frontend assets by running npm i --prefix assets.
  5. Run the server with iex -S mix phx.server
  6. Open http://localhost:4000

Note to linux users: You will need the following packages (or their equivalents) to compile successfully: erlang-dev erlang-parsetools erlang-os-mon erlang-xmerl erlang-tools

A Bit of History

The docs are not static content like you would typically see for documentation. They are all stored in a database, because they can all be full-text searched using postgres. Eventually it would make sense to serve the individual doc pages from a CDN or something like that. The interesting pages in that regard is the Docs page. We do quite a bit of work to make sure that we are only loading the html that will be served for the exact document we are seeing.

The magic of search is done via AshHq.Docs.Extensions.Search, which modifies resources to make them full text searchable using postgres, amongst other things. See lib/ash_hq/docs/extensions/search/transformers/add_search_structure.ex for more.

There is also a usage of Ash.Flow for searching, which can be found in lib/ash_hq/docs/search/search.ex. It is actually a bit un-ideal, as the better thing to do would be to use a postgres UNION. There are ways to do that with Ash by extracting the resource queries and then making a union, but it was much easier to just put a search action in a flow. Eventually, Ash will support unions.