MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 50s
Phase 1 of the collaboration plan (server side):
- internal/collab: block tree with parent IDs and fractional order keys,
operations with conflict rules (version check, block leases, conflict
copies instead of lost text, restore on late edits, cycle checks),
in-memory leases/sessions and long-poll notifier.
- Storage: per-note lock + transaction, append-only effect log (doc_ops),
idempotent results per opId (doc_op_results), snapshot, log paging,
central DocRole. Old flat block data is converted to the tree.
- The existing whole-document save (PUT/PATCH) runs as an adapter through
the same engine, so the current editor keeps working and writes to the log.
- API: GET /docs/{id}/snapshot, POST /docs/{id}/sync, GET /docs/{id}/changes
(long poll), POST /docs/{id}/leave; DOC_SEQ poke for WebSocket/SSE rooms.
- Backend accepts editor (write) shares for notes and folders; the forced
read-only migration is gone. The share dialog still offers read only.
- Tests: conflict matrix, order keys, leases, storage adapter round trip,
idempotency, API protocol incl. long poll, and a randomized simulation
(4 clients, lost/duplicated requests and responses, offline phases,
lease expiry) checking convergence, no lost text and exactly-once results.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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_versionund 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.