Implementiere Kundenportal mit zentraler Appwrite-Anbindung.

Express-Server für Appwrite-Auth, Session, Projekt-Dashboard und Gitea-Webhook; statisches Frontend und Schema-Dokumentation für woms-database.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-22 23:38:38 +02:00
commit f31727aeb4
23 changed files with 2056 additions and 0 deletions

79
APPWRITE_SCHEMA.md Normal file
View File

@@ -0,0 +1,79 @@
# Appwrite Schema Kundenportal (woms-database)
Endpoint: `https://ticket.webklar.com/v1`
Project ID: `6a1058610003c5a13a05`
Database ID: `woms-database`
Alle Collections: **Read/Create/Update/Delete** nur für API-Key-Rolle (Server) und Admin-Team. Kein `Any`-Read auf Kundendaten.
---
## customers (erweitern)
Bestehende Felder beibehalten. Zusätzlich:
| Attribut | Typ | Required | Index |
|----------|-----|----------|-------|
| companyName | string (255) | nein | |
| portalAccessEnabled | boolean | nein | |
| appwriteUserId | string (64) | nein | unique |
| customerStatus | string (50) | nein | |
| notes | string (5000) | nein | |
| createdAt | datetime | nein | |
| updatedAt | datetime | nein | |
---
## customerPortalAccess (neu)
Collection ID: `customerPortalAccess`
| Attribut | Typ | Required | Index |
|----------|-----|----------|-------|
| customerId | string (64) | ja | |
| enabled | boolean | ja | |
| passwordSet | boolean | nein | |
| appwriteUserId | string (64) | nein | |
| lastLoginAt | datetime | nein | |
Index: `customerId`, `appwriteUserId`
---
## websiteProjects (neu)
Collection ID: `websiteProjects`
| Attribut | Typ | Required | Index |
|----------|-----|----------|-------|
| customerId | string (64) | ja | ja |
| ticketId | string (64) | nein | |
| projectName | string (255) | ja | |
| templateName | string (255) | nein | |
| giteaRepoUrl | string (512) | nein | |
| giteaRepoName | string (255) | nein | |
| repoFullName | string (255) | nein | unique |
| subdomain | string (128) | nein | unique |
| previewUrl | string (512) | nein | |
| liveDomain | string (255) | nein | |
| status | string (50) | nein | |
| provisioningStatus | string (50) | nein | |
| createdAt | datetime | nein | |
| updatedAt | datetime | nein | |
---
## portalFeatures (neu)
Collection ID: `portalFeatures`
| Attribut | Typ | Required | Index |
|----------|-----|----------|-------|
| customerId | string (64) | ja | ja |
| projectId | string (64) | nein | |
| featureKey | string (128) | ja | |
| enabled | boolean | ja | |
| unlockedByPurchase | boolean | nein | |
| purchaseStatus | string (50) | nein | |
Index: `customerId`, `projectId`