The Ash Framework homepage and documentation site.
Find a file
2022-11-13 11:52:54 -05:00
.github/ISSUE_TEMPLATE chore: add issue templates 2022-10-21 20:07:24 -06:00
.vscode fix: clicking on search result closes 2022-09-19 17:14:15 -04:00
assets Feat(DocSidebar): Extract TreeView component to improve consistency (#48) 2022-11-13 10:43:11 -05:00
config Feat(DocSidebar): Extract TreeView component to improve consistency (#48) 2022-11-13 10:43:11 -05:00
iOS improvement: add xCode stuff to the iOS folder 2022-09-09 00:45:20 -04:00
lib Feat(DocSidebar): Extract TreeView component to improve consistency (#48) 2022-11-13 10:43:11 -05:00
priv improvement: honor default guide configurations 2022-11-03 09:20:51 -07:00
rel WIP 2022-03-25 17:17:01 -04:00
test improvement: use new flow features for search 2022-10-16 19:34:20 -05: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: tons of improvements, add ash_blog 2022-11-01 03:20:09 -04:00
.gitignore Feat(DocSidebar): Extract TreeView component to improve consistency (#48) 2022-11-13 10:43:11 -05:00
.tool-versions chore: Add nodejs 18 (LTS) to .tool-versions (#40) 2022-10-30 21:48:27 -04:00
Dockerfile improvement: fix string replacement to work in code blocks 2022-10-30 20:58:34 -04:00
fly.toml fix: account for not all resources being AshPostgres resources 2022-11-01 03:40:24 -04:00
LICENSE.md create LICENSE.md (#51) 2022-11-13 11:52:54 -05:00
livebook.livemd improvement: fix item paths, make sidebar much friendlier 2022-08-04 13:14:58 -04:00
mix.exs Feat(DocSidebar): Extract TreeView component to improve consistency (#48) 2022-11-13 10:43:11 -05:00
mix.lock improvement: honor default guide configurations 2022-11-03 09:20:51 -07:00
README.md improvement: lots of docs fixes! 2022-09-15 18:35:33 -04:00

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

A Bit of History

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.