Documentation

Getting Started

Cleave is a compiled transactional repository service for OLTP applications.

It sits between application services and operational repositories, handling repetitive repository-facing mechanics such as CRUD, filtering, pagination, validation, JWT verification, ACL enforcement, logging, metrics, and reader/writer repository access.

The surrounding application still owns domain-specific workflows, calculations, payments, notifications, queues, integrations, and cross-system coordination.

First decisions

Before running Cleave against a repository, decide:

  • which repository resource should be exposed first;
  • which table or collection name maps to that resource;
  • whether authentication is ignored for local evaluation or enforced;
  • which access-control mode applies: none, user, group, usergroup, or perm;
  • what default and maximum page limits are acceptable;
  • how reader and writer repository pools should be sized.

Minimal path

  1. Configure the repository connection in dbms.
  2. Configure interface.path_prefix, interface.paging.limit_default, and interface.paging.limit_max.
  3. Decide whether auth.ignore_auth should remain true for local evaluation.
  4. Initialize the repository schema for the resource.
  5. Test a collection GET with the required read media header:
GET /api/0.0/person?page[$skip]=0&page[$limit]=25
Accept: application/vnd.api+json
  1. Test a filtered collection GET:
GET /api/0.0/person?filter[lname]=$eq[Mouse]
Accept: application/vnd.api+json
  1. Test a JSON:API-style write payload.

See Request Requirements for required headers and method rules. See Resource Access for query syntax and write examples.