Files
MindSift/Doku
sandrodachandClaude Opus 5.5 8b7a53daab
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m16s
feat(notes): push, long polling and fallback detection for note sync
Phase 4 of the collaboration plan:
- The sync engine listens for DOC_SEQ in the note's realtime room and syncs
  right away. Without WebSocket/SSE it long-polls /docs/{id}/changes (25 s);
  after three failures it falls back to polling every 3 s and retries long
  polling when the browser comes back online.
- With push or long polling the engine only syncs every 7 s while holding
  leases (renewal), otherwise every 30 s as a safety net. Focusing a block
  announces its lease immediately (otherwise it could take up to 30 s).
- Realtime connection: SSE counts as connected only after its first event;
  a stream that stays silent for 5 s (buffering proxy) switches SSE off for
  the tab. App-level PING/PONG detects WebSockets that are accepted but
  forward nothing and switches to SSE after 35 s.
- The editor shows the active channel for shared notes.
- Tests: engine channel tests (push, heartbeat, lease on focus, long
  polling, interval fallback, switching), realtime fallback tests with fake
  WebSocket/EventSource, Go tests for PONG and DOC_SEQ delivery, and
  e2e/channels.e2e.mjs measuring latency behind six simulated proxy setups
  (0.2-0.3 s on all live channels, ~3 s with plain polling).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:10:29 +01:00
..

MindSift Technische Dokumentation

Referenz für Entwickler und Administratoren. Alle Angaben wurden gegen den Code im Branch dev geprüft (Stand Oktober 2026). Abweichungen zwischen Doku und Code melde bitte als Fehler in flaws.md.

Inhalt

Dokument Inhalt
architecture.md Aufbau, Technologie-Stack, Start, Konfiguration, Build
database.md SQLite-Schema, Migrationen, Datenmodell
api/rest.md Alle REST-Endpunkte
api/websocket.md Echtzeit über WebSocket und SSE, Ereignisse
modules/triage.md Schnellerfassung und Triage
modules/tasks.md Aufgaben, Kanban, Alarme
modules/workspace.md Outliner-Notizen, Ordner, Tags
modules/lists.md Geteilte Listen
sharing-and-permissions.md Rollen, Gruppen, Freigaben
reverse-proxy.md Nginx, Traefik, Caddy, Cloudflare
theming.md Themes und Design-Variablen
flaws.md Bekannte Schwachstellen und technische Schulden
plans/kollaboration-notizen.md Plan: gemeinsames Bearbeiten von Notizen

Überblick in 60 Sekunden

  • Ein Go-Binary liefert REST-API, WebSocket/SSE und das eingebettete React-Frontend (go:embed). Es gibt genau einen Container und eine SQLite-Datei (/data/mindsift.db).
  • Datenhaltung: vollständig in SQLite. Es gibt keine .md-Dateien auf der Platte; Markdown wird bei Bedarf aus den Blöcken erzeugt (documents.markdown_cache, Export als .md).
  • Echtzeit: ein Hub mit Räumen und Benutzer-Kanälen. Verteilt werden Ereignisse nach REST-Änderungen. Es gibt keine CRDTs, Sperren oder Cursor-Presence.
  • Auth: JWT (HS256, 30 Tage) mit token_version und Sperrliste, dazu API-Keys (mindsift_sec_…) für Webhooks.
  • Freigaben: Aufgabenlisten und geteilte Listen mit Rolle Bearbeiter oder Leser, Notizen und Ordner nur lesend.

Entwickeln

# Backend (Go 1.23)
go vet ./... && go test ./...

# Frontend (Node 22)
cd frontend && npm ci && npx tsc --noEmit && npm run test:run && npm run build

Das Frontend wird für das Binary nach cmd/server/dist gebaut (siehe Dockerfile). Die CI läuft unter .gitea/workflows/build-and-publish.yaml.