Databases (ADR-13 follow-ups):
- Relation properties link records to another database, on the same page
or on any page the reader can open (read live and read-only, like synced
pages). Cells list the linked titles; clicking one opens the record.
- Rollup properties work out counts, sums, averages, medians, min/max,
ranges, earliest/latest dates and checked counts over related records.
Neither is stored: views compute them before drawing (linked.ts), so they
follow both databases live, and rollups sort and filter as numbers.
- Exports (Markdown, HTML, PDF, Word) resolve them for same-page databases.
- A record opens as a full page at /p/<page>/r/<database>/<record>, with
"Open as full page" on the side panel and "Back to the page".
Edgeless mode (ADR-14 follow-ups):
- History previews show a version's canvas and count canvas changes.
- Comments can be anchored to canvas elements (anchor {element}); elements
with open threads show a badge that opens the thread.
- Workspaces choose how new pages open (workspaces.default_page_mode); the
per-device choice now defaults to following the workspace.
- Phones edit the canvas once a page is opened for editing; the page note
shows the page title.
Languages:
- The admin panel speaks English, Polish, German, French and Spanish, with
a picker sharing the web app's setting and a key parity test.
- The phone app speaks the same five, follows the phone's language (and
Android's per-app language setting), and has its own parity test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Database schema
docwell-db is a stock PocketBase: the stack runs
tajniak81/pocketbase-docker-root
(source) as it is. There is no Docwell image for it any more.
docwell-server brings PocketBase up to Docwell's schema itself, every time it starts
(Server/internal/pbschema): missing collections and fields are created,
existing ones keep their data. It also writes the DOCWELL_* settings (app name and URL, mail, file storage) and
sends Docwell's own emails, so PocketBase needs no hooks either.
This folder is where that schema is written:
pb_migrations/holds the JS migrations, the source of truth for the schema.export-schema.shturns them intoServer/internal/pbschema/schema.json, the snapshot docwell-server embeds and applies.- All collection API rules are
null, so only superusers have access. Never expose PocketBase publicly; only docwell-server talks to it.
Changing the schema
-
Add a migration to
pb_migrations/(pocketbase migrate create "add_comments" --migrationsDir ./pb_migrations, or copy an existing file). Leave earlier migrations alone. -
Regenerate the snapshot (needs Docker and Go):
sh Database/export-schema.sh -
Commit the migration and the new
schema.jsontogether.go test ./internal/pbschemachecks the snapshot.
Removing a collection or a field is not done by the snapshot: it only adds and updates. Do that by hand, once, in the PocketBase dashboard of each install, after the release that stops using it.
The admin panel manages two parts of the users collection itself, the OAuth2 providers and the magic link switch
(otp.enabled), so the snapshot leaves them out and they keep whatever is set.
Run locally
Download PocketBase v0.40.6 for your OS into Database/bin/, then:
./bin/pocketbase superuser upsert admin@docwell.test devpassword123 --dir ./pb_data
./bin/pocketbase serve --dir ./pb_data --http 127.0.0.1:8070
Start docwell-server against it (DOCWELL_PB_EMAIL and DOCWELL_PB_PASSWORD set to that superuser) and it creates
the collections. The PocketBase dashboard is at http://127.0.0.1:8070/_/.