Datahoster

Self-hosted data APIs. Drop a folder, get an API.

Datahoster/
  api.example.com/              your data host, one folder
    datahoster-collections/     your tables, each a folder of columns
    datahoster-users/           accounts and access tokens
    datahoster-endpoints/       your API, one folder per path

A data host has collections, users and endpoints. Every read and write goes through an endpoint: select, insert, update and delete.

How it works Get started

How it works

The same idea as localhoster, pointed at data instead of pages. A folder named for a domain becomes a live API host on your own server. Its collections, users and endpoints are all just small JSON files inside. Edit them locally; the local client mirrors them up and the server serves the API over HTTPS.

Collections are folders

A collection is a folder of typed columns, one file each. A record is validated against them on the way in and kept on your own server.

Endpoints are the API

Every read and write goes through an endpoint: a named path that reads or writes one collection under its own permission. Offer the same data several ways, and keep the collection itself private.

Plain HTTP

GET an endpoint for a JSON array; POST, PUT or DELETE to insert, update or delete a record. That is the whole API. No SDK to learn.

A contact form, in a few files

Define a collection, add a public insert endpoint, point a plain HTML form at it, and every submission becomes a validated record on your server. No build step, no client library.

<form method="post" action="https://api.example.com/submit">
  <input name="name" required>
  <input name="email" type="email" required>
  <textarea name="message" required></textarea>
  <button>Send</button>
</form>

Read it back with a private select endpoint, or scripted with a fetch and a token. See Endpoints.

Just enough access

No sessions to manage: just users with tokens and a permission on each endpoint: { public, users }. Public, a list of named users, or both. Every write is attributed to the user who made it. Heavy identity work stays with userhoster.

·

Public inboxes

A public insert endpoint takes anyone's submission; a private select endpoint keeps the reading to you, holding a token.

·

Attributed writes

Lock an endpoint to named users; each presents a token. Because the token names the user, every insert, update and delete is recorded against them.

·

Grows with you

Grow a collection by adding a column file; existing records simply take its default, and nothing already stored is rewritten.

Part of the Localhoster family

Datahoster is one of a set of small, self-hosted services that all work the same way: a directory of domain folders, mirrored to your own server.