Weekly Planner
Domain model

Schema

InstantDB entities, fields, links, and presence rooms.

Schema

Source: src/schema.js (re-exported by instant.schema.ts).

Entities

$users

Instant auth users. Optional unique indexed email.

Linked as owner of boards/settings/todos, member users, board editors, board prefs.

boards

FieldNotes
namestring
from / tooptional date strings
repeatEveryoptional number; weekly cadence anchored at from; 0/absent = one-off
createdAtindexed number
sortOrderindexed number
colorLabelsoptional JSON string of color → label

Links: required owner (boardOwner), events, shares, members, editors (boardEditors), boardPrefs.

events

FieldNotes
dayindexed 0..6
titlestring
startindexed minutes from 06:00
durduration minutes
colorpalette key
memooptional
createdAtindexed

Required board link (eventBoard), cascade on board delete. UI writes go through eventFields().

settings

Optional theme. One row per user (settingsOwner).

shares

FieldNotes
tokenunique indexed public id
secretindexed read secret
editSecretoptional; editor writes
modeopen | password
roleviewer | editor
enabledboolean
createdAtindexed

Required board (shareBoard). Viewer demotion replaces the row so stale editSecret cannot linger.

members

role (indexed, display/cache), optional email, createdAt. Links to board + user. Write authority is boards.editors, not this string alone.

boardPrefs

Per-user board view: hiddenColors (JSON), hideWeekend, compact, showMemos. Links to board + user.

todos

FieldNotes
dayindexed YYYY-MM-DD planner date
eventIdindexed string
createdAtindexed

Presence of a row means that event is checked off for that date. Same weekly event is unchecked again on a future date.

Rooms

rooms.board.presence — optional name, color, role. Used for avatars and cursors. Publish display names only, never raw email.

On this page