Wiki System Development
A Wiki is a hypertext knowledge base with open (or restricted) editing. Unlike a knowledge base with a pronounced hierarchy, a Wiki is built on cross-references between pages. Key features: [[WikiLinks]] between articles, change history with diff, discussion system, and flexible editing permissions.
Navigation and Structure
Wiki allows several navigation methods:
- Hierarchy — traditional page tree
- Graph — pages linked by references, visualization as knowledge graph
- Tags — cross-cutting classification
- Search — primary navigation tool
For each Wiki page, backlinks are automatically constructed — a list of pages that reference the current one. This is key for understanding conceptual relationships.
Markup and Syntax
Standard variant — Markdown with extensions:
-
[[Page Name]]— Wiki-link, auto-create page if missing -
[[Page|Display Text]]— link with alias -
![[Page]]— embed content of another page (transclusion) -
#Tag— tags inline in text
Wiki-link parsing: regex traverses text, finds [[...]], checks page existence, generates <a> with existing link or wiki-link-new class for non-existent.
Change History and Diff
Each save creates a revision. Diff displays line-by-line: Myers diff algorithm or diff library (npm):
import { diffLines } from 'diff';
const changes = diffLines(oldContent, newContent);
changes.forEach(part => {
if (part.added) console.log('[+]', part.value);
if (part.removed) console.log('[-]', part.value);
});
Rollback — restore any version creating new revision (history not deleted).
Conflict Resolution in Concurrent Editing
If two users edit one page simultaneously:
- Pessimistic locking — page locked when editor opens (simple but inconvenient)
- OT (Operational Transformation) — real-time change merge algorithm (Yjs, ShareDB)
- Conflict on save — last saver "wins", first shown conflict diff
For most corporate Wikis, warning "page being edited" + merge on conflict suffices.
Access Control
Access control models:
- Public (Wikipedia-model): all read, registered edit, vandalism rollback via history
- Corporate: employees only, some sections — specific teams only
- Mixed: public sections + closed for internal processes
Page Templates
For recurring article types — templates: "Project Description", "Meeting", "Postmortem", "Guide". Template chosen on page creation, structure pre-filled.
Integrations
- Git-backend — pages stored in Git repo (Markdown files). History = Git commits. Edit via web or directly in Git.
- Slack/Telegram — notifications on watched page changes
- Confluence API — migrate existing base
Timeline
MVP (pages with Wiki-links, history, search, basic permissions): 6–8 weeks. Full Wiki with graph-navigation, templates, OT-editing, integrations: 3–4 months.







