Documentation Index
Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt
Use this file to discover all available pages before exploring further.
Environment setup
This guide covers all environment variables used by OOOC Fête Finder. Copy.env.example to .env.local for local development, and configure these values in your hosting platform for production deployments.
Required variables
These variables are required for the app to run:Minimum 32 characters — used for JWT signing and session security.Generate with:Example:
PostgreSQL connection string including user, password, host, port, and database name.Format:Examples:
- Local:
postgresql://postgres:password@localhost:5432/oooc_fete_finder - Vercel Postgres: Automatically set by Vercel when you add Postgres storage
- Neon:
postgresql://user:pass@ep-xxx-xxx.us-east-1.aws.neon.tech/dbname?sslmode=require - Supabase: Available in project settings under Database → Connection string
The app reads only
DATABASE_URL. It does not use PGHOST, POSTGRES_*, or other Postgres environment variables that may be set by your hosting provider.Data source mode for the app. Required in production.Options:
remote— Use Postgres event store (primary) with local CSV fallbacklocal— Use local CSV file only (not recommended for production)test— Use test fixtures (development/testing only)
Core configuration
These variables control fundamental app behavior:Node.js environment mode.Options:
development— Local development with hot reloadproduction— Production build and runtimetest— Testing environment
Admin authentication key for accessing Example:
/admin and admin APIs.Generate with:If unset or empty, admin login and all admin API endpoints are disabled. This is optional for builds but recommended for any deployment where you need admin access.
Optional secondary passcode for destructive admin actions like factory reset.Generate with:
Maximum PostgreSQL connection pool size.Defaults:
- Development:
1 - Production:
3
1 to 10Example:Most deployments don’t need to change this. Increase only if you see connection pool exhaustion in logs.
Public variables
These variables are exposed to the client (browser) and must be prefixed withNEXT_PUBLIC_:
Full public URL of your site, including protocol.Examples:Used for:
- Local:
http://localhost:3000 - Production:
https://fete-finder.example.com
- OG image generation
- Share links
- API endpoint construction
Base path for the app if deployed to a subdirectory.Example for deployment at Leave empty for root deployment (most common).
example.com/fete:Google integrations
Optional variables for Google Sheets import/preview and geocoding:Google Cloud API key with Geocoding API enabled.Setup:
- Create a project in Google Cloud Console
- Enable Geocoding API
- Create an API key under Credentials
- Restrict the key to Geocoding API only (security best practice)
If unset, the app uses arrondissement center fallback for event coordinates. This is acceptable for many use cases.
Google Sheet ID for admin backup import/preview.Extract from your sheet URL:
Required only if you want to import events from Google Sheets via
/admin/operations.Google Cloud service account credentials as compact JSON in one line (no file path).Setup:
- Create a service account in Google Cloud Console
- Grant it access to Google Sheets API
- Generate and download a JSON key
- Share your Google Sheet with the service account email (found in the JSON)
- Compact the JSON to a single line:
- Set as environment variable:
Alternative to Sheet API — direct CSV URL (e.g., “Publish to web” from Google Sheets).Example:
Use either Sheet API (
GOOGLE_SHEET_ID + GOOGLE_SERVICE_ACCOUNT_KEY) or REMOTE_CSV_URL, not both.Stripe integration
Optional variables for partner payment processing:Stripe webhook signing secret for verifying webhook events from Stripe.Setup:Required for
- Create a webhook endpoint in Stripe Dashboard
- Point it to:
https://yourdomain.com/api/webhooks/stripe - Select events:
checkout.session.completed - Copy the signing secret (starts with
whsec_)
/api/webhooks/stripe to process payment events.Stripe Payment Link URL for Spotlight Standard package.Format:If missing, partner page CTAs fall back to contact email.
Stripe Payment Link URL for Spotlight Takeover package.
Stripe Payment Link URL for Promoted package.
Stripe Payment Link URL for WhatsApp Add-on.
Stripe Payment Link URL for Newsletter Add-on.
Optional mapping of Stripe Payment Link ID to package key for admin queue labels.Example:Helps identify which package was purchased in the admin panel.
Payment Link ID for Spotlight Takeover package.
Payment Link ID for Promoted package.
Payment Link ID for WhatsApp add-on.
Payment Link ID for Newsletter add-on.
Automation & webhooks
Variables for scheduled jobs and deployment hooks:Bearer token for authenticating scheduled cron job requests.Generate with:Used by:Vercel automatically sends
/api/cron/cleanup-admin-sessions— Removes expired admin sessions (7+ days old)/api/cron/cleanup-rate-limits— Removes stale rate limit counters (24h grace)/api/cron/backup-event-store— Creates daily Postgres snapshots at 04:20 UTC
vercel.json:Authorization: Bearer <CRON_SECRET> header.Bearer token for post-deploy revalidation webhook.Generate with:After each deployment, call:This forces:
- Live events reload from Postgres
- Homepage revalidation
- Immediate data freshness after deploy
Useful when deploying with no code changes but new data in the database.
Advanced configuration
Cache duration (in seconds) for admin header notification counters.Examples:
0— Disable caching (always fetch fresh)15— Cache for 15 seconds (recommended for testing)- Unset — Use default caching behavior
Lower values provide more real-time notifications but increase database load. Use
0 only for debugging.Example configurations
Validation and testing
The app validates environment variables at startup using @t3-oss/env-nextjs and Zod schemas (seelib/config/env.ts:65).
Common validation errors
AUTH_SECRET must be at least 32 characters long
AUTH_SECRET must be at least 32 characters long
Your
AUTH_SECRET is too short. Generate a proper secret:Missing required DATA_MODE in production
Missing required DATA_MODE in production
DATA_MODE is required in Vercel preview/production. Set it explicitly:DATABASE_URL is required
DATABASE_URL is required
Make sure
DATABASE_URL is set and formatted correctly:REMOTE_CSV_URL must be a valid URL
REMOTE_CSV_URL must be a valid URL
If set,
REMOTE_CSV_URL must be a complete URL with protocol:Skip validation (not recommended)
You can skip environment validation during build:Security best practices
Use different secrets for dev and production
Never reuse
AUTH_SECRET, ADMIN_KEY, or other secrets across environments.Store secrets securely
Use your platform’s secret management:
- Vercel: Environment Variables in project settings
- GitHub Actions: Repository secrets
- Local:
.env.local(never commit to git)
Rotate secrets periodically
Change
AUTH_SECRET, ADMIN_KEY, and webhook secrets every 90 days or after team changes.Next steps
Deploy to production
Learn how to deploy OOOC Fête Finder to Vercel or other platforms.
Set up Google Sheets
Configure Google Sheets import for admin backup/preview.
Configure geocoding
Enable precise event coordinates with Google Maps Geocoding API.
Stripe webhooks
Process partner payments with Stripe webhook integration.