Skip to content

hypermedia-app/creta

Repository files navigation

@hydrofoil/creta

Warning

Project Creta as well as this documentation is an early work-in-progress. Expect changes

Creta is a set of projects which aim to make it very simple to build low-code, data-centric Hydra APIs using node.js and a set of other open web standards:

Why

APIs built with Creta (Knossos), are different from any other because they really follow the Hypermedia constraint of REST by providing all information to the clients at runtime.

The data-centric approach means that every aspect of the API's behaviour is controlled directly using... the API itself. Create data models? Add access control to allow clients to make requests? Create new resources? All of those actions can be done with little more than curl.

Core packages

The project consists of multiple components, which can be combined according to specific needs:

@hydrofoil/labyrinth

Tip

Named after the mythical Cretan maze, home of the Minotaur

Core server library, which is the foundation for express-based Hydra APIs. It builds upon hydra-box by providing read-only capabilities using a convention-over-configuration approach and core error-handling functionality.

The core piece missing from labyrinth is loading the actual contents of hydra:ApiDocumentation which drives client-server interactions. That is to keep the core agnostic of how the API's final functionality is deployed.

@hydrofoil/knossos

Tip

Named after the ancient Cretan city, located near the modern day Heraklion

knossos complements labyrinth by providing a SPARQL loader of the API Documentation. That way the API Documentation lives in the same database as the rest of the resources, which means that it can be modified without.

Other integrated features are:

  • all-you-need write handlers for resources and hydra:Collection members,
  • SHACL validation middleware,
  • data-centric eventing via @hydrofoil/knossos-events,
  • ACL via hydra-box-web-access-control
  • administrative system account access.

@hydrofoil/minotaur

Tip

Named after the mythical creature who inhabited the maze located at the centre of Knossos palace

As an alternative to knossos, minotaur comes with a filesystem loader of the API Documentation.

Auxiliary packages

@hydrofoil/talos

Tip

Named after a mythical giant who guarded Crete by throwing great boulders at approaching enemies

Talos is a CLI tool which can be used to boostrap initial resources inside a triple store for a knossos/labyrinth to serve.

@hydrofoil/knossos-events

Configure domain-event handlers by declaratively annotating data structures directly, in a data-centric fashion.