Add Rails backend: accounts via magic link, server documents, sharing

The app becomes a Rails 8 application; the Vue frontend moves to
app/frontend and is served through vite_rails.

- Without an account documents stay in the browser (IndexedDB). Sign-in
  is by magic link or the 6-digit code from the same mail; afterwards
  local documents can be uploaded into the account.
- Server documents (/d/<id>) with versioned saves and a single-editor
  lock per browser tab; others see them read-only and follow by polling.
- Sharing via link (works without an account) and via e-mail invitation,
  roles viewer/editor; the owner manages links and people.
- Store gains a read-only mode that blocks all content changes.
- Solid Queue, Cache and Cable share the one PostgreSQL database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
wkh
2026-09-28 20:09:06 +02:00
co-authored by Claude Opus 5.5
parent 5a0f1fcd78
commit e14bada114
190 changed files with 6077 additions and 722 deletions
+17
View File
@@ -621,6 +621,23 @@ wie jede andere Änderung verteilt. Viewer können keine Makros starten.
---
## Umsetzungsstand (Branch `with-server`, 2026-09-28)
Umgesetzt sind Phasen 1–3 in angepasster Form; Live-Sync (Phase 4) fehlt noch.
| Thema | Umsetzung | Abweichung vom Konzept |
| --- | --- | --- |
| Anonym | Dokumente bleiben lokal in IndexedDB (`/?doc=<id>`) | kein Gast-Konto auf dem Server |
| Konto | Magic Link + 6-stelliger Code, Konto entsteht bei der ersten Anmeldung | – |
| Übernahme | nach der ersten Anmeldung Rückfrage, welche lokalen Dokumente hochgeladen werden; hochgeladene werden lokal entfernt | statt automatischer Übernahme |
| Server-Dokumente | JSON-Inhalt mit Versionsnummer, `/d/<id>`; mit Konto werden neue Dokumente auf dem Server angelegt | Inhalt noch nicht als Yjs-Stand |
| Gleichzeitiges Bearbeiten | Sperre pro Browser-Tab (90 s ohne Heartbeat), andere sehen „Nur Lesen“ und folgen per Abfrage alle 10 s | Übergang bis Phase 4 |
| Teilen per Link | ohne Konto nutzbar; Token im Browser gespeichert (localStorage), nach Anmeldung dem Konto zugeordnet | Link-Token im Klartext gespeichert, damit der Besitzer den Link erneut kopieren kann |
| Einladungen | Mail mit Link (7 Tage gültig), meldet gleichzeitig an | – |
| Sessions | signierte Session-ID im Cookie (Rails-8-Standard) | statt Token-Digest |
| Datenbank | App-Daten, Solid Queue, Cache und Cable in **einer** PostgreSQL-Datenbank | – |
| Papierkorb, Aufräumjobs, Konto löschen | noch offen | – |
## 11. Umsetzung in Phasen
Jede Phase ist für sich nutzbar und wird einzeln ausgeliefert.