diff --git a/.env.example b/.env.example
index 9788bd4..39178f3 100644
--- a/.env.example
+++ b/.env.example
@@ -4,7 +4,8 @@ SESSION_COOKIE_NAME=webklar_portal_session
APPWRITE_ENDPOINT=https://ticket.webklar.com/v1
APPWRITE_PROJECT_ID=6a1058610003c5a13a05
-APPWRITE_DATABASE_ID=woms-database
+# Fest: nur woms-database (Ticketsystem). Wird bei abweichendem Wert ignoriert.
+# APPWRITE_DATABASE_ID=woms-database
APPWRITE_API_KEY=
APPWRITE_COLLECTION_CUSTOMERS=customers
diff --git a/APPWRITE_SCHEMA.md b/APPWRITE_SCHEMA.md
index 38ec43d..7edbc26 100644
--- a/APPWRITE_SCHEMA.md
+++ b/APPWRITE_SCHEMA.md
@@ -1,10 +1,12 @@
# Appwrite Schema – Kundenportal (woms-database)
+**Nur diese Datenbank** – keine separate Portal-Datenbank (`appwrite.webklar.com` / Legacy-IDs wie `6943bf0e0003291f8c35` werden nicht verwendet).
+
Endpoint: `https://ticket.webklar.com/v1`
Project ID: `6a1058610003c5a13a05`
-Database ID: `woms-database`
+Database ID: **`woms-database`** (fest im Code)
-Alle Collections: **Read/Create/Update/Delete** nur für API-Key-Rolle (Server) und Admin-Team. Kein `Any`-Read auf Kundendaten.
+Alle Collections liegen in `woms-database`. **Read/Create/Update/Delete** nur für API-Key-Rolle (Server) und Admin-Team. Kein `Any`-Read auf Kundendaten.
---
diff --git a/README.md b/README.md
index 457dbf8..5312ea5 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Webklar Kundenbereich
-Kundenportal für Website-Projekte. Liest ausschließlich aus der **zentralen Appwrite-Datenbank des Ticketsystems** (`woms-database` auf `ticket.webklar.com`).
+Kundenportal für Website-Projekte. Liest **ausschließlich** aus `woms-database` auf `ticket.webklar.com` (Ticketsystem). Es gibt **keine** eigene Portal-Datenbank mehr.
- **Keine** Kundenanlage im Portal
- **Keine** Admin-Funktionen
diff --git a/project.webklar.com/_downloads.html b/project.webklar.com/_downloads.html
deleted file mode 100644
index 799341e..0000000
--- a/project.webklar.com/_downloads.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Downloads
-
-
- Downloads
-
-
-
diff --git a/project.webklar.com/forgot-password.html b/project.webklar.com/forgot-password.html
deleted file mode 100644
index 623cbc4..0000000
--- a/project.webklar.com/forgot-password.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
- Passwort vergessen � Webklar Kundenbereich
-
-
-
-
- Bitte wenden Sie sich an Webklar oder nutzen Sie die Appwrite-Passwort-Wiederherstellung unter
- Appwrite Console.
- Zur�ck zum Login
-
-
\ No newline at end of file
diff --git a/project.webklar.com/login.html b/project.webklar.com/login.html
deleted file mode 100644
index c5ed74d..0000000
--- a/project.webklar.com/login.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
- Anmelden � Webklar Kundenbereich
-
-
-
-
-
-
- Passwort vergessen
-
-
\ No newline at end of file
diff --git a/project.webklar.com/style.css b/project.webklar.com/style.css
deleted file mode 100644
index 5607f7f..0000000
--- a/project.webklar.com/style.css
+++ /dev/null
@@ -1,57 +0,0 @@
-:root {
- --bg: #0f1419;
- --card: #1a2332;
- --text: #e7ecf3;
- --accent: #3b82f6;
- --muted: #94a3b8;
-}
-
-* { box-sizing: border-box; }
-body {
- font-family: system-ui, -apple-system, sans-serif;
- background: var(--bg);
- color: var(--text);
- margin: 0;
- line-height: 1.5;
-}
-header {
- padding: 1rem 2rem;
- border-bottom: 1px solid #2d3a4f;
- display: flex;
- justify-content: space-between;
- align-items: center;
-}
-header h1 { margin: 0; font-size: 1.25rem; }
-nav a { color: var(--accent); margin-left: 1rem; text-decoration: none; }
-main { max-width: 900px; margin: 2rem auto; padding: 0 1.5rem; }
-.card, .project-card {
- background: var(--card);
- border-radius: 8px;
- padding: 1.25rem;
- margin-bottom: 1rem;
-}
-label { display: block; margin-bottom: 0.75rem; }
-input, textarea, select {
- width: 100%;
- padding: 0.5rem;
- margin-top: 0.25rem;
- border-radius: 4px;
- border: 1px solid #334155;
- background: #0f172a;
- color: var(--text);
-}
-button, .btn {
- background: var(--accent);
- color: #fff;
- border: none;
- padding: 0.5rem 1rem;
- border-radius: 4px;
- cursor: pointer;
- text-decoration: none;
- display: inline-block;
-}
-.error { color: #f87171; }
-.projects { list-style: none; padding: 0; }
-table { width: 100%; border-collapse: collapse; }
-td, th { padding: 0.5rem; border-bottom: 1px solid #334155; text-align: left; }
-form.inline { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
diff --git a/server/config.js b/server/config.js
index ab94f9e..fd87b7f 100644
--- a/server/config.js
+++ b/server/config.js
@@ -1,5 +1,27 @@
import 'dotenv/config'
+/** Einzige erlaubte Datenbank (Ticketsystem). Keine separate Portal-DB mehr. */
+export const WOMS_DATABASE_ID = 'woms-database'
+
+const DEPRECATED_DATABASE_IDS = new Set([
+ '6943bf0e0003291f8c35', // frühere Portal-/Legacy-DB
+])
+
+function resolveDatabaseId() {
+ const fromEnv = (process.env.APPWRITE_DATABASE_ID || '').trim()
+ if (!fromEnv || fromEnv === WOMS_DATABASE_ID) return WOMS_DATABASE_ID
+ if (DEPRECATED_DATABASE_IDS.has(fromEnv)) {
+ console.warn(
+ `[config] Veraltete APPWRITE_DATABASE_ID "${fromEnv}" – es wird nur ${WOMS_DATABASE_ID} verwendet.`
+ )
+ return WOMS_DATABASE_ID
+ }
+ console.warn(
+ `[config] APPWRITE_DATABASE_ID="${fromEnv}" ignoriert – Portal nutzt ausschließlich ${WOMS_DATABASE_ID}.`
+ )
+ return WOMS_DATABASE_ID
+}
+
export const config = {
port: Number(process.env.PORT) || 3000,
sessionSecret: process.env.SESSION_SECRET || '',
@@ -12,7 +34,7 @@ export const config = {
appwrite: {
endpoint: process.env.APPWRITE_ENDPOINT || 'https://ticket.webklar.com/v1',
projectId: process.env.APPWRITE_PROJECT_ID || '6a1058610003c5a13a05',
- databaseId: process.env.APPWRITE_DATABASE_ID || 'woms-database',
+ databaseId: resolveDatabaseId(),
apiKey: process.env.APPWRITE_API_KEY || '',
},
diff --git a/server/index.js b/server/index.js
index 332df56..101ba5d 100644
--- a/server/index.js
+++ b/server/index.js
@@ -1,7 +1,7 @@
import express from 'express'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
-import { config, assertServerConfig } from './config.js'
+import { config, assertServerConfig, WOMS_DATABASE_ID } from './config.js'
import { sessionMiddleware } from './middleware/session.js'
import authRoutes from './routes/auth.js'
import projectsRoutes from './routes/projects.js'
@@ -23,7 +23,12 @@ app.use('/api/features', featuresRoutes)
app.use('/webhook', giteaWebhookRoutes)
app.get('/api/health', (_req, res) => {
- res.json({ ok: true, service: 'webklar-kundenbereich' })
+ res.json({
+ ok: true,
+ service: 'webklar-kundenbereich',
+ databaseId: WOMS_DATABASE_ID,
+ endpoint: config.appwrite.endpoint,
+ })
})
app.use(express.static(publicDir))