Repository navigation
Configuration
Cursor Agent edited this page Dec 1, 2026
·
1 revision
All configuration is done through environment variables. Copy .env.example to .env.local for development, or set them in your hosting platform. Never commit real values.
NEXT_PUBLIC_*variables are embedded in the browser bundle at build time. Set them beforenpm run build.
| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Supabase project URL (https://<project>.supabase.co). |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase public anon key (safe for the browser, protected by row-level security). |
ANTHROPIC_API_KEY |
Anthropic API key used for outlines, drafts, rewrites and analyses. Server only. |
ANTHROPIC_MODEL |
Claude model used for outlines and drafting. See .env.example for the default. |
ENCRYPTION_KEY |
32 random bytes in base64 (openssl rand -base64 32). Encrypts CMS credentials before they are stored. Losing it makes stored connections unreadable. |
NEXT_PUBLIC_SITE_URL |
Public URL of the app (used in sign-in e-mails and redirects). http://localhost:3000 in development. |
| Variable | Feature | Notes |
|---|---|---|
GOOGLE_AI_API_KEY, GOOGLE_IMAGE_MODEL
|
Cover and inline images | Without the key, image generation fails with an error; the rest works. |
GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
|
Google Search Console opportunities | OAuth client; add <site>/api/gsc/callback as an authorised redirect URI. |
SMTP_USER, SMTP_PASSWORD, SMTP_HOST, SMTP_PORT, SMTP_FROM
|
Team invitation e-mails | Defaults to Gmail/Google Workspace SMTP with an app password; any SMTP server works. |
STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRICE_ESSENTIEL, STRIPE_PRICE_COMPLET
|
Subscriptions | Create two recurring monthly prices in Stripe and a webhook endpoint <site>/api/stripe/webhook with the events checkout.session.completed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted. |
SUPABASE_SERVICE_ROLE_KEY |
Stripe webhook (no user session) |
Server secret. Never expose it in NEXT_PUBLIC_*, never commit it. |
To change ENCRYPTION_KEY without losing stored credentials:
- Put the new key in
ENCRYPTION_KEYand the previous one inENCRYPTION_KEY_OLD(comma-separated if several). - In your own terminal (never on the deployed app), set
SUPABASE_SERVICE_ROLE_KEYand runnpm run rotate-key. - Remove
ENCRYPTION_KEY_OLDandSUPABASE_SERVICE_ROLE_KEYfrom that environment.
- Keep service keys server-side only. If a key leaks (even in a commit that was later removed), revoke it: deleting it from the code is not enough.
- Outgoing requests to user-provided addresses (CMS sites, pages to read) go through a guard that blocks internal network ranges.
- The repository uses GitHub secret scanning with push protection, and CI runs gitleaks on every pull request.
Tournure is open source under the MIT licence. · Tournure est open source sous licence MIT. · Repository