Duck Ramen Wiki — food, recipes, travel. Markdown synced with the Lichen wiki.
README.md

Duck Ramen Wiki #

The Food Wiki, rebooted on Lichen — an ATProto-powered wiki. Content is markdown, checked into this repo, and synced with the Lichen wiki, which stores notes as ATProto records on our own PDS.

The name dates from when this project started, right around a trip to Victoria and making duck ramen (ramen for breakfast).

Wiki #

  • Live wiki: https://lichen.wiki/@foodwiki.bmann.ca/foodwiki/
  • ATProto account: @foodwiki.bmann.ca — did:plc:kwclrfytscd4udqzmsv42rj3
  • PDS: shimeji.us-east.host.bsky.network (Bluesky-hosted)
  • Wiki record: at://did:plc:kwclrfytscd4udqzmsv42rj3/wiki.lichen.wiki/foodwiki — public, English
  • Description: Food, ingredients, recipes, shopping lists and travel adventures

The account password lives in .env (FOODWIKI_ATPROTO_PASSWORD) — gitignored, never committed. Copy .env.example to .env and fill it in on a fresh checkout. Canonical secret storage is Bitwarden (BYOC vault, vault.bringyourown.computer): the password is a secure note config/atproto/foodwiki.bmann.ca, mirrored to ~/.config/vault/atproto/foodwiki.bmann.ca (0600) for scripted access; .env is the local working copy the sync tooling reads.

Repo layout #

  • notes/ — one markdown file per wiki note (filename = note slug). Frontmatter carries the Lichen URLs / AT-URIs used by the sync: title, created, lichenNoteUri, lichenWikiUri, lichenUrl, and lichenLatestRevisionUri (the head revision of the note, used to detect remote changes).
  • scripts/sync-lichen.mjs — the sync tool (see below); package.json + package-lock.json pin its Node dependencies.
  • README.md — this file.
  • .env / .env.example — account credentials (never commit .env).

Sync model #

scripts/sync-lichen.mjs implements both directions on Lichen's XRPC surface (node scripts/sync-lichen.mjs <pull|push> [--delay ms] [--dry-run]). Markdown files in notes/ are the source of truth; Lichen records are the live wiki.

  • Pull (Lichen → repo): wiki.lichen.listNotes lists the wiki's notes with each one's latestRevisionUri (cursor-paged, public — no auth). The script compares those against the lichenLatestRevisionUri frontmatter key and calls wiki.lichen.getNote only for notes whose head changed, overlaying the body into notes/. Local-only notes are reported, never deleted.
  • Push (repo → Lichen): a session signed with FOODWIKI_ATPROTO_PASSWORD from .env writes to the account's PDS. New notes get a wiki.lichen.note record (slug + title + wikiRef) plus an initial full-text wiki.lichen.noteRevision; changed notes get a new revision parented on the current head (the parentRevision guard — a stale parent is rejected with 409, so nothing forks). Title changes update the note record (title is a field on the record, not the body). After each push the script stamps lichenNoteUri / lichenLatestRevisionUri / lichenUrl back into the file's frontmatter.
  • Rate limits: Lichen throttles around 120 requests/min — the script defaults to 350 ms between calls (--delay to tune).

First sync (2026-10-04): all 21 notes were created and pushed; Home already existed as the wiki's UI-created home note, so its pre-existing revision was preserved in the revision chain and the repo content was added as a new head. A pull immediately after confirmed 21/21 notes in sync with zero drift.

Source / hosting #

  • Forge: Tangled — repo created by the @foodwiki.bmann.ca ATProto account (web URL: tangled.org/foodwiki.bmann.ca/foodwiki).
  • Remote: git@tangled.org:did:plc:ah4rz7t7mpvmvtrghfc22sb6 (Tangled namespaces repos by its internal account DID)
  • SSH key: ~/.ssh/id_ed25519_foodwiki (private key on disk, registered as "Blue Dragon" on the account's Tangled keys page). The repo uses a local core.sshCommand — ssh -i ~/.ssh/id_ed25519_foodwiki -o IdentitiesOnly=yes -o IdentityAgent=none — because the macOS SSH agent otherwise offers other keys (e.g. @bmann.ca) before this one. Managed copy in Bitwarden: sshKey item config/foodwiki/tangled-ssh (restore from there on a fresh machine).