No description
  • Python 36.9%
  • JavaScript 30.5%
  • TypeScript 29.3%
  • Rust 1.3%
  • Jinja 0.5%
  • Other 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Markus Walther cc0d661ea6
Some checks failed
CI / python (push) Has been cancelled
CI / web (push) Has been cancelled
CI / rust (push) Has been cancelled
CI / e2e (push) Has been cancelled
M34: visual query builder (Sparnatural); spike S21
Sparnatural 13.1.0 beside the SPARQL editor: Build a query on the explorer
page and Build query… in a graph view block. Configured with SHACL the
server generates from the predicate constraints, labelled in the reader's
language; its lookups go through the query proxy; the generated query is
expanded and rewritten into the SELECT convention. The builder's state is
kept per tab in sessionStorage only (Q95). Spec 0.74.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 20:31:27 +01:00
.claude plan M12-M14 2026-09-14 00:47:34 +02:00
.github/workflows M4 2026-09-11 17:20:17 +02:00
apps M34: visual query builder (Sparnatural); spike S21 2026-10-30 20:31:27 +01:00
deploy M27 step 2: the installer 2026-10-19 18:03:28 +02:00
docs M34: visual query builder (Sparnatural); spike S21 2026-10-30 20:31:27 +01:00
handbook M34: visual query builder (Sparnatural); spike S21 2026-10-30 20:31:27 +01:00
infra M31: quantities with QUDT units from extraction 2026-10-30 19:26:07 +01:00
installer Installer: a re-run with nothing changed writes nothing 2026-10-19 18:48:15 +02:00
ontology M32: CHEMINF descriptors for chemical structures; spike S20 2026-10-30 19:40:34 +01:00
packages M33: automated ontology migrations 2026-10-30 19:52:51 +01:00
patches M1 2026-09-11 15:03:45 +02:00
scripts Logo and icons: a light bulb with a graph filament 2026-10-30 15:21:45 +01:00
services stage 0 2026-09-11 14:42:58 +02:00
tests M34: visual query builder (Sparnatural); spike S21 2026-10-30 20:31:27 +01:00
.dockerignore M27 step 1: the web client in the Caddy image; the edge trusts an outer proxy (spec 0.56) 2026-10-19 17:54:49 +02:00
.editorconfig stage 0 2026-09-11 14:42:58 +02:00
.env.example M22: a portable decision protocol, so vLLM gets it too 2026-10-08 00:59:55 +02:00
.gitattributes M5 2026-09-11 21:31:33 +02:00
.gitignore M27 step 2: the installer 2026-10-19 18:03:28 +02:00
.python-version stage 0 2026-09-11 14:42:58 +02:00
bootstrap-wsl.sh stage 0 2026-09-11 14:42:58 +02:00
Cargo.lock stage 0 2026-09-11 14:42:58 +02:00
Cargo.toml stage 0 2026-09-11 14:42:58 +02:00
CLAUDE.md Spec 0.64: M30 export and import specified 2026-10-30 12:30:56 +01:00
FRONTEND_DESIGN.md M34: visual query builder (Sparnatural); spike S21 2026-10-30 20:31:27 +01:00
install.sh M27 step 2: the installer 2026-10-19 18:03:28 +02:00
justfile M33: automated ontology migrations 2026-10-30 19:52:51 +01:00
KSS-design-spec.md M34: visual query builder (Sparnatural); spike S21 2026-10-30 20:31:27 +01:00
LICENSE stage 0 2026-09-11 14:42:58 +02:00
package.json stage 0 2026-09-11 14:42:58 +02:00
pnpm-lock.yaml M34: visual query builder (Sparnatural); spike S21 2026-10-30 20:31:27 +01:00
pnpm-workspace.yaml M23: the handbook skeleton — Starlight in three languages, served by Caddy at /docs/ 2026-10-09 23:47:22 +02:00
pyproject.toml M30 step 4: export and import tools, the kss CLI and management commands 2026-10-30 13:12:57 +01:00
README.md M27 implemented: installer documentation in the handbook, RUN.md and README 2026-10-19 18:48:09 +02:00
RUN.md M32: CHEMINF descriptors for chemical structures; spike S20 2026-10-30 19:40:34 +01:00
uv.lock M30 step 4: export and import tools, the kss CLI and management commands 2026-10-30 13:12:57 +01:00

Knowledge Storage System (KSS)

The Knowledge Storage System is a self-hosted notebook for teams who keep technical notes and want those notes to become knowledge. People write pages out of blocks, together and offline if need be, and link those blocks to each other and to terms from established ontologies. KSS turns the pages into a knowledge graph that can be explored and queried. It runs on your own server with Docker Compose.

What it does

  • Writes pages together: blocks of text, code, diagrams, images, video, files, web pages, checklists, chemistry and graph views, edited by several people at once and offline, merged without conflicts when they reconnect.
  • Links knowledge: a block can mention, use or answer another block, a page, a concept of the workspace or a term from ontologies such as ChEBI; a relation rail draws the links beside the page.
  • Builds a knowledge graph from every page, which the graph explorer shows and SPARQL queries.
  • Proposes links: a language model of your choice suggests entities and relations, limited by the ontologies and their shapes; people review the suggestions before they enter the graph.
  • Keeps web pages: a web page block browses a page through the server and can freeze it into a snapshot that stays as it was.
  • Organises and moves pages: folders, links between pages, and page archives to export and import.
  • Is administered in the browser: workspace members and policies, and for administrators the server settings, user accounts and a history of changes.

Three rules shape the design:

  • Your notes stay on your server. The language model is one you run or choose; a workspace sends page content to a model outside your network only if its owner allows that.
  • The model proposes, people decide. Nothing the model suggests enters the graph without review, and ontology terms always come from the ontologies themselves.
  • Other sites' pages are kept apart. Browsed web pages run on a host name of their own, with no access to your session or your data.

The interface and the handbook are available in English, German and Spanish.

Requirements

  • Linux with Docker and the Compose plugin, version 2.24 or newer, and git
  • just, the command runner the maintenance recipes use (recommended)
  • Two DNS names for the server: one for KSS, one for browsed web pages (for example kss.example.org and web.example.org)
  • Optional: an OpenAI-compatible language model endpoint (vLLM or Ollama) for proposing links, and a Keycloak realm for single sign-on

Nothing else is installed on the host: the installer runs in a container, and the images build KSS, its web client and the handbook.

Installation

git clone ssh://git@fj16.bastler.space:223/markusw/kss.git
cd kss
git checkout release-1.1        # or a newer release tag
./install.sh

The installer asks for:

  • the address of KSS and of the web page origin;
  • the reverse proxy: KSS's own Caddy with automatic HTTPS on ports 80 and 443, or your existing Caddy, Traefik, nginx, Apache, HAProxy, Nginx Proxy Manager, Envoy, Kong, Cloudflare Tunnel or lighttpd, for which it writes the configuration;
  • the language model's address, model and key (optional);
  • Keycloak sign-in (optional);
  • whether to start now.

It writes .env with new secrets, the compose override, the sync key pair and the proxy configuration, then builds and starts the containers and asks for the first administrator. Re-running it is safe: it shows the current values, keeps the secrets and the lines you added to .env, and backs up every file it changes. To install without questions:

# answers.toml: each key is the name of a question
public_url = "https://kss.example.org"
web_url = "https://web.example.org"
proxy_mode = "A"
acme_email = "ops@example.org"
start = true
./install.sh --answers answers.toml

The handbook's installation page explains every question, the proxy modes and what a proxy must allow.

Running

When the installer has started KSS, check it and sign in:

curl https://kss.example.org/api/health    # {"ok": true, "db": true, "graphService": true}

Open https://kss.example.org and sign in with the administrator account. Then:

  1. Under Workspaces, type a New workspace name and click Create. This loads the ontologies into the workspace's graph in the background.
  2. In the workspace, Create page and start writing; New folder groups pages.
  3. Give people access: through Keycloak, or as local accounts under Server settings → Users, then as members on the workspace's Settings page.

Day-to-day commands:

Command What it does
just prod-up build and (re)start the stack after a change to .env or an upgrade
just install re-run the installer to change the configuration
just logs [service] follow the logs
just manage <command> run a Django management command, e.g. createsuperuser
just chebi-structures once: build the ChEBI index that identifies drawn chemical structures
just proxy-check validate the generated proxy configuration with the proxy's own image

just --list shows every recipe. Back up the database, the uploaded files, .env and infra/keys/ as the handbook's backup page describes.

Documentation

The handbook covers using and running KSS in English, German and Spanish. Every installation serves it at /docs/ (the Handbook link in the app bar); the sources are in handbook/, and just docs-dev serves them on their own.

Development

The development stack runs on http://localhost:8080; the full procedure is in RUN.md. It needs Docker with Compose, just, uv, pnpm (Node ≥ 22), Rust ≥ 1.85 and openssl; on WSL Ubuntu, bootstrap-wsl.sh installs the user-space tools.

just deps              # uv sync, pnpm install, cargo fetch
just dev               # dev keys and .env, then build and start the stack
just seed              # demo workspace: alice (owner), bob (editor), carol (viewer); password: password
just dev-mockllm       # the deterministic mock language model (needed by some e2e specs)
pnpm --filter web dev  # Vite dev server on http://localhost:5173 (proxies /api and /sync)
just test              # pytest, vitest, cargo test, the handbook generator
just lint              # ruff + pyright, eslint + tsc, fmt + clippy
just e2e               # Playwright against the running stack
Layer Technology
CRDT / sync Loro, Loro Protocol over WebSocket; a Rust sync server (axum, tokio, sqlx)
Web client React, TypeScript and Vite (PWA), ProseMirror, CodeMirror 6, Cytoscape.js, Ketcher, RDKit.js
App server Django and Django Ninja; jobs with Procrastinate
Graph FastAPI and pyoxigraph, one Oxigraph store per workspace
Database PostgreSQL 16
Edge Caddy

Licence

Copyright © 2026 Markus Walther

The Knowledge Storage System is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed without any warranty. If you run a modified version as a network service, the licence requires you to offer its users the modified source.