A simple multi-user wiki.
- TypeScript 88.1%
- CSS 11%
- Dockerfile 0.6%
- HTML 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| client | ||
| server | ||
| shared | ||
| test | ||
| .dockerignore | ||
| .env.sample | ||
| .gitignore | ||
| compose.yml | ||
| Dockerfile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
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
:win 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 clientclient/src/markdown.ts: Markdown → HTML (markdown-it plus a wiki-link plugin) and HTML → Markdown (turndown), used by the visual editorclient/src/editor/: TipTap visual editor, CodeMirror Markdown/Vim editor, and[[autocomplete