Skip to content

@zelavis/database

@zelavis/database provides the core database contracts and document primitives for Zelavis.

The package is event-first internally.

Current public shape centers on:

  • documents
  • events
  • schemas
  • native file-reference schema fields
  • projections
  • time-series
  • optional SQL capability

Current non-goals for the first slice include:

  • built-in SQLite dependency in core
  • replication
  • offline sync
  • distributed transactions
  • document APIs remain the main ergonomic surface
  • writes append events
  • reads come from projections
  • projections are explicit public contract metadata
  • time-series builds on that explicit model
  • collection schemas can now validate Zelavis-style file references with type: "file" or helpers such as imageFileSchema(...), audioFileSchema(...), videoFileSchema(...), and documentFileSchema(...)
  • editor-facing content models can mark rich-text HTML fields explicitly with richTextHtmlSchema(...), which the dashboard maps to Lexical while the stored value remains plain HTML