Feature 4: Webinterface — React-Frontend, Discord-OAuth2, REST-API
- Discord-OAuth2-Login (identify-Scope, CSRF-State, signierte Session-Cookies, keine Token-Speicherung) - REST-API: /api/devlogs (öffentlich), /api/commits (nur ADMIN_DISCORD_ID), /api/me - React + Vite Frontend: Devlog-Archiv mit Mini-Markdown-Renderer, Commit-Tabelle, dunkles EcoGame-Theme - Fastify liefert frontend/dist mit SPA-Fallback aus; Vite-Dev-Proxy für lokale Entwicklung - Multi-Stage-Dockerfile (Frontend-Build im Image), neue Env-Vars in Compose + .env.example - README: OAuth2-Setup (Redirect-URLs, Client Secret) und Frontend-Workflow Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -28,9 +28,19 @@ export const config = {
|
||||
// Shared Secret — muss identisch im Gitea-Webhook eingetragen sein
|
||||
giteaWebhookSecret: required('GITEA_WEBHOOK_SECRET'),
|
||||
|
||||
// HTTP-Server (Webhooks, später Webinterface)
|
||||
// HTTP-Server (Webhooks + Webinterface)
|
||||
httpPort: Number(process.env.HTTP_PORT) || 3080,
|
||||
|
||||
// Webinterface (Feature 4)
|
||||
// OAuth2 Client Secret: Developer Portal → OAuth2 → Client Secret
|
||||
discordClientSecret: required('DISCORD_CLIENT_SECRET'),
|
||||
// Zufälliger String (>=32 Zeichen) zum Signieren der Session-Cookies
|
||||
sessionSecret: required('SESSION_SECRET'),
|
||||
// Deine Discord-User-ID — nur dieser Account sieht die Commit-Seite
|
||||
adminDiscordId: required('ADMIN_DISCORD_ID'),
|
||||
// Öffentliche Basis-URL (für den OAuth2-Redirect); lokal: http://localhost:3080
|
||||
publicUrl: (process.env.PUBLIC_URL || 'https://bot.d4rkst3r.de').replace(/\/$/, ''),
|
||||
|
||||
// SQLite-Datei (im Container: /app/data → ecobot_data-Volume)
|
||||
dbPath: process.env.DB_PATH || './data/ecobot.db',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user