A simple multi-user wiki.
  • TypeScript 88.1%
  • CSS 11%
  • Dockerfile 0.6%
  • HTML 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Adam Macumber dfe78e8b5e Add Dockerfile
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 09:51:52 -04:00
client Paste or drop images into the editors to upload them 2026-10-03 09:35:41 -04:00
server Paste or drop images into the editors to upload them 2026-10-03 09:35:41 -04:00
shared Initial implementation. 2026-10-03 09:35:41 -04:00
test Paste or drop images into the editors to upload them 2026-10-03 09:35:41 -04:00
.dockerignore Add Dockerfile 2026-10-03 09:51:52 -04:00
.env.sample Read compose settings from .env; add .env.sample 2026-10-03 09:44:56 -04:00
.gitignore Read compose settings from .env; add .env.sample 2026-10-03 09:44:56 -04:00
compose.yml Read compose settings from .env; add .env.sample 2026-10-03 09:44:56 -04:00
Dockerfile Add Dockerfile 2026-10-03 09:51:52 -04:00
package-lock.json Initial implementation. 2026-10-03 09:35:41 -04:00
package.json Initial implementation. 2026-10-03 09:35:41 -04:00
README.md Paste or drop images into the editors to upload them 2026-10-03 09:35:41 -04:00
tsconfig.json Initial implementation. 2026-10-03 09:35:41 -04:00
vite.config.ts Initial implementation. 2026-10-03 09:35:41 -04:00

Group Wiki

A small multi-user wiki. Pages are stored as Markdown and can be edited in a visual (WYSIWYG) editor or a Markdown editor with optional Vim key bindings. Type [[ in either editor to link to another page, with title autocomplete.

Running

Requires Node 24+ (uses the built-in node:sqlite and TypeScript type stripping).

npm install
npm run build   # build the client into dist/
npm start       # http://localhost:3000

During development, npm run dev runs the API server (port 3000, auto-restarting) and the Vite dev server (port 5173, proxying /api).

npm test runs the API and Markdown tests. npm run typecheck runs tsc.

Configuration (environment variables)

Variable Default Meaning
PORT 3000 HTTP port
WIKI_DB data/wiki.db SQLite database file
WIKI_OPEN_REGISTRATION true Anyone can create an account. When false, only the first account can be created.
WIKI_PUBLIC_READ false Logged-out visitors can read pages
WIKI_SECURE_COOKIES false Set to true when serving over HTTPS

Features

  • Links: [[Page Title]] or [[Page Title|shown text]]. Links to pages that don't exist yet are red; clicking one creates the page. Each page lists the pages that link to it.
  • Editors: switch between Visual and Markdown at any time. Each user's choice (and Vim on/off) is remembered. Save with Ctrl+S, or :w in Vim mode.
  • Collaboration: every save is a revision (history, diffs, restore). The editor shows who else is editing the page. If someone saves first, you get a diff and choose whether to overwrite their version, load theirs, or keep editing.
  • Images: paste or drop an image into either editor to upload it. Images (PNG, JPEG, GIF, WebP; up to 10 MB) are stored in the database and are readable by whoever can read pages.
  • Rename updates [[links]] on every page that links to the renamed page.
  • Search: full-text search (SQLite FTS5), plus jump-to-page from the header.

Layout

  • server/: Express API (app.ts), SQLite schema (db.ts), and sessions/password hashing (auth.ts)
  • shared/wikilinks.ts: link syntax, slugs, and link extraction/rewriting, used by both server and client
  • client/src/markdown.ts: Markdown → HTML (markdown-it plus a wiki-link plugin) and HTML → Markdown (turndown), used by the visual editor
  • client/src/editor/: TipTap visual editor, CodeMirror Markdown/Vim editor, and [[ autocomplete