About · why LastDB exists

Bring the app to the data, not the data to the app.

A multi-user app usually starts with one database that holds everyone. LastDB starts with one person and one node, on their own Mac, and lets people share from there.

01 · The problem

Every app builds its own database of everyone.

APP A DATABASE of everyone 1 2 3 4 APP B DATABASE of everyone 1 2 3 4 APP C DATABASE of everyone 1 2 3 4 THE SAME FOUR PEOPLE, HELD AGAIN BY EVERY APP
Fig. 1 — One database of everyone, in every app

To let people use an app together, the developer builds one place that holds all of them. The developer runs that database, writes the sync, and holds every user’s data in an account that must be protected.

The next app does all of it again. People end up with one copy of their life in each app, and own none of them. No single system holds the full picture, and the person it describes controls no part of it.

02 · The LastDB model

One node per person. Shared databases between people.

ANA publisher LASTDB NODE PRIVATE FAMILY-NOTES BEN invited LASTDB NODE PRIVATE FAMILY-NOTES THE CLOUD encrypted bytes it cannot read ONE NODE PER PERSON — NO DATABASE OF EVERYONE
Fig. 2 — Each person holds their own data and shares a whole database

Each person runs one LastDB on their own Mac. That is their node. Apps become clients of the person’s database and stop being the owners of the data. That inversion is the thesis: the app comes to the data.

A node holds several named databases, some private and some shared. One person, the publisher, shares a whole database with other people by invitation. A family, a team, or a club is a database that its members all hold. No database holds everyone.

An app built this way has no backend. The developer’s code runs on each person’s machine, next to the data, and the developer hosts nothing.

03 · Layers

The data lives on the Mac. The cloud carries encrypted copies.

BRAIN notes LASTSECRETS credentials YOUR APP same requests UNIX SOCKET LASTDB NODE PRIVATE FAMILY TEAM named databases, on this Mac's disk OPT-IN THE CLOUD encrypted copies for backup and sharing READS AND WRITES HAPPEN ON THE MAC
Fig. 3 — Apps, the node, and the cloud

The node is one background service. Apps read and write it by key over a local Unix socket. Reads and writes happen on the Mac, so an app for one person needs no account and no network.

The cloud is a central service, and it is optional until a person wants backup or sharing. It stores and passes along end-to-end encrypted bytes that it cannot read. It runs none of the app’s code. Backup is set up with lastdb backup connect.

04 · Principles

Four rules the design follows.

01 · OWNERSHIP

The person holds the data.

Apps are clients of a person’s database, not keepers of copies. Swap an app and the data stays where it was.

02 · ORDER

One person first, then many.

Declare a schema, write, and read by key. That is a complete app for one person. To share, the app sends the same requests, addressed to a shared database.

03 · SHARING

Share on purpose.

A database is shared whole, by invitation. Everyone invited can read it. The publisher grants writing by schema and can revoke it.

04 · THE CLOUD

The cloud carries. It does not read.

The cloud holds encrypted bytes and runs no app code. The checks on shared data run on the publisher’s own LastDB.

05 · How it works

The short version. The developer guide has the requests.

Schemas and keys
A schema names its fields, its primary key, and any named alternate keys. A record holds one value for each field. Every read names a key, either a hash or a hash plus a range. There is no SQL.
Apps
An app is a program that talks to the node over a local Unix socket. Brain and LastSecrets are apps. You can write your own in any language that can send HTTP over a Unix socket.
Sharing
The recipient exports a contact file with lastdb share contact. The publisher can check it against a key they already trust with lastdb share verify-contact, then writes an invitation that only that recipient can open. A change from another person goes, encrypted, to the publisher’s LastDB, which checks it against the sharing rules and the schema before anyone else receives it.
Publishing
An app has no server. A release is a signed entry in the App Registry. Each person installs the app by name, and it runs on their Mac.
Search
LastSeek is the search service. It keeps a semantic index beside the node, outside the database. It is coming, and it is not in the App Registry yet. Until it is, Brain finds notes by name and by keyword.

Read the developer guide →

06 · Status

Alpha, on macOS.

LastDB is alpha and in active development. It runs on macOS on Apple Silicon only, and it is not ready for production. The starter apps in the App Registry are Brain and LastSecrets.

The database and the apps are free. Publishing an app needs a paid Exemem subscription; Exemem is the cloud service LastDB uses for backup and sharing. People who use a published app pay nothing to use it.

Install on the home page →   Apps →   Developer →   Paper →