Files
hermes-vault/Projects/Melo Cloud Sync Plan.md
2026-08-17 10:56:15 +02:00

59 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Melo Cloud Sync Phasen-Plan
> Stand: 26.07.2026
> Server: Aingrad (Netcup RS 1000)
> Technik: Python/Flask + SQLite + Symlinks
---
## 🔴 **Phase 1: Registry-Server**
```
/var/lib/melo-cloud/
├── registry/ ← Alle Songs (nur 1x physisch)
│ └── abc123.mp3
├── users/
│ ├── baka/ ← Symlinks auf registry/
│ └── melo/ ← Symlinks auf registry/
└── covers/ ← Original-Cover von YouTube
```
- [ ] Flask API (Port 8993)
- [ ] SQLite DB mit `registry` + `user_songs` Tabellen
- [ ] Auth per Navidrome-Credentials
- [ ] Upload-API: SHA256-Check → fpcalc-Fingerprint → speichern in Registry → Hardlink
- [ ] Deduplizierung: SHA256 + Fingerprint + Titel-Similarität (>90%)
- [ ] Custom-Titel/Cover pro User
- [ ] Systemd-Service `melo-cloud.service`
## 🟡 **Phase 2: Sync-API**
- [ ] `POST /api/cloud/upload` MP3 hochladen + Registry-Check
- [ ] `GET /api/cloud/download` Song vom Server runterladen
- [ ] `GET /api/cloud/list` Alle eigenen Songs + Status
- [ ] `DELETE /api/cloud/delete` Link in User-Cloud löschen
- [ ] `GET /api/cloud/status` Übersicht (Count, letzter Sync)
## 🟢 **Phase 3: CloudScreen (Flutter)**
- [ ] Neuer Tab "Cloud" mit Bottom-Nav
- [ ] Upload: Lokale MP3s → Server mit Fortschritt
- [ ] Download: Server-Songs → Lokal (Batch)
- [ ] Sync-Logik: `checkLocalVsServer()` → Diff anzeigen
- [ ] Sync-Intervall: Manuell / 3h / 6h / 12h
## 🔵 **Phase 4: Playlist-Teilen**
- [ ] Share-Button → 6-stelliger Code generieren
- [ ] Code eingeben → Playlist importieren
- [ ] "Nur passende Songs" / "Alle inkl. fehlende" Auswahl
- [ ] Matching: Per `registry.orig_title` → Levenshtein-Abgleich
## 🟣 **Phase 5: Geräteübergreifender Sync**
- [ ] Push-Benachrichtigung bei neuen Songs
- [ ] Auto-Sync nach Intervall
- [ ] Lösch-Sync über Geräte
- [ ] Konflikte: Server = Source of Truth
- [ ] Sync-Protokoll (letzte 50 Aktionen)