No description
Find a file
Markus Walther de7b8f6c23
Some checks failed
CI / backend (push) Has been cancelled
CI / frontend (push) Has been cancelled
docker compose fix
2026-06-28 23:15:36 +00:00
.devcontainer docker compose fix 2026-06-28 23:15:36 +00:00
.forgejo/workflows init 2026-06-28 17:42:17 +02:00
.github docker compose fix 2026-06-28 23:15:36 +00:00
backend init 2026-06-28 17:42:17 +02:00
frontend init 2026-06-28 17:42:17 +02:00
docker-compose.yaml docker compose fix 2026-06-28 23:15:36 +00:00
README.md init 2026-06-28 17:42:17 +02:00
specification_sheet.txt init 2026-06-28 17:42:17 +02:00

Semflow — Semantic Multiuser Wiki

Local-first, collaborative rich-text wiki with an integrated Django Semantic Graph Sync Engine.

Stack

Layer Technology
Frontend TypeScript · BlockSuite · Yjs / y-websocket
Backend Python 3.11 · Django 5 · Django Channels · Daphne
Real-time ypy-websocket (CRDT bridge) · Redis (Channel Layer)
Semantics rdflib · Oxigraph (SPARQL 1.1 Triple Store)
Auth Keycloak · mozilla-django-oidc · PyJWT
CI/CD Forgejo

Quick start

# 1. Bring up all services
docker compose up -d

# 2. Apply Django migrations
docker compose exec backend python manage.py migrate

# 3. Create a superuser (optional)
docker compose exec backend python manage.py createsuperuser

# 4. Open the frontend dev server
cd frontend && npm install && npm run dev

The editor is served at http://localhost:5173.
Keycloak admin console: http://localhost:8080 (admin / admin).
Oxigraph SPARQL endpoint: http://localhost:7878/query.

Backend development (without Docker)

cd backend
cp .env.example .env          # fill in your values
uv sync
uv run python manage.py migrate
uv run python manage.py runserver

Architecture

Browser (BlockSuite + Yjs)
      │  ws://…/ws/wiki/<room>?auth_token=<JWT>
      ▼
Django Channels (Daphne / ASGI)
  JWTAuthMiddleware  →  verifies Keycloak token
  WikiSyncConsumer   →  bridges Channels ↔ ypy-websocket YRoom
      │  Y.Doc observer
      ▼
graph_sync.process_and_export_graph()
  rdflib Graph  →  HTTP PUT  →  Oxigraph (Named Graph per room)

Environment variables

See backend/.env.example for all required settings.