Skip to content

feat: content-driven features — full-text search, previews, export/download #84

Description

@Alimedhat000

Context

Per the #47 resolution, Document.content is a read-only mirror of Yjs state, maintained exclusively by Hocuspocus sync (server/src/lib/dbPersistence.ts). REST never writes it. This issue tracks the consumer features that justify keeping the mirror (Option A).

Features

  1. Full-text document search — search documents by content and title.

    • Candidate: Postgres tsvector generated column on Document.content + GIN index; weight title higher than content.
    • Endpoint: GET /document/search?q=... scoped to docs the user owns/collaborates on.
  2. Document previews — content snippets in dashboard cards / list views (first N lines), sourced from the mirror without touching Yjs state.

  3. Export & download — download a document as:

    • Markdown (.md) — direct from content
    • PDF — render markdown → HTML → PDF server-side or client-side print pipeline

Constraints

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions