mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-11 17:27:54 +02:00
Application unique Next.js (App Router, TypeScript) servant : - Accueil public : héro, recherche, métiers, promotions, mises à l'honneur (données issues de Postgres) - Backend authentifié avec RBAC : tableau de bord, adhérents (CRUD), modération des promotions, administrateurs, espace adhérent (publication avec aperçu) Technique : - Drizzle ORM + drizzle-kit (migrations versionnées) sur driver pg - Auth.js v5 (credentials, sessions JWT), rôles admin/moderator/editor/member - Middleware de protection de /backend + gardes par rôle dans chaque vue - Server actions pour toutes les mutations (vérif auth + capacité + revalidate) - Design fidèle aux maquettes (design-system CSS, animations, responsive) Conteneurisation : - 1 conteneur applicatif (sortie standalone) + 1 conteneur Postgres externe - docker-compose avec healthcheck ; migrations + seed au démarrage - scripts migrate/seed bundlés (esbuild) pour un runtime sans devDeps Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XwfhYHzC9hQWPDnQ2p53GL
25 lines
796 B
Bash
25 lines
796 B
Bash
# ---- Database (external Postgres) ----
|
|
# When running the app via docker-compose, host is the compose service name "postgres".
|
|
# For local dev outside Docker, use localhost.
|
|
DATABASE_URL=postgres://pleinr:pleinr@postgres:5432/pleinr
|
|
|
|
# Individual vars consumed by the postgres container in docker-compose.yml
|
|
POSTGRES_USER=pleinr
|
|
POSTGRES_PASSWORD=pleinr
|
|
POSTGRES_DB=pleinr
|
|
|
|
# ---- Auth.js (NextAuth v5) ----
|
|
# Generate with: openssl rand -base64 32
|
|
AUTH_SECRET=change-me-to-a-long-random-string
|
|
# Public URL of the app (used by Auth.js for callbacks)
|
|
AUTH_URL=http://localhost:3000
|
|
|
|
# ---- First admin user (created by the seed script) ----
|
|
SEED_ADMIN_EMAIL=admin@plein-r.fr
|
|
SEED_ADMIN_PASSWORD=changeme123
|
|
SEED_ADMIN_NAME=Administrateur Plein R
|
|
|
|
# ---- App ----
|
|
NODE_ENV=production
|
|
PORT=3000
|