Back-office (roadmap V1 step 7): - server: token-protected HTTP API under /api/admin (ADMIN_TOKEN), Drizzle-backed CRUD for manual questions — list, create (mcq/truefalse/free, category upsert, dedup on prompt, validation), delete; 401/503 when unauthorized/unconfigured - client: /admin page with token login + TanStack Query (list/create/delete), format-aware form (QCM / vrai-faux / réponse libre) - env: ADMIN_TOKEN README: replace the shadcn template with a real NerdWare overview (stack, structure, getting started, scripts, game modes, back-office). Verified against real Postgres: auth (401), create (201), dedup (409), validation (400), list, delete (200/404). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
8 lines
303 B
Text
8 lines
303 B
Text
NODE_ENV=development
|
|
HOST=0.0.0.0
|
|
PORT=3001
|
|
CORS_ORIGINS=http://localhost:5173
|
|
# Laisser vide pour jouer sans DB (banque de questions en dur).
|
|
DATABASE_URL=postgres://nerdware:nerdware@localhost:5432/nerdware
|
|
# Jeton du back-office quiz (/admin). Laisser vide pour le désactiver.
|
|
ADMIN_TOKEN=change-me
|