Schema

What stores the knowledge?

The schema is centered on a single content record and fans outward into tags, links, assets, embeddings, and resurfacing state.

Database view

Schema map

A visual map of the database tables, their cardinality, and how items connect to tags, assets, links, embeddings, and resurfacing state.

Live counts

Lookup table

Tag

Freeform labels that keep the library organized and searchable.

  • id
  • name
  • slug
  • createdAt

Join table

ItemTag

Many-to-many bridge that connects items to tags without duplicating tag records.

  • itemId
  • tagId
  • createdAt

Primary record

Item

The main content record. Notes, resources, ideas, moods, and research all live here.

  • id
  • title
  • kind
  • format
  • summary
  • contentMarkdown
  • contentHtml
  • contentText
  • sourceUrl
  • sourceTitle
  • sourceAuthor
  • sourcePublishedAt
  • mood
  • metadata
  • ingestionStatus
  • randomEligible
  • pinned

Attachments

ItemAsset

Images, files, or embeds tied to an item, with optional metadata.

  • id
  • itemId
  • kind
  • url
  • mimeType
  • altText
  • width
  • height
  • metadata
  • createdAt

Semantic layer

ItemEmbedding

Embedding payload for similarity search and future dot-connecting behavior.

  • itemId
  • model
  • embedding
  • createdAt
  • updatedAt

1 row per scope

RandomItemState

Tracks which item should surface next and when the 20-minute refresh lands.

  • scopeKey
  • itemId
  • nextRefreshAt
  • updatedAt

Items

535

Source-of-truth records for notes, resources, ideas, moods, and research.

Tags + joins

11 tags, 1444 joins

Taggable structure that keeps relationships reusable and non-redundant.

Connections

0 links

Explicit relationships between items and future relationship surfacing.

Assets

0

Images, files, and embeds attached to items.

Embeddings

0

Semantic vectors for future related-item and search upgrades.

Resurfacing

1

One row per scope that rotates the currently surfaced item.