One node per person · alpha · open source

Massively multi-user apps with no central database.

Each person keeps their own data on their own Mac and shares what they choose, end-to-end encrypted. Your code runs on their machines, and you host nothing.

The usual shape

Everyone connects to one database in the middle.

Every read and write goes through the company that runs the app. It holds everything, and everything stops when it does.

The LastDB shape

People connect to each other, with no database in the middle.

Each ring is one person’s node, on their own machine. A line is a database two people share, carried by an encrypted cloud that cannot read it. People and connections come and go.

Shape

No database holds everyone.

Every person has their own database, on their own machine. People share databases with each other: a family, a team, a club. Picture a social network where each person holds their own posts and decides who receives them.

Scale

Every new user brings their own machine.

Each person’s Mac stores their data and runs your code, so a thousand users are a thousand machines doing their own work. You have no backend to scale, because you have no backend.

Code

Your code runs next to the data. Any code.

A shared database is not behind someone’s API. Every member’s machine holds it, so your app works on it directly, with your own logic, in any language. A feed, a marketplace, a game, a ledger: if you can write it, it runs.

Cloud

The cloud carries it and cannot read it.

All of your code runs on your users’ machines. The cloud stores and passes along end-to-end encrypted bytes. It runs none of your logic, and you host nothing.

01 · The problem

A multi-user app starts with a database of everyone.

To let people use an app together, you usually build one place that holds all of them. You run that database, you write the sync, and you hold every user’s data in an account that you must protect.

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. LastDB starts from the other end: one person, one database, on their own machine.

02 · First, one person

Build it for one person first.

  1. 01

    The database runs on the user’s Mac.

    LastDB is one background service. Your app reads and writes it over a local Unix socket. Nothing in this step needs a server of yours.

  2. 02

    Your app declares what it stores.

    A schema names its fields, its primary key, and any alternate keys. Each app keeps its own records. No app owns the database.

  3. 03

    It is a complete app at this point.

    One person can use it with no account and no network. Encrypted cloud backup is optional. Nothing below this line is needed until two people want to use the app together.

Open the interactive guide →

03 · The requests, for one person

Any language that can send HTTP over a Unix socket can use LastDB. Shown with curl.

Declare, write, read.

An app sends three requests: it declares a schema, writes a record, and reads it back by key. All three are plain HTTP with a JSON body. This is the write.

Write a record a note, found by id or by tag
curl -s --unix-socket ~/.lastdb/data/folddb.sock \
  -X POST http://localhost/api/mutation \
  -H "Content-Type: application/json" \
  -d '{
    "type": "mutation",
    "schema": "notes/note",
    "record": { "id": "n1", "tag": "work", "body": "Ship the page" },
    "key_value": { "hash": "n1", "range": null },
    "alternates": { "by_tag": { "hash": "work", "range": null } },
    "mutation_type": "create",
    "expected": { "type": "absent" }
  }'

See all three in the developer guide →

04 · Then, many people

Shown with the lastdb command line. An app calls the same operations for its users.

Then let them share a database.

  1. 01

    One person publishes a database.

    A database is shared whole. Data for a different audience goes in a different database, so a person can hold one for family, one for a team, and one that stays private.

  2. 02

    They invite people, and choose who can write.

    An invitation is encrypted for one recipient. Everyone invited can read the database. The publisher grants writing by schema, and can take access away again.

  3. 03

    The publisher’s LastDB checks every change.

    A change from another person arrives encrypted. The publisher’s own LastDB checks it against the sharing rules and the schema before anyone else receives it. A modified copy of your app cannot write what the rules do not allow.

Ben exports a contact file and sends it to Ana
lastdb share contact --out ben.contact
Ana creates a database and invites Ben
lastdb db create family-notes
lastdb --db family-notes share invite \
  --recipient ben.contact --recipient-key "$BEN_KEY" \
  --out ben.invite
Ben accepts the database appears on his Mac and stays in step
lastdb share accept --publisher "$ANA_KEY" \
  --name family-notes ben.invite

Ana and Ben give each other their public keys over a channel they already trust. Your app then sends the same declare, write, and read requests, addressed to the shared database. The cloud in between stores and passes along encrypted bytes. It is not a peer-to-peer network or a blockchain.

05 · Publish

Build it on your own data. Publish it to everyone.

You build and run the app on your own Mac, against your own data. What you ran is what everyone gets. There is nothing to deploy: a release is a signed entry in the App Registry that names the app, its schemas, and the commit to install.

Each person installs the app by name. It runs on their Mac, against their own LastDB and the databases they share. An update is a new entry that their LastDB checks before it installs. Publishing needs a paid Exemem subscription. Building and running locally does not, and the people who install your app pay nothing to use it.

You publish signed with your publisher key
lastdb app publish --manifest manifest.json
Each person installs
lastdb app install your-app
06 · What you get

The parts an app needs, on the device.

01 · ON DEVICE

Database

Records found by key. No read walks a whole schema, so a read stays fast as the data grows.

02 · OPT-IN

Backup

Encrypted cloud backup, and recovery onto a new Mac. No name or email address. The cloud cannot read it.

03 · BY INVITATION

Sharing

A person publishes a database and invites others. Their LastDB checks every change that comes back.

04 · SIGNED

App Registry

A signed list of apps. You publish to it, and each person installs by name. There is no server to deploy.

Two starter apps show how it is done: Brain for notes and decisions, and LastSecrets for credentials. Coming: LastSeek, semantic search beside the database. It is not in the App Registry yet.

Install

Two steps, about five minutes.

You need Apple Silicon, Homebrew, and Bun. The installer checks for all three and stops if one is missing. Read the script first: install.sh.

1. Install LastDB and review the plan

curl -fsSL https://thelastdb.com/install.sh -o install.sh
sh install.sh

The first run installs LastDB, prints the plan for the starter apps, and stops with RESULT: CONSENT NEEDED. That stop is expected.

2. Consent to the starter apps

sh install.sh --accept-install
brain init

It ends with RESULT: PASS when the apps are current and healthy.

What it changes

  • Homebrew installs the lastdb and lastdbd commands and starts the LastDB service.
  • The App Registry clones each starter app into ~/.local/share/lastdb-apps and links its commands into ~/.local/bin.
  • The first app install adds a background job that checks the registry and upgrades the apps on the stable channel.
  • It does not edit your shell profile, and it does not install Bun.

Remove it

launchctl bootout "gui/$(id -u)/com.edgevector.lastdb-app-registry"
rm "$HOME/Library/LaunchAgents/com.edgevector.lastdb-app-registry.plist"
rm -rf "$HOME/.local/share/lastdb-apps" "$HOME/.local/state/lastdb-app-registry"
brew services stop lastdb
brew uninstall lastdb

Your data stays in ~/.lastdb. Delete that folder only if you want to lose the data. This cannot be undone.

Database only

brew install edgevector/lastdb/lastdb
brew services start lastdb
lastdb status

Add apps later with lastdb app install.

07 · Questions

The product

Is it open source?
Yes. The database is Apache-2.0 at github.com/EdgeVector/lastdb. The starter apps are public repositories too.
What does it run on?
macOS on Apple Silicon. There is no Intel, Linux, or Windows release today.
Is it ready for production?
No. LastDB is alpha. The storage format and the socket requests can still change between releases.
Is this a blockchain or a peer-to-peer network?
No. There are no tokens, no consensus, and no peer discovery. Machines talk to an encrypted cloud relay that stores bytes it cannot read.
Can I query it with SQL?
No. LastDB finds a record by its key. A schema declares a primary key and any named alternate keys, and every read names one of them. This keeps a read the same speed as the data grows.
Is there a desktop app?
No. LastDB is a background service with a command line. Apps bring their own interface.

Building with it

What happens when two people change the same record?
In a shared database, changes from other people go to the publisher’s LastDB, which accepts them in order. A change that was made against an older version of a record is discarded, and the app can try again. On one person’s own devices, the later write to a record wins, and it replaces the whole record. LastDB does not merge field by field.
Does it work offline?
Yes, for a person’s own data. Reads and writes happen on their Mac. A change to a shared database is sent when the machine is next online, and other people see it after the publisher’s LastDB accepts it.
People can modify my app on their own machine. What stops bad writes?
The check does not live in your app. The publisher’s LastDB checks every change from another person against the sharing rules and the schema, and drops the ones that fail. There is no place to run your own server-side rules, so design for people who chose to share with each other.
How many people can share one database?
The design has no fixed limit: every member’s machine holds the database, and no server coordinates writes. We have not measured the ceiling yet. A run with 1,000 writers is next, and the result will be published here.
What does a person who uses my app install?
LastDB, and then your app by name from the App Registry. The app brings its own interface. The apps published today are command-line tools.

Cost and the cloud

Do I need an account?
Not for local use. Cloud backup connects your database without a name or an email address.
What does it cost?
The database and the apps are free. Cloud storage for backup is a paid subscription, managed with lastdb cloud payment.
Who pays for the cloud?
The developer does. To publish an app you need a paid Exemem subscription. Exemem is the cloud service that LastDB uses for backup and sharing. People who use a published app pay nothing to use it. Building and running an app on your own Mac needs no subscription either.
What does the cloud hold?
Encrypted copies of your data, for backup, recovery, and sharing. It cannot read them. Reads and writes happen on your Mac.

Why LastDB exists →   How we build it →