Your app gets a database on the user’s own Mac, with optional encrypted backup and sharing. There is no backend for you to run, and you never hold the user’s data.
An app that stores personal data usually needs a server. You run a database, you write sync, and you hold every user’s data in an account that you must protect.
The next app does all of it again. The user ends up with one copy of their life in each app, and owns none of them.
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.
A schema names its fields, its primary key, and any alternate keys. Each app keeps its own records. No app owns the database.
Backup to the cloud is optional and encrypted. Sharing a database with another person is an invitation that the user sends.
Any language that can send HTTP over a Unix socket can use LastDB. Shown with curl.
curl -s --unix-socket ~/.lastdb/data/folddb.sock \
-X POST http://localhost/api/schemas/declare \
-H "Content-Type: application/json" \
-d '{
"namespace": "notes",
"schema": {
"name": "note",
"schema_type": "Hash",
"record_keys": {
"primary": { "kind": "hash" },
"alternates": { "by_tag": { "kind": "hash" } }
},
"fields": ["id", "tag", "body"],
"field_types": { "id": "String", "tag": "String", "body": "String" }
}
}'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" }
}'curl -s --unix-socket ~/.lastdb/data/folddb.sock \
-X POST http://localhost/api/query \
-H "Content-Type: application/json" \
-d '{"schema_name":"notes/note","filter":{"HashKey":"n1"}}'Records found by key. No read walks a whole schema, so a read stays fast as the data grows.
Encrypted cloud backup, and recovery onto a new Mac. No name or email address.
The user invites another person to a database. The invitation is encrypted for that person.
A signed list of apps. The user installs an app by name, at a commit proved with their release.
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.
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.
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.
sh install.sh --accept-install brain init
It ends with RESULT: PASS when the apps are current and healthy.
lastdb and lastdbd commands and starts the LastDB service.~/.local/share/lastdb-apps and links its commands into ~/.local/bin.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.
brew install edgevector/lastdb/lastdb brew services start lastdb lastdb status
Add apps later with lastdb app install.