Skip to content
docs-plusPublic

About

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

3,437 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyDocy

CI Nightly Release License: MIT Live demo

docs.plus docs.plus source @docs.plus extensions Discord

Bun Next.js React Tiptap Yjs Hocuspocus TypeScript

TinyDocy is a free, open-source (MIT) document editor where several people edit the same page at once and see each other's cursors. It is built with Tiptap 3, Yjs and Hocuspocus, needs no account, installs as an app, and keeps working offline. It is the public testbed for docs.plus: editor features land here first and move to docs.plus once they pass collaboration and scale checks.

Live demo: tiny.docs.plus. Open it in two windows and watch edits sync. It is a public sandbox: everyone sees the same documents, so don't type anything private.

Contents

Features

Area What you get
Structured documents Title-first schema (heading block*), with each section folded, dragged to a new position or filtered by heading.
Outline Table of contents sidebar: click to jump, drag to move whole sections. Reopening a document offers to continue in the section you left (remembered on this device only).
Real-time collaboration Live cursors and presence, conflict-free merging with Yjs CRDTs, and synced tabs shared by every visitor.
Rich content Lists, task lists, tables, blockquotes, code blocks with highlighting, live Mermaid diagrams and charts, and media embeds (image, video, audio, YouTube, Vimeo, Loom, SoundCloud, Spotify, X). Pasting plain-text Markdown gives formatting (⌘⇧V still pastes plain text), and printing hides the app's chrome and prints folded sections open.
Action palette and formatting memory Alt+/ (or Alt+Shift+Z) lists every toolbar action with search, Recent and Suggested here. Repeat formatting (⌘⌥V, Ctrl+Alt+V or F4) applies the last formatting you used as one undo step; Paint format (the bubble's brush) picks up formatting and paints it onto the next selection; Your formats live in the text style dropdown. Pointing at a colour swatch, or arrowing to one, previews it on the selection before you apply it. A status pill says what happened, or why not; diagrams start from five templates. On phones a text selection swaps the bar to eight formatting cells. Your formats stay on the device; the Repeat bundle, Recent and the last template are remembered across reloads until "Forget my choices".
Find and replace ⌘F (Ctrl+F) opens a find bar over the document: ⌘G / ⌘⇧G (F3 / Shift+F3) or Enter / Shift+Enter step through the hits, with Match case and Whole word, and Replace or Replace all (one undo step). It searches the document's text only, never the outline, ignores Arabic and Persian letter-form and digit differences, and keeps up with collaborators' edits while open.
Selection bubble Select text with a mouse or trackpad for a one-row bubble: Style ▾ (turn the block into text, a heading, a list, a quote or code), bold, italic, underline, strike, inline code, clear formatting, text and highlight colour by name, link, and the Paint format brush. Alt+F10 reaches it from the keyboard. It never shows on a touch screen.
"/" block menu Type "/" at the start of a line or after a space for a short list of text styles, lists and Insert kinds (with the Diagram templates) under the caret; an empty line reads "Type / for blocks". Suggested leads with your last three inserted kinds. Typing filters it, including Markdown shortcuts such as ##, and the footer shows the active row's shortcut; Enter or a click applies the block as one undo step. With a mouse or trackpad, a + beside an empty line types the "/" for you. On phones, the bar's Insert cell opens an Insert sheet with the same items.
Simplified toolbar ⋯ → Simplified toolbar (also in the palette) shows the compact row at every width: alignment and indent behind ¶, the colour pair as one button, Outline and Filter behind View, size as one menu, the theme in ⋯ › Appearance. Every tool stays one click away; the choice stays in this browser, survives "Forget my choices", and never changes on its own.
Installable app Web app manifest, install button, offline page, and a service worker that never touches documents or the live connection.
Offline editing Documents open from the device before the server answers. Offline edits sync on reconnect, and deleted documents never come back.
Fast with large documents Skeleton on first paint, code-split editor, and a single render on mount, so a 1,200-block document shows in about 1 s on desktop.
Hardened for a public demo Per-IP and per-document limits, size caps, origin checks, tombstones, CSP, and opt-in analytics that never sees document content.

Quick start

Requires Bun 1.4.5 or later. Node.js is not needed: Next.js, ESLint, Playwright and the git hooks run on the Bun runtime ([run] bun = true in bunfig.toml), and unit tests use bun test.

bun install

Then start both services:

make dev

Open http://localhost:3000, then open the same address in a second window to see collaboration.

make dev runs two processes:

Service Port Entry point
Next.js app 3000 app/
Hocuspocus WebSocket server (SQLite via bun:sqlite) 1234 scripts/hocus-server.ts

The service worker and offline page register only in production builds. To try them locally, build and start the app:

bun run build && bun run start

How it works

flowchart LR
  subgraph Browser
    UI[Next.js app<br/>skeleton → editor]
    SW[Service worker<br/>pages + static files]
    IDB[(IndexedDB<br/>offline copies)]
    UI <--> IDB
    UI -. offline fallback .- SW
  end
  UI <-- "one shared WebSocket<br/>(Yjs sync)" --> HP[Hocuspocus 4<br/>Bun.serve]
  UI -- "DELETE /api/documents/:id" --> API[Next.js route]
  HP <--> DB[(SQLite<br/>documents, activity,<br/>tombstones)]
  API --> DB
Loading
  • Documents are Yjs docs. Each tab is one document; the tab list itself is a shared document named global-tabs. Hocuspocus stores the encoded state in SQLite and enforces the guardrails in lib/security/.
  • One WebSocket per browser tab. lib/collab-session.ts multiplexes every document on a shared socket. It reuses sessions across remounts, keeps sessions with unsynced edits alive, and restores offline copies (lib/offline/) before the socket attaches.
  • The page renders before the editor loads. The server sends an app-shell skeleton with real intro text (good for SEO and slow connections). The editor bundle loads separately while the tab list syncs.
  • Editor extensions are layered. Heading fold, drag, filter and scale live in extensions/ and work in any Tiptap 3 app. Links, inline code, indent, placeholders, Mermaid and media come from the @docs.plus/extension-* packages.

Where things live

app/                 Routes: editor, /about, /privacy, /offline, metadata, API
components/
  app-skeleton/      Server-rendered loading shell
  document-editor/   The integrated editor
  editor-app/        Client shell: tabs, lazy editor, offline states
  pwa/               Service worker registration, install button, offline UI
  tab-bar/  toc-sidebar/  tiptap-ui/  tiptap-node/  ui/ (shadcn/ui)
extensions/          Standalone Tiptap extensions (heading-*, render-once,
                     table-of-contents, title-document)
hooks/               React hooks (synced tabs, Yjs document, connection state)
lib/
  collab-session.ts  Shared sessions on one socket
  offline/           Offline document copies (IndexedDB)
  pwa/               Service worker and its routing rules
  security/          Guardrails, CSP, tombstones, rate limits
scripts/             Hocuspocus server, retention purge
tests/               Unit, e2e, PWA, perf, soak, load (see tests/TESTING.md)
docs/                Runbooks, plans, brainstorms

Configuration

Everything is configured through environment variables, and most of them have safe defaults. There are two kinds.

Build-time settings (NEXT_PUBLIC_*, SEO_NOINDEX)

These are inlined by bun run build. Put them in .env.production before building; setting them at runtime has no effect.

Variable Default Purpose
NEXT_PUBLIC_HOCUS_URL ws://127.0.0.1:1234 Collaboration server URL. Production needs wss://.
NEXT_PUBLIC_SITE_URL https://tiny.docs.plus Canonical origin for metadata, sitemap and JSON-LD. Site copy lives in lib/site-config.ts.
SEO_NOINDEX unset 1 for previews and staging: noindex, Disallow: /, empty sitemap.
NEXT_PUBLIC_GA_MEASUREMENT_ID unset Opt-in Google Analytics 4 (G-…). Visitors must click Allow; GPC and DNT are honoured. See the analytics runbook.
NEXT_PUBLIC_PRIVACY_CONTROLLER, NEXT_PUBLIC_PRIVACY_EMAIL unset Data controller and contact on /privacy. Set both before enabling analytics.
NEXT_PUBLIC_SERVICE_WORKER on 0 unregisters the worker and deletes its caches. See the service worker runbook.
NEXT_PUBLIC_OFFLINE_CACHE on 0 turns off offline document copies and deletes stored ones.
NEXT_PUBLIC_LIBRARY off 1 turns on My documents at /library (folders, tags, Trash and Quick Open, as on desktop), plus a Public chip and a My documents link in the sandbox's tab bar: the personal library stored in this browser, with no socket, no analytics and its own strict CSP (inline scripts by hash, computed after next build into .next/library-csp.json). Off, /library says the library is turned off and never touches storage; nothing links to it yet. 0 later hides it again and never deletes what is stored. See the web library design, §2.8 and §5.5.
NEXT_PUBLIC_LIBRARY_ORIGIN from LIBRARY_HOST My documents' origin as the sandbox sees it ("Copy to My documents" opens it and sends only to it): https:// + LIBRARY_HOST at build, or set directly for a local cross-origin test. Empty: the library shares this site's origin.
LIBRARY_ALLOW_SHARED_ORIGIN unset 1 lets a production build turn on My documents without LIBRARY_HOST, on the sandbox's origin. For local and test builds only: there the sandbox's scripts could read the library.
LIBRARY_HOST unset The library's own origin (for example my.tiny.docs.plus, owner decision D11), read by the server at runtime: that host serves only My documents at /, sends every other page back to the sandbox, and the sandbox's /library redirects there. Needs DNS, a certificate and a Traefik route first. Unset, the library is /library on the sandbox origin.
NEXT_PUBLIC_SHARES off 1 turns on the /s/[id] share page: the click-to-open handoff and the single-document view of a live share (P4.3). The Hocus server must also run with HOCUS_SHARES on and list this site's origin in HOCUS_SHARE_ORIGINS. Off, /s/ is a 404.
NEXT_PUBLIC_ACTION_PREVIEW on 0 turns off colour previews: pointing at or arrowing to a swatch no longer shows it on the selection.
NEXT_PUBLIC_PSEUDO_LOCALES off 1 (development and CI only; make dev sets it) lets ?lang=en-XA (accented, longer, in ⟦ ⟧) or ?lang=ar-XB (right to left) show the interface in a pseudo-locale, to find hard-coded strings and mirroring bugs; ?lang=en goes back. Never set it for a production build. Languages design §3.12.
NEXT_PUBLIC_FIND on 0 turns off Find and replace: ⌘F / Ctrl+F opens the browser's own find bar again, and the key listener is left out of the build.
NEXT_PUBLIC_PROSE_AUTOCORRECT off Phone keyboards in the editor (phones and tablets design §5.7, M19). on: prose gets the keyboard's autocorrect and capital letters at the start of sentences; caps: capitals only, autocorrect stays off. Either way code blocks and inline code are never corrected, capitalised or spellchecked. off keeps both off, as before. Build time; the desktop build ignores it. Turn it on after the M18 device checks pass.
NEXT_PUBLIC_WEB_SETTINGS off 1 turns on the web Settings dialog (preferences design §4.2, W13): ⋯ › View › Settings…, the palette's "Settings: General / Page / Writing / Privacy" and the Page popover's "Page settings…". Off, none of them shows and the dialog's chunk is left out of the build. Dark until its design review. Build time.
NEXT_PUBLIC_TOUCH_ORGANISE off 1 turns on touch organise (phones and tablets design §5.2–§5.4, M22): phones get the outline from the Aa sheet as a left sheet, every outline row gets a ⋯ menu (Fold, Move up, Move down), a finger reorders outline rows and tabs only after a 250 ms press (so a swipe scrolls), touch targets in the outline grow to 44 px, and the editor's section drag handle never shows for a finger. Build time.
NEXT_PUBLIC_TABLET_INPUT off 1 turns on tablet input (phones and tablets design §5.10, M27): on a touch-first device, a trackpad or mouse hover shows tooltips (a finger still never does), and shortcut glyphs appear in menus after the first key press with ⌘, Ctrl or Alt on a hardware keyboard. Build time; the listener lives in the app shell, not the editor chunk.
NEXT_PUBLIC_REMEMBER_CHOICES on 0 stops the toolbar remembering choices (last colours, recent colours, list type, table size, Simplified toolbar) and the "Continue where you left off" place: it shows the defaults and writes nothing, and the Simplified toolbar item is disabled with the reason. Choices stay in this browser (tinydocy-choices, tinydocy-ui, tinydocy-continue) and never reach the document, the server, URLs or analytics.
NEXT_PUBLIC_DOC_CHIPS off 1 lets smart chips (document links drawn as their target's current title) be inserted: the ⌘K picker's Insert as, a pasted lone document link, Turn into Chip. Desktop and the web library only; the sandbox has no chips. Off still renders chips already in a document. See search-linking §4.2a.
NEXT_PUBLIC_COMMENTS off on lets comments be written where a document takes them (a desktop Local document, a web library document or a live share; never the web sandbox or the Playground). Dark until the comments UI (P4.10): nothing on the web mounts comments yet, so on changes nothing visible today. The first comment write keeps a random secret in this browser (tinydocy-author) that never leaves it; each comment stores an author id derived from it per document (HMAC with the document's lineage), so anyone who can open the document sees that id but can't tie it to your comments in other documents. Neither goes into awareness, URLs or analytics.
NEXT_PUBLIC_PRODUCT_PAGES off 1 publishes the desktop app's product pages: /releases (the release notes from desktop/whats-new/, newest first) and its Atom feed /releases/feed.xml, adds them to the sitemap, and shows "All releases" in the desktop app's Settings › About; it also adds the desktop app (SoftwareApplication) to the JSON-LD and a "for your computer" section to llms.txt, from the product copy in lib/site-config.ts. Off, the pages answer 404 and none of that appears. Dark until Gate 5 (brand design §4).
NEXT_PUBLIC_APP_TARGET web desktop for the desktop app's build: Subscript moves to ⌘⇧, so ⌘, can open Settings; Privacy links to the website's page in a new window; X posts render as a link card with no X script, and the Embed dialog leaves X out; embeds (YouTube, Vimeo, Loom, SoundCloud, Spotify) wait for a Load click and remote images, video and audio show a placeholder, so opening a document makes no request (a remote image loads, through the app, after Load or the document's "Load Images" consent); the service worker never registers; Google Analytics is compiled out, even with NEXT_PUBLIC_GA_MEASUREMENT_ID set. bun run build:desktop sets it and writes the static export to out/; its routes are only the *.desktop.tsx files, so the API, /privacy, /offline, llms.txt, the sitemap, robots, manifest and social images stay out. See arch §3.1 in the desktop architecture spec.
NEXT_PUBLIC_DESKTOP_BRIDGE unset dev only for a desktop-target next dev whose storage is bun desktop/dev/storage-host.ts over a loopback socket (the local Playwright project). Never in a release build: the export fails if the bridge is in it.
NEXT_PUBLIC_BUILD_ID short git commit, else package version Build identifier the client sends as build= on the socket URL; shows up in the server's per-minute client_schema log line.
NEXT_PUBLIC_MAX_EMBED_IMAGE_BYTES 262144 Images are downscaled in the browser to this size before embedding.
NEXT_PUBLIC_MAX_TABS_PER_CLIENT 50 Tab cap in the UI.
NEXT_PUBLIC_DISCORD_INVITE_URL, NEXT_PUBLIC_GITHUB_REPO_URL project links Community links in the status strip.

Runtime settings (server processes)

These are read when the Next.js app, Hocuspocus or the retention script starts. Numbers are plain digits: a value such as 1G or 1e3 is refused with an env_int_invalid log line and the default is used. The full list, with defaults, is in lib/security/guardrail-config.ts; operational guidance is in the abuse guardrails runbook.

Variable Default Purpose
DB_PATH ./db.sqlite SQLite file. The Next.js app and Hocuspocus must use the same one.
HOCUS_PORT, HOCUS_HOST 1234, 0.0.0.0 Where Hocuspocus listens.
TRUSTED_PROXY off 1 only when every request comes through one reverse proxy that appends X-Forwarded-For.
HOCUS_ALLOWED_ORIGINS any Comma-separated browser origins allowed to open sockets.
MAX_DOC_SIZE_BYTES 1 MiB Per-document cap; production and make dev set 2 MiB. Playground and tab-list caps are separate.
WS_CONNECTION_LIMIT, WS_SOCKETS_PER_IP, MAX_WS_SOCKETS 10, 30, 5000 Connection limits.
DOC_CREATION_RATE_LIMIT, MAX_TOTAL_DOCUMENTS 10/h, 2000 Document creation limits.
RETENTION_DAYS, TOMBSTONE_RETENTION_DAYS 30, 90 Idle documents are deleted and tombstoned; tombstones outlive offline copies.
CLOSED_RETENTION_DAYS 7 Days a closed tab stays restorable; the daily retention purge (with PURGE_MODE=on) then deletes and tombstones it. Production sets it in the shared storageEnv.
CLOSED_DOCUMENTS_LIST on 0 turns off the Recently closed list (GET /api/documents/closed); restore keeps working.
HOCUS_LOGGER, HOCUS_THROTTLE, HOCUS_REDIS on, on, off Optional Hocuspocus extensions.
HOCUS_MIN_CLIENT_SCHEMA 0 Raises the minimum client schema above the built-in floor of 2 (SCHEMA_FLOOR); lower values have no effect. Never set it above the highest schema a shipped bundle sends (currently 2). See the schema rollout runbook.
HOCUS_REWRITE_LEGACY_HIGHLIGHTS off 1 rewrites stored legacy highlight colours (var(--tt-color-highlight-X)) to their token on load. Turn it on only once release N tabs are gone.
HOCUS_ALLOW_ISOLATED_TABS_DOCS off 1 in dev and tests only. The server refuses to start with it in production.
HOCUS_ROOT_ALLOWLIST log Root allowlist per document kind (tab lists tabs, meta; sandbox and Playground default; shares default, comments), checked on inserts and deletes. log applies and logs ws_root_rejected; on refuses with schema_rejected; off skips it. Run bun scripts/audit-doc-roots.ts on a copy of the database before on.
HOCUS_SHARES off Live-share server (not launched yet): on, readonly or off. Off means no shares table, share:* refused and the share endpoints answering 404. Limits and CORS origins are in lib/sharing/share-config.ts.
HOCUS_ASSETS off Images in live shares (needs HOCUS_SHARES): on, readonly (downloads only) or off. Files go in dirname(DB_PATH)/assets; off means the asset endpoints answer 404. Limits (MAX_ASSET_BYTES, MAX_SHARE_ASSET_BYTES, MAX_SHARE_ASSETS, MAX_ASSET_STORE_BYTES, ASSET_UPLOAD_BYTES_PER_IP_HOUR, ASSET_GETS_PER_IP_MINUTE) are in lib/sharing/share-config.ts. Do not turn it on until the asset sweep is deployed.
ASSET_UPLOADS_PER_IP_AT_ONCE 4 Share image uploads one address may run at once (the desktop sends 2).
ASSET_DOWNLOAD_BYTES_PER_IP_HOUR 1073741824 Share image bytes one address (IPv4, IPv6 /64) may download per hour.
ASSET_UNREFERENCED_GRACE_HOURS 24 The daily editor-purge run drops share image links and files unreferenced for this long (dry-run only counts).
SHARE_EXPIRY_DAYS 30 A live share ends this many days after its last stored edit (a share never stored ends after an hour). Hocus ends it when someone next connects, and the editor-purge asset sweep lets an expired share's image links age out, both with the same check. Set it only in the shared storageEnv in ecosystem.config.cjs (used by editor-hocus and editor-purge), never on Hocus alone, or the sweep and Hocus disagree on when a share has expired.
SHARE_REPORT_RATE_LIMIT, SHARE_REPORT_GLOBAL_LIMIT, SHARE_REPORTS_PER_SHARE 5/h, 100/h, 20 Abuse reports on shares (POST /api/shares/:id/report): per address (an IPv6 /48 shares 8×), across the server, and open reports stored per share. See the share takedown runbook.
SHARE_REPORT_CONTACT_DAYS 90 Days a report's optional contact address is kept.
SHARE_ALERT_SHARES_CREATED, SHARE_ALERT_FAILED_TOKENS, SHARE_ALERT_BANS, SHARE_ALERT_REPORTS 100, 300, 10, 1 Hourly operator alert thresholds (counts only); 0 turns one off.
SHARE_ALERT_ASSET_BYTES, SHARE_ALERT_QUOTA_REFUSALS, SHARE_ALERT_BLOCKED_HITS 1 GiB, 50, 1 Hourly alert thresholds for share images: bytes uploaded, uploads refused for quota, uploads of a blocked image (451); 0 turns one off.
SHARE_ALERT_WEBHOOK_URL unset Where alerts are POSTed as JSON besides the Hocus log (https, or a relay on localhost).
SHARE_WS_CONNECTIONS_PER_IP, SHARE_WS_PENDING_SECONDS 10, 15 Share connections per IP (apart from WS_CONNECTION_LIMIT); an attach holds a slot from its first check, freed when it connects, is refused, or after SHARE_WS_PENDING_SECONDS. More are refused as busy (the client retries), never banned.
SHARE_THROTTLE_MAX_ATTEMPTS, SHARE_THROTTLE_WINDOW_SECONDS, SHARE_THROTTLE_BAN_MINUTES 120, 60 s, 5 min Throttle for share documents, separate from the sandbox's HOCUS_THROTTLE_*, so readers of a share behind one address reconnecting after a restart aren't banned. Off with HOCUS_THROTTLE=0.
SHARE_ABUSE_LOG_WINDOW_SECONDS 60 Refused share HTTP requests (429, refused origins, errors) write one abuse line per address and event per window, with a count of the ones left out.
SHARE_DISK_MIN_FREE_BYTES, SHARE_DISK_WARN_FREE_PERCENT, SHARE_DISK_CHECK_SECONDS 1 GiB, 10%, 60 s Disk watch on the database volume: below the minimum, new shares answer 503 shares_full (existing ones keep working); below the percentage, the hourly alert fires (SHARE_ALERT_DISK_LOW, 1; 0 turns it off). A failing check keeps the last state, logs once per SHARE_ABUSE_LOG_WINDOW_SECONDS and fires SHARE_ALERT_DISK_CHECK_FAILED (1).
SHARE_ENDED_POLL_SECONDS 10 How soon Hocus closes connections to a share that share-admin ended.
HOCUS_DELETE_ROUTE off on serves DELETE /api/documents/:id from Hocuspocus too. Leave it off until the Traefik route moves (P4.1).

Deploying

Production runs as PM2 processes defined in ecosystem.config.cjs: Next.js on 3847, Hocuspocus on 3848, an optional Redis on 6380, and editor-purge, the daily retention purge. The servers sit behind a TLS-terminating reverse proxy.

Run the Deploy workflow to deploy. Once the one-time setup is done, the owner can also turn on automatic deploys, which deploy each push to main after its CI passes:

gh workflow run deploy.yml               # deploy the tip of main by hand
gh variable set AUTO_DEPLOY --body on    # deploy automatically after CI (off by default)

It SSHes to the host with a key that can only run scripts/deploy.sh. The script builds in a second checkout, restarts Hocus, swaps the build in, and puts the old build back if Next.js does not come up. Setup and rollback are in the deploy runbook.

Requirements:

  • TLS and the proxy. The collaboration URL must be wss://. Only the proxy may reach the app ports, because TRUSTED_PROXY=1 trusts its forwarding headers.
  • Service worker headers. The proxy must not change Cache-Control on /_next/static/service-worker/sw.js; it must stay public, max-age=0, must-revalidate.
  • Retention. editor-purge runs scripts/purge-retention.ts daily at 03:17 (host time). It is a dry run until PURGE_MODE is on; then it backs the database up before deleting. Rotate the PM2 logs; abuse events contain IP addresses.
  • Taking content down. Delete the document; never reset its stored state, because offline copies would push it back.

Release notes for each change, including deploy steps, are in the changelog.

Development

Command What it does
make dev Next.js and Hocuspocus together.
bun run build / bun run start Production build and server.
bun run build:desktop The desktop renderer: static export to out/ (built on Linux for releases).
bun run test Unit tests with bun test (the stress probe runs with test:stress).
bun run test:e2e Playwright against make dev (set CI= to reuse running servers).
bun run test:pwa Service worker and offline tests against a production build (PWA_BASE_URL).
bun run test:perf, test:soak, test:load Typing latency, long-running soak and the Yjs load harness.
bun run typecheck TypeScript for the app (including the Hocuspocus server) and the service worker.
bun run lint / bun run check ESLint (Next.js rules) and Biome.

Test layers, environments and CI notes: tests/TESTING.md.

Conventions:

  • Bun only (bun, bunx; never npm or npx).
  • Conventional Commits, enforced by commitlint.
  • Named exports; kebab-case files; PascalCase components with title-case acronyms.
  • shadcn/ui for new UI.
  • Every pull request adds an entry to CHANGELOG.md.

The full conventions are in AGENTS.md.

Stack: Bun · Next.js 16 (App Router, Turbopack) · React 19 · Tiptap 3 and ProseMirror · Yjs and Hocuspocus 4 · SQLite · Tailwind CSS 4 and Sass · TypeScript (strict) · Biome, ESLint, Husky and commitlint · bun test and Playwright.

CI (.github/workflows/ci.yml) runs on every pull request and push to main. One job runs bun audit, Biome, ESLint, the typecheck, unit tests and the production build; the other runs the Playwright Chromium suite. A nightly workflow (.github/workflows/nightly.yml) runs the service worker, soak and load layers twice a day (03:41 and 08:00 UTC).

Releases: tag main with vX.Y.Z and push the tag; .github/workflows/release.yml publishes the GitHub release, listing the pull requests merged since the previous tag and linking to CHANGELOG.md. Desktop releases use their own desktop-vX.Y.Z[-beta.N] tags: .github/workflows/release-desktop.yml builds the installers on three OSes in a job with no secrets, signs them in the owner-approved desktop-release environment (macOS notarized, Windows through Azure Artifact Signing; unsigned until the owner sets the signing credentials, see docs/operations/desktop-signing-runbook.md), and attests build provenance and an SBOM. A manual run is an unsigned dry run.

The @docs.plus/extension-* packages are refreshed daily (04:17 UTC) by .github/workflows/docs-plus-extensions.yml. It opens a pull request after a read-only verification job, which needs "Allow GitHub Actions to create and approve pull requests" in the repository's Actions settings. bun update never moves a package patched in patches/, so a newer release of one fails the daily run, and the run opens no pull request (no @docs.plus update either) until the patch is re-made on the new version with bun patch; the same goes for a patch that no longer applies. The run summary names each patch and the version it blocks.

Documentation

Document For
CHANGELOG.md What changed in each release, with deploy steps.
Abuse guardrails runbook Limits, abuse events, alerts, scheduled jobs, content takedown.
Share takedown runbook Abuse reports on live shares, alerts, share-admin, takedown, evidence and restore.
Schema rollout runbook Client version gate, ingress allowlist, release order, rollback rules, update banners.
Service worker runbook Caching rules, kill switch, deployment checks.
Deploy runbook The Deploy workflow, its one-time SSH setup, and rollback.
Analytics runbook GA4 setup, privacy settings, event list.
Desktop update feed runbook The desktop app's update feed host, channels, Linux manifest signing, staged rollout and halt.
Desktop release runbook Desktop versions, cadence, the release checklist, staged rollout, halt, hotfixes, security releases, key compromise, renewals.
Desktop beta program The 10 testers: onboarding, weekly tasks and check-ins, feedback without accounts, severity and replies.
SECURITY.md How to report a vulnerability privately.
Press kit The desktop app's blurb, name rules, facts, screenshots, and the claims table that maps each public claim to its test.
tests/TESTING.md Test layers and how to run them.
AGENTS.md Repository conventions and project facts.
docs/plans, docs/brainstorms Design history of the editor features.
Phase 2 status, docs/superpowers/specs Where the desktop and local-first work stands, and its design specs.

Desktop app

A desktop app for private, local documents (macOS, Windows and Linux) is in a private beta with a small group of testers; there is no public download yet. A download page with checksums comes with the public beta. Testers report problems from Help › Report a Problem… in the app, by email or GitHub (beta program); security problems go to SECURITY.md.

Community

TinyDocy is the validation testbed for docs.plus: features are proven here before they land in the production editor.

License

MIT. See LICENSE.

About

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages