~erin df116b1ef6 | ||
---|---|---|
.cargo | ||
core | ||
crawler | ||
frontend | ||
migrations | ||
static | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
Justfile | ||
README.md |
README.md
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
- Install Rust via
rustup
- Clone this repository
- Install sqlx-cli
- Set the
DATABASE_URL
environment variable to"sqlite:todos.db"
- 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 codeinclude
: the primary search queryignore
: keywords to ignore (optional)option
: aSearchType
(Fuzzy
,Regex
,Sql
)