OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-note commits / b10b6d9

README: rewrite stale install/deploy/OTA for pgh-managed reality
The install/run/deploy story was all pre-pgh: - Install: drop the obsolete pear:// dump + hand-rolled pgh wrapper + wrong keys (p84snz…/dpjhh…/1290…); replace with `pgh app install hypernote` + `pgh app restart hypernote`. App is content-addressed pgh (runtime bare). - Deploy: the CI does NOT run `pear stage/release/seed` — it runs copy-deps + `pgh publish`. Document the real pipeline + that OTA is pgh app update and the git source P2P-mirrors to sister backends. - Bare runtime link fixed (nicknisi/bare → holepunchto/bare). - SSR: now actually wired for public pages (was "prepared, not yet"). - Multi-writer: clarify it's async CRDT sync, NOT live co-editing (no WS, no presence; writer-admission experimental/unauthenticated). - Test count 17→25; "150+ assertions" → real file count. Verified against code: @noble IS served locally from node_modules via the /vendor route (HTTP 200) so the "no CDN" claim stands; only identity.js code comments are stale (separate fix). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
b10b6d9a2a413eba76a564b7fc0d4eb95feb4637
by plankatron <fleeky@gmail.com> · 2026-06-23T19:53:57.000Z

Changed files (1) +50 -38

README.md +50 -38
……@@ -24,46 +24,34 @@ Built on the [Holepunch](https://holepunch.to) stack: Hypercore, Hyperdrive, Hyp
2424
2525## Install
2626
27### From pear-git (P2P)
27### As a pgh app (recommended)
28
29Hypernote is distributed as a content-addressed **pgh** app (Bare runtime):
2830
2931```bash
30# 1. Install pear-git (if you don't have pgh)
31npm install -g pear
32pear dump pear://dpjhhzqgm6wqxc9nmw1y3m7eaptfufr6o5p7r4xegjghju8mkweo ~/.local/share/pear-git
33cat > ~/.local/bin/pgh << 'EOF'
34#!/bin/sh
35exec bare ~/.local/share/pear-git/index.js pgh "$@"
36EOF
37chmod +x ~/.local/bin/pgh
38
39# 2. Clone hypernote
40pgh repo clone punch://1290678432f9573b463d4472a9426c5408b34579bf8576e26957a1321fd5e836/hyper-note
41
42# 3. Install and run
43cd hyper-note
44npm install
45bare hypernote-server.js serve
32pgh app install hypernote # resolves pgh://1dd36bdf…/hypernote and fetches the release
33pgh app restart hypernote # canonical start/restart — and the day-to-day management command
4634```
4735
36The launcher bakes in the production args
37(`serve 4040 --network --prefix /hypernote --storage ${HOME}/.config/hypernote/server-data`),
38so you never pass them by hand. The server self-updates over pgh content-addressed OTA on each
39start (pass `--no-updates` to disable). Storage lives at `~/.config/hypernote/server-data` and is
40reused across reinstalls and updates.
41
4842### System Dependencies
4943
50- **[Bare runtime](https://github.com/nicknisi/bare)** -- JavaScript runtime for P2P applications
44- **[Bare runtime](https://github.com/holepunchto/bare)** -- JavaScript runtime for P2P applications
5145- **ffmpeg** -- required for HLS video transcoding (`apt install ffmpeg` / `brew install ffmpeg`)
5246
53### From local checkout
47### From a local checkout (development)
5448
5549```bash
5650git clone <repo-url> hyper-note
5751cd hyper-note
5852npm install
59bare hypernote-server.js serve
60```
61
62### As a Pear app (auto-updates)
63
64```bash
65pgh app install pear://p84snzmpxca3ii7nfdqjbd5wxjdqzccpoj9xjwzz96wpe4m557zo --name hypernote
66hypernote serve
53# dev run (add --storage <path> for a non-default data dir):
54bare hypernote-server.js serve 4040 --network --prefix /hypernote
6755```
6856
6957## Quick Start
……@@ -182,7 +170,9 @@ CLI (bin/hn) AuthManager — multi-method auth
182170- **CLI** (`bin/hn`) — calls HTTP API with bearer token auth
183171- **REST API** — JSON endpoints at `/api/*`
184172
185**SSR foundation** (prepared, not yet wired as default):
173**Server-side rendering (SSR)** — public pages are server-rendered (live; see `lib/routes/web.js`
174`renderPage`). Public user pages, notebook pages, note pages and 404s are served as SSR HTML;
175the SPA takes over for authenticated editing:
186176- `lib/views/*-ui.js` — server-rendered HTML pages
187177- `lib/page-layout.js` — shared page wrapper
188178- `lib/markdown.js` — server-side markdown renderer
……@@ -234,7 +224,15 @@ Only announced notebooks are discoverable. The registry (users, tokens, permissi
234224
235225### Multi-Writer / Device Linking
236226
237Hypernote supports linking multiple instances via [Autobase](https://github.com/holepunchto/autobase) for multi-device and multi-user collaboration.
227Hypernote links multiple instances via [Autobase](https://github.com/holepunchto/autobase) so devices/users share a replicated registry and shared notebooks.
228
229> **Scope — this is async multi-writer sync, not live co-editing.** Shared notes use a Yjs CRDT
230> stored in a per-notebook Autobase and replicated P2P, so concurrent edits from different
231> instances merge conflict-free *eventually*. There is **no** real-time transport (no WebSocket),
232> **no** presence/awareness (no live cursors), and the browser editor does not drive Yjs directly
233> — the server synthesizes the CRDT from saved note content. The `/shared-notes/:id/yjs` endpoint
234> and the writer-admission path are **experimental** and not yet hardened (writer admission is
235> currently unauthenticated). Treat shared notebooks as eventually-consistent multi-device sync.
238236
239237**How it works:**
2402381. An admin on instance A creates a link invite (`POST /api/multiwriter/link`) and gets an invite hex
……@@ -345,22 +343,36 @@ See [docs/api.md](docs/api.md) for the complete REST API reference.
345343
346344### pear-git CI/CD
347345
348Hypernote deploys automatically via pear-git:
346Hypernote deploys automatically through the pear-git CI/CD pipeline:
349347
350348```bash
351git push pear master # triggers auto-deploy
352pgh deploy log hyper-note # check deploy status
349git push pear master # triggers auto-deploy (post-receive hook)
350pgh deploy log hyper-note # NB: git repo is "hyper-note"; the pgh app name is "hypernote"
353351```
354352
355The CI pipeline (`.pear-git/ci.yaml`) installs dependencies, then pear-git runs `pear stage` -> `pear release` -> `pear seed`.
353The CI pipeline (`.pear-git/ci.yaml`) has two steps: `copy-deps` (copies the pre-built
354`node_modules`, preserving the postinstall lib0 patch and bare native prebuilds) then
355`pgh publish` (pushes a content-addressed release to the registry). There is **no**
356`pear stage` / `pear release` / `pear seed` — that is the old paradigm and must never be
357run manually.
356358
357### Manual
359Once published, OTA reaches running instances automatically (each instance shells out to a
360detached `pgh app update hypernote` on start). The git **source** also replicates to sister
361backends (e.g. stortron) over the pear-git P2P mirror — no direct push to those machines is
362needed.
363
364### Running it
365
366Day-to-day, hypernote is a pgh-managed service:
358367
359368```bash
360NODE_OPTIONS="--max-old-space-size=4096" bare hypernote-server.js serve 4040 --network
369pgh app restart hypernote # start/restart (args + storage come from the install manifest)
370pgh app status hypernote # running state, version, autostart
371pgh app autostart hypernote on
361372```
362373
363For production, run in tmux or as a systemd service.
374It is served behind a reverse proxy at `https://7rnx.net/hypernote/`. On tabertron the
375operator scripts `hypercore-up` / `hypercore-down` drive it via `pgh app start` / `pgh app stop`.
364376
365377## Backup & Restore
366378
……@@ -417,7 +429,7 @@ node scripts/restore-direct.js ~/hypernote-backups/latest
417429## Testing
418430
419431```bash
420# Run all tests (150+ assertions)
432# Run all tests (25 brittle test files under test/unit/)
421433npm test
422434
423435# Run specific test
……@@ -526,7 +538,7 @@ hypernote/
526538 jsuites.js # jSuites dependency (local)
527539 fullcalendar.min.js # calendar editor (local)
528540 test/
529 unit/ # 17 test files (brittle)
541 unit/ # 25 test files (brittle)
530542 helpers/
531543 fixtures.js # test helpers
532544 docs/