halkyon/apps/meditate/halkyon_meditate_server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 769ae3b20a
feat(meditate): dreams on the server, sealed and synced like the sittings
The dream journal's table (ADR 0038, D14): `dream`, in the sync engine's
database, a row a dream, its content sealed on the device (key ID,
payload, nonce), so the instance sees only that a dream exists, its size
and when it changed. The same rules as the sittings: the sync engine's
connector refuses a call without a session, each row lives in its
person's space, and deleting the person deletes their dreams with it
(the deletion test now writes and counts a dream too, and leaves
another person's).

The migration `20261103130213716-dreams`:
- `CREATE OR REPLACE FUNCTION gen_random_uuid_v7()`: the generator
  repeats the UUID v7 function every migration; replacing it with the
  same body changes nothing.
- `CREATE TABLE "dream"`: `id` a UUID v7 by default, `spaceId` the
  person's sync space, `keyId` the key it is sealed with, `payload` the
  sealed bytes (not null), `nonce` the sealing's nonce.
- `CREATE INDEX "dream_space_idx"` on `spaceId`, so deleting a space
  finds its dreams without scanning the table.
- The foreign key from `spaceId` to `offline_sync_spaces("id")` with
  `ON DELETE CASCADE`: deleting the space deletes its dreams.
- The version rows of every module in `serverpod_migrations`.
A new, empty table: nothing existing changes and no data moves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-04 09:31:57 +01:00
..
bin feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
config feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
lib feat(meditate): dreams on the server, sealed and synced like the sittings 2026-11-04 09:31:57 +01:00
migrations feat(meditate): dreams on the server, sealed and synced like the sittings 2026-11-04 09:31:57 +01:00
test/integration feat(meditate): dreams on the server, sealed and synced like the sittings 2026-11-04 09:31:57 +01:00
.gitignore feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
analysis_options.yaml feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
CHANGELOG.md feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
dart_test.yaml feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
LICENSE feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
pubspec.yaml feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00
README.md feat(meditate): Meditate's server, its sealed tables, and SimpleLogin's way back to it 2026-11-04 09:31:56 +01:00

halkyon_meditate_server

Halkyon Meditate's server: Serverpod with the halkyon_base module. See Meditate's README.