This document defines the ubiquitous language for the Zander LCARS Bookmark System.
When definitions disagree:
- Implementation contracts
- Domain types and contracts in
src/lib/state/model.ts(orsrc/lib/state/stateTypes.tsuntilmodel.tsis the canonical file) - Persistence port in
src/lib/persistence/PersistenceBackend.ts
- Domain types and contracts in
- Behavioral truth
- Tests (Vitest/component tests, Playwright when present)
- Docs
ARCHITECTURE.md, then this glossary, then other docs
This glossary should stay aligned with the contracts and behavior above.
A saved URL with a title and optional description that belongs to exactly one category.
Contract (Bookmark in the canonical state model file)
id: string— stable identifiertitle: stringdescription?: stringurl: string— normalized URL including protocolcategoryId: string— owningCategory.idcreatedAt: string— creation timestamp (ISO-8601 string)
Notes
- “Entry” (if used informally) means “Bookmark” unless explicitly stated otherwise.
A user-defined grouping used to organize bookmarks.
Contract (Category in the canonical state model file)
id: string— stable identifiername: stringcolor: string— LCARS palette color (stored as a hex string)createdAt: string— creation timestamp (ISO-8601 string)children: Category[]— nested subcategories
The complete nested structure of categories.
Contract
- Stored as
State.categories: Category[](root nodes) - Nesting is represented by
Category.children
A category that appears directly in State.categories (i.e., not inside another category’s children).
A category that appears inside another category’s children.
The user’s current category selection.
Contract
State.currentCategoryId: string | nullnullmeans “All / no category filter”- a non-null value must be a valid
Category.id
Behavior
- Determines which bookmarks are shown in the Bookmarks View (typically the selected category subtree).
- Used as the default category selection when creating a new bookmark (unless the UI explicitly overrides).
The user-configured “Home” destination when the user activates the Home control.
Contract
State.landingCategoryId: string | null
Behavior
- When “Home” is activated, the app navigates to the Bookmarks View and selects:
landingCategoryIdif set and valid, otherwise- the default home selection (implementation-defined)
The full persisted application state.
Contract (State in the canonical state model file)
bookmarks: Bookmark[]categories: Category[]currentCategoryId: string | nullcurrentView: ViewIdcurrentSettingsPage: SettingsPageIdlandingCategoryId: string | null
A top-level UI mode.
Contract
ViewId = "bookmarks" | "settings" | "about"State.currentViewdetermines the active view.
A sub-page within Settings.
Contract
SettingsPageId = "categories" | "home" | "themes" | "data" | "reset" | nullState.currentSettingsPagedetermines the active settings page (nullmeans “Settings home/overview” if implemented).
These terms describe user-facing concepts. They intentionally avoid DOM/CSS class names.
The persistent LCARS chrome that wraps the app content and provides global navigation/actions.
Typical regions:
- Header bar (includes Home control)
- Sidebar bar (category navigation)
- Main content region (active view)
- Footer bar (global actions/status)
The primary “return to home” control in the header.
Behavior
- Returns to the Bookmarks View.
- Selects the Landing category if configured.
The primary view for browsing and opening bookmarks.
Common elements:
- Bookmark grid (tiles)
- Location/breadcrumb readout (if implemented)
- Status readout (counts, stardate, etc.)
The view for configuring categories, theme, data import/export, and reset flows.
A read-only view presenting system/project information and meta readouts.
A modal UI used for focused tasks (create/edit bookmark, confirm destructive actions, pick a color, etc.).
Dialog behaviors are governed by ACCESSIBILITY.md (focus trap, restore focus, Escape cancels, etc.).
A compact visual representation of a bookmark in the grid, typically including:
- title
- optional description snippet
- URL (often visually truncated)
- affordances for edit/open actions
A concrete implementation of the persistence port.
Contract
PersistenceBackend(loadState,saveState,exportData,importData)
Mode where persistence is local to the browser.
Behavior
- Uses
LocalStorageBackend. - State is stored under the v1 storage key (example:
"zander-svelte:v1").
Authenticated mode where persistence is scoped per user.
Behavior
- Uses
FirestoreBackend(v2). - Requires an auth provider (Firebase Auth or Logto).
A versioned exportable representation of the full state.
Contract (ExportBundle in the canonical state model file)
version: "zander-v1"state: Statemeta:exportedAt(string timestamp)sourceBackend(backend identifier, e.g."localStorage")
Loading an ExportBundle into the app.
Default semantics
- Import is a full replacement unless explicitly documented otherwise.
A typed error emitted by persistence operations.
Contract (Storage error type in the canonical state model file)
code: stringmessage: string
Common codes used in v1 localStorage backend:
storage-unavailableinvalid-jsonwrite-failedversion-unsupported
The app stores creation timestamps as strings.
Contract
- Stored in
Bookmark.createdAtandCategory.createdAtasstring.
Note
- The formatting/meaning is implementation-defined and must remain consistent for imports/exports.
- Current implementation uses ISO-8601 strings (via
new Date().toISOString()).
- Use the terms in this glossary consistently in code, specs, and docs.
- When introducing a new concept or renaming an existing one:
- update this glossary
- update any relevant OpenSpec specs
- update tests that encode the expected behavior