Directus (Postgres, hinter NPM) wird die zentrale Datenquelle für Kunden, Aufträge, Produkte, Preise und Gutscheine; das skrift-backend bleibt reine Generierungs-Engine. - Docker/directus: docker-compose (Directus 11 + Postgres), Bootstrap-Skript legt Collections, Rollen/Policies/Rechte und Seed idempotent an. - Extension skrift-auth: passwortloser Login per E-Mail-Code (Codes nur als Hash, Ablauf, Versuchslimit) sowie Kontoanlage aus dem Checkout. - Extension skrift-orders: kontrollierter Bestell-Endpunkt für Gäste und eingeloggte Kunden; Preis wird immer serverseitig berechnet (editierbare Formel via sicherem Interpreter, Werte aus price_items). - skrift-backend: neuer Endpunkt /api/order/from-directus erzeugt SVGs aus einem Directus-Auftrag und schreibt Status + artifact_path zurück. Dafür wurde die Kernlogik aus generateOrder als runGeneration herausgelöst (Verhalten unverändert); generateOrder ist jetzt ein HTTP-Wrapper. - compose: NPM-Netz ergänzt, API_TOKEN/DIRECTUS_* werden durchgereicht. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
27 lines
718 B
Plaintext
27 lines
718 B
Plaintext
# Environment Configuration Example
|
|
# Copy this file to .env and fill in your values
|
|
|
|
# Node Environment
|
|
NODE_ENV=production
|
|
|
|
# Scriptalizer API Configuration
|
|
SCRIPTALIZER_LICENSE_KEY=your-license-key-here
|
|
SCRIPTALIZER_ERR_FREQUENCY=0
|
|
|
|
# Preview Configuration
|
|
# No batch size limit - frontend can send unlimited letters
|
|
# Backend automatically splits into 25-letter batches for Scriptalizer API
|
|
# No cache expiration
|
|
# No rate limiting
|
|
|
|
# Server Configuration
|
|
PORT=4000
|
|
|
|
# API Authentication (optional)
|
|
API_TOKEN=your-api-token-here
|
|
|
|
# Directus (Datenquelle für Aufträge)
|
|
# Token = statischer Token eines Nutzers in der Rolle "Service"
|
|
DIRECTUS_URL=https://admin.skrift.de
|
|
DIRECTUS_TOKEN=your-directus-service-token
|