feat: add profile pages (favorites, messages, my-listings, settings) and update docs for zero-knowledge chat schema
This commit is contained in:
@@ -124,31 +124,40 @@ Verfügbare Sprachen.
|
||||
|
||||
## conversations
|
||||
|
||||
Chat-Konversationen zwischen Usern.
|
||||
Zero-Knowledge Chat-Konversationen zwischen anonymen Usern.
|
||||
|
||||
| Feld | Typ | Beschreibung |
|
||||
|------|-----|--------------|
|
||||
| `id` | UUID | Primary Key |
|
||||
| `listing` | UUID | FK → listings |
|
||||
| `buyer` | UUID | FK → directus_users (Interessent) |
|
||||
| `seller` | UUID | FK → directus_users (Verkäufer) |
|
||||
| `listing_id` | UUID | FK → listings |
|
||||
| `participant_hash_1` | string(64) | SHA-256 Hash des ersten Teilnehmers (Käufer) |
|
||||
| `participant_hash_2` | string(64) | SHA-256 Hash des zweiten Teilnehmers (Verkäufer) |
|
||||
| `public_key_1` | text | NaCl Public Key Teilnehmer 1 |
|
||||
| `public_key_2` | text | NaCl Public Key Teilnehmer 2 |
|
||||
| `status` | string | `active`, `closed` |
|
||||
| `date_created` | datetime | Erstellungsdatum |
|
||||
| `date_updated` | datetime | Letzte Nachricht |
|
||||
|
||||
**Hinweis:** Die `participant_hash_*` Felder ermöglichen anonyme Zuordnung ohne Directus-User-Accounts.
|
||||
|
||||
---
|
||||
|
||||
## messages
|
||||
|
||||
Nachrichten in Konversationen.
|
||||
E2E-verschlüsselte Nachrichten in Konversationen.
|
||||
|
||||
| Feld | Typ | Beschreibung |
|
||||
|------|-----|--------------|
|
||||
| `id` | UUID | Primary Key |
|
||||
| `conversation` | UUID | FK → conversations |
|
||||
| `sender` | UUID | FK → directus_users |
|
||||
| `content` | text | Verschlüsselter Inhalt |
|
||||
| `sender_hash` | string(64) | SHA-256 Hash des Senders |
|
||||
| `content_encrypted` | text | NaCl-verschlüsselter Inhalt |
|
||||
| `nonce` | string | Nonce für Entschlüsselung |
|
||||
| `type` | string | `text`, `image`, `system` |
|
||||
| `date_created` | datetime | Zeitstempel |
|
||||
|
||||
**Hinweis:** Nachrichten sind client-seitig E2E-verschlüsselt. Server sieht nur Ciphertext.
|
||||
|
||||
---
|
||||
|
||||
## favorites
|
||||
@@ -191,7 +200,7 @@ Meldungen von Anzeigen.
|
||||
| `categories_translations` | ✓ | - | - | - | Für i18n |
|
||||
| `locations` | ✓ | ✓ | - | - | User kann neue Orte anlegen |
|
||||
| `languages` | ✓ | - | - | - | Für Sprach-Auswahl |
|
||||
| `conversations` | ✓ | ✓ | - | - | Nur eigene |
|
||||
| `messages` | ✓ | ✓ | - | - | Nur in eigenen Konversationen |
|
||||
| `conversations` | ✓ | ✓ | ✓ | - | Filter via API-Query mit `participant_hash`, Update nur `status` |
|
||||
| `messages` | ✓ | ✓ | - | - | Filter via `conversation` ID |
|
||||
| `favorites` | ✓ | ✓ | - | ✓ | Nur eigene |
|
||||
| `reports` | - | ✓ | - | - | Nur erstellen |
|
||||
|
||||
Reference in New Issue
Block a user