OpenStreetMap Inspired Data Storage Backend Focused on Performance and GeoJSON Interchange
Feature | Hecate | ESRI MapServer | OSM Backend |
---|---|---|---|
Vector Tile Creation | ✔️ | ✔️ | ❌ |
Streaming Query API | ✔️ | ❌ | ❌ |
Multi User Support | ✔️ | ✔️ | ✔️ |
Feature History | ✔️ | ❌ | ✔️ |
Atomic API Operations | ✔️ | ✔️ | ❌ |
GeoJSON-LD Based API | ✔️ | ❌ | ✔️ |
Mapbox GL JS Styling | ✔️ | ✔️ | ❌ |
Integrated Data Stats | ✔️ | ✔️ | ❌ |
- HecateJS Javascript Library & CLI Tool for interacting with the Hecate API
- Hecate-Example Script for importing some fake data for testing
Built something cool that uses the Hecate API? Let us know!
- Start by installing Rust from rust-lang.org, this will install the current stable version
curl https://sh.rustup.rs -sSf | sh
- Hecate is designed to run on the latest stable version of Rust, but has been thoroughly tested with
1.40.0
. This will install1.40.0
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.40.0
- Source your
bashrc/bash_profile
to update yourPATH
variable
source ~/.bashrc # Most Linux Distros, some OSX
source ~/.bash_profile # Most OSX, some Linux Distros
- Download and compile the project and all of it's libraries
cargo build
-
Ensure you have database dependencies PostgreSQL and PostGIS installed. PostgreSQL 11 or newer and PostGIS 2.5 or newer are required, because of support for libprotobuf and MapBox Vector Tiles. On OSX Postgres.app is a good option.
-
Create the
hecate
database using the provided schema file. These instructions assume you have set up a rolepostgres
with sufficient privileges.
echo "CREATE DATABASE hecate;" | psql -U postgres
psql -U postgres -f hecate/src/schema.sql hecate
-
This step will also create a database role called
hecate
andhecate_read
. -
If the database connection fails due to authentication, here are some tips: Your
pg_hba.conf
file may not be set up to trust local connections. Your pb_hba file location can be found usingecho "show hba_file;" | psql -U postgres
. Replace the file with the following:
local all postgres trust
local all all trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
host replication postgres samenet trust
-
Install Node/Npm for building the frontend code
-
Install Yarn for installing frontend dependencies
-
Install frontend dependencies
yarn --cwd hecate_ui install
-
Build frontend UI
yarn --cwd hecate_ui build
Note: if actively working on developing the UI, a live reloading server can be started via:
yarn --cwd hecate_ui dev
-
Start the server
cargo run
-
Test it is working. The HTTP healthcheck URL
/
should respond with "Hello World!".curl localhost:8000
-
The admin UI is available at http://localhost:8000/admin/
You will now have an empty database which can be populated with your own data/user accounts.
If you want to populate the database with sample data for testing, ingalls/hecate-example has a selection of scripts to populate the database with test data.