Giter Club home page Giter Club logo

ash_hq's Introduction

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.

ash_hq's People

Contributors

zachdaniel avatar sevenseacat avatar theosaurus-rex avatar brettkolodny avatar mbuhot avatar jimsynz avatar woutdp avatar totaltrash avatar joshprice avatar juddey avatar markholmes avatar nirjan-dev avatar rachouan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.