Datahoster
Self-hosted data APIs. Drop a folder, get an API: collections, users and endpoints are plain files, and your own server serves them as JSON over HTTPS.
About
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 small JSON files inside; edit them locally, the local client mirrors them up, and the server serves the API over HTTPS.
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, with no build step and no client library. The contact form on this site works that way.
How it works
Collections are folders
A collection is a folder of typed columns, one file each. A record is validated against them on the way in.
Endpoints are the API
Every read and write goes through a named endpoint, with its own permission on one collection: select, insert, update or delete.
Plain HTTP
GET an endpoint for a JSON array; POST, PUT or DELETE to insert, update or delete a record. No SDK to learn.
Features
There are no sessions to manage: just users with tokens, and a permission on each endpoint saying who may use it, the public, a list of named users, or both.
Public inboxes
A public insert endpoint takes anyone's submission, while a private select endpoint keeps the reading to you.
Attributed writes
Lock an endpoint to named users, each with 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 take its default, and nothing already stored is rewritten.
Validated on the way in
Every column has a type, and a record is checked against them before it's stored, so bad data never reaches the collection.
Import files
Fill a collection from JSON files of records. Edit a file and sync: only what changed is loaded, and removed records are deleted.
Parameterised endpoints
An endpoint can take a parameter, such as a search term, so one public endpoint can power a site's search box.
Screenshots
datahoster.org explains the whole service with worked examples, and its own search runs on a Datahoster host.
A data host is a folder
The folder for a host holds its collections, users and endpoints, each a small JSON file. Visit datahoster.org ↗
A contact form in a few files
A plain HTML form posts straight to a public insert endpoint, with no build step and no client library. See the form ↗
Just enough access
Users with tokens and a permission on each endpoint, and Datahoster's place in the Localhoster family. Read about access ↗
Contact form example
The smallest useful host: anyone may submit a message and only you may read them back. One collection, two endpoints and one user. Open the example ↗
Search example
The site's own search: a collection filled by import, behind a public endpoint that takes the search term. Open the example ↗
Reference
The column types, the files a host keeps on disc, every field by the file it belongs to, and how a host stores and serves its data, all searchable. Open the reference ↗
Contents
The sections of datahoster.org, and the pages in each.
Technologies
More development
- Frontend Development - A studio for fast, accessible, standards-based frontends
- Stylesheet.css - A CSS framework for semantic HTML, with no JavaScript
- PHP Framework - A PHP framework assembled from around 130 small modules
- Localhoster - Build a website as a local folder named after its domain
- Sitehoster - Static hosting that serves every site over HTTPS automatically