The Ash Framework homepage and documentation site.
Find a file
2022-08-28 08:42:24 -04:00
.vscode WIP 2022-04-01 15:11:17 -04:00
assets improvement: disable debug and fix scrolling 2022-08-16 01:21:55 -04:00
config improvement: small tweaks 2022-08-22 23:02:53 -04:00
lib improvement: various fixes, update deps 2022-08-28 08:42:24 -04:00
priv improvement: various fixes, update deps 2022-08-28 08:42:24 -04:00
rel WIP 2022-03-25 17:17:01 -04:00
test improvement: rework auth forms to liveview 2022-08-15 21:23:59 -04:00
.check.exs improvement: get a build set up 2022-08-06 19:22:58 -04:00
.credo.exs improvement: get a build set up 2022-08-06 19:22:58 -04:00
.dockerignore WIP 2022-03-31 17:29:23 -04:00
.formatter.exs improvement: various fixes, update deps 2022-08-28 08:42:24 -04:00
.gitignore chore: add gitignore 2022-08-22 19:44:37 -04:00
Dockerfile WIP: on import and use static html 2022-08-22 19:44:37 -04:00
fly.toml chore: change domains to ash-hq.org 2022-03-29 12:16:17 -04:00
livebook.livemd improvement: fix item paths, make sidebar much friendlier 2022-08-04 13:14:58 -04:00
mix.exs improvement: various fixes, update deps 2022-08-28 08:42:24 -04:00
mix.lock improvement: various fixes, update deps 2022-08-28 08:42:24 -04:00
README.md Update README.md 2022-08-17 22:07:54 -04:00

AshHq

Getting started is a standard phoenix/ash/postgres application.

To get data imported from the various projects that are currently seeded (see the seeds.ex file), once you've set up and created the data base, go into iex and run AshHq.Docs.Importer.import().

The liveview part is not very conventional, I was focused on speed when I first wrote it, and it (as things always do) evolved from something far more simple. The truly complicated part is that 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.