Inkling
All docs

Project

Inkling Architecture

How the server, collaboration and web app fit together.

Rendered from docs/ARCHITECTURE.md in the repository. Markdown source

한국어: ARCHITECTURE.ko.md.

Overview

flowchart LR
  subgraph Client["Browser / PWA"]
    BN["BlockNote editor<br/>(ProseMirror)"]
    YD["Y.Doc (CRDT)"]
    UI["React SPA"]
    BN --- YD
    UI --- BN
  end

  subgraph Server["Docker: app (Node 22)"]
    FA["Fastify REST /api"]
    HP["Hocuspocus WS /collab"]
    ST["Static SPA + /files"]
  end

  PG[("Postgres 16<br/>users / pages / page_docs(bytea) / files")]
  VOL[("Volume /data/uploads")]

  UI -- "REST (session cookie)" --> FA
  YD -- "WebSocket sync + awareness" --> HP
  UI -- "GET /files/:id" --> ST
  FA --> PG
  HP -- "debounced Yjs state" --> PG
  ST --> VOL

Why a CRDT (Yjs)

The core problem of concurrent editing is "if two people edit the same paragraph at the same time, who wins?" Yjs is a CRDT (Conflict-free Replicated Data Type), so every client converges on the same result no matter what order the updates arrive in. The server is not an arbiter; it only acts as a relay and a store (Hocuspocus). As a result:

The editor and CRDT core (BlockNote/ProseMirror/Yjs) are proven open-source components; the product itself (server, permissions, workspaces, integration pipelines, UI) is built in-house.

Authentication

Markdown round-trip (M2/M4 design sketch)

flowchart LR
  DOC["page_docs (Yjs state)"] --> B["BlockNote blocks JSON"]
  B --> MD["Markdown + assets"]
  MD --> OBS["Written into an Obsidian vault folder<br/>(inklingctl pull / server export API)"]
  B --> NB["Notion block mapping"]
  NB --> NAPI["Notion API upload"]
  MDIN["External .md / zip"] --> B2["blocks JSON"] --> DOC

Deployment

Markdown sourceView on GitHubAll docs