Internals
How a Datahoster host works inside. None of this is needed to run a host, it is here so you can see the whole picture and so the design has one place to live. The local client is the code that runs on your machine and the server is everything on the box it talks to. A collection is a set of columns on disc, laid out at a fixed width and chunked into numbered files. The whole dataset is held in memory as typed arrays with the same layout, so a read is a walk over memory. The local client keeps the two ends in step over a private sync API, and the log browsers are built from what it pulls down through the tools API.
Local →
Every file the local client is built from: the one command you run, this hoster's own modules, and the shared toolkit behind it, with their exports and switches.
Server →
Everything on the server: Caddy out front, a localhost-only API behind it, its configuration, and the files each collection stores on disc.
Storage →
How a collection sits on disc: a directory of fixed-width column files, aligned by row, with text kept in a companion strings file.
Memory →
How the same columns are held in memory: typed arrays chunked to match the files, with a growing tail of smaller buffers.
Sync →
How the local client mirrors your definitions up and pulls records down: the private management API, the diff-and-pull process, and the errors a sync can fail with.
Tools →
The read-only API behind the log browsers, and how the Data, Web and Server Logs tools are built from what the local client pulls down.