How hylmithecoder/private-wiki works
This is a private wiki with a Next.js dashboard and a Rust service that serves its HTTP API and MCP interface. The main browser workflow is to browse or search wiki pages, open a page, and—after login—edit it; the dashboard also exposes history, tags, recent changes, graph navigation, and print/export views. The Rust service owns request routing, write authorization, and wiki operations. Sampled source confirms startup, session handling, and some client API usage; unsampled feature wiring is shown only at the directory level.
Main entry points: Shell.tsx App shell · api.ts API client · main.rs Service startup · http.rs HTTP router
Components 20
Wiki dashboard
- Dashboard routes
src/app - App shell
src/components/Shell.tsx - API client
src/lib/api.ts - Session state
src/lib/session.ts
Wiki features
- Browse pages
src/views/WikiView.tsx - Search pages
src/views/SearchView.tsx - Edit pages
src/views/EditView.tsx - History and diffs
src/views/HistoryView.tsx - Tags and recent
src/views - Wiki graph
src/views/GraphView.tsx - Print and export
src/views/LinedPrintView.tsx
Wiki service
- HTTP router
service/src/http.rs - Write authorization
service/src/auth.rs - Wiki operations
service/src/wiki.rs - Wiki database
service/src/wiki.rs - Service startup
service/src/main.rs
Interfaces
- MCP tools
service/src/mcp.rs - HTTP MCP transport
service/src/mcp_http.rs
Other components
- Visitor
- Claude client
Connections 30
- Visitor → Dashboard routes: opens
- Dashboard routes → App shell: renders
- App shell → Browse pages: routes to
- App shell → Search pages: routes to
- App shell → Edit pages: routes to
- App shell → History and diffs: routes to
- App shell → Tags and recent: routes to
- App shell → Wiki graph: routes to
- App shell → Print and export: routes to
- Browse pages → API client: requests
- Search pages → API client: searches via
- Edit pages → API client: writes via
- History and diffs → API client: requests
- Tags and recent → API client: requests
- Wiki graph → API client: requests
- Print and export → API client: requests
- Session state → API client: checks session
- API client → HTTP router: HTTP requests
- Service startup → HTTP router: starts
- Service startup → Write authorization: configures
- HTTP router → Write authorization: guards writes
- Write authorization → Wiki operations: validates session
- HTTP router → Wiki operations: dispatches operations
- Wiki operations → Wiki database: reads and writes
- Service startup → MCP tools: starts stdio
- Service startup → HTTP MCP transport: mounts optionally
- HTTP MCP transport → MCP tools: dispatches
- MCP tools → Wiki operations: invokes operations
- Claude client → MCP tools: uses stdio
- Claude client → HTTP MCP transport: uses HTTP