ferret/README.md

1.3 KiB

Ferret

Ferret is an attempt at a new, self-hosted, independent search engine.

Goals

  • Simple and accessible pure-HTML user interface
  • No tracking or bloat
  • Only indexes smaller actually cool sites

Technology

  • Written in Rust
  • Uses the Tokio async framwework
  • Uses Axum as a web framework
  • SQLx compile-time checked SQL queries

Development

  1. Install Rust via rustup
  2. Clone this repository
  3. Install sqlx-cli
  4. Set the DATABASE_URL environment variable to "sqlite:todos.db"
  5. Install the just command runner

Parts

The crawler is a self-contained executable, that when ran crawls through the URLs and inserts them into an SQL database.

The engine core is a server that hosts an API to perform search queries on the database. It creates a seperate indexed table in the database, and has a search endpoint at /api/search. It takes a POST request with a JSON body, and returns a JSON response.

The variables it takes are:

  • language: an ISO 639-3 lang code
  • include: the primary search query
  • ignore: keywords to ignore (optional)
  • option: a SearchType (Fuzzy, Regex, Sql)