1- # -------------------------------------------------------
1+ # -------------------------------------------------------
22# Supabase
33# Project Settings → API → Project URL
4- NEXT_PUBLIC_SUPABASE_URL = https://your- project-ref.supabase.co
4+ NEXT_PUBLIC_SUPABASE_URL = https://< project-ref> .supabase.co
55
66# Project Settings → API → anon / public key
77NEXT_PUBLIC_SUPABASE_ANON_KEY = your_supabase_anon_key
88
9- # Project Settings → API → service_role secret (server-side only — never expose client-side)
9+ # ⚠️ CRITICAL SECURITY WARNING ⚠️
10+ # Project Settings → API → service_role secret (server-side only)
11+ #
12+ # This key bypasses ALL Supabase Row Level Security (RLS) policies.
13+ # An attacker with access to this key has unrestricted read/write/delete access
14+ # to every user's data in the database.
15+ #
16+ # SECURITY REQUIREMENTS:
17+ # 1. NEVER use this in client-side code (React components, browser scripts)
18+ # 2. NEVER commit this to version control
19+ # 3. NEVER expose it via environment variables with NEXT_PUBLIC_ prefix
20+ # 4. Store only in server-side .env.local (not in git)
21+ # 5. Use only in server-side API routes (@/src/app/api/*)
22+ # 6. If leaked, rotate the key immediately in Supabase dashboard
23+ #
24+ # Leaked/compromised keys → Full database compromise (all user data at risk)
1025SUPABASE_SERVICE_ROLE_KEY = your_supabase_service_role_key
1126
1227# -------------------------------------------------------
@@ -22,6 +37,15 @@ NEXTAUTH_URL=http://localhost:3000
2237# Must not have a trailing slash.
2338# NEXT_PUBLIC_APP_URL=https://devtrack-delta.vercel.app
2439
40+ # -------------------------------------------------------
41+ # CSRF Allowed Origins (optional — used by CSRF middleware to validate Origin/Referer
42+ # headers on state-changing POST/PUT/PATCH/DELETE API requests).
43+ # Comma-separated list of origins that are allowed to make cross-origin requests.
44+ # NEXTAUTH_URL and NEXT_PUBLIC_APP_URL are included automatically — you only need
45+ # to add this if you have additional allowed origins (e.g. staging, custom domains).
46+ # Example: ALLOWED_ORIGINS=https://staging.devtrack.app,https://devtrack.example.com
47+ # ALLOWED_ORIGINS=
48+
2549# Generate with: openssl rand -base64 32
2650NEXTAUTH_SECRET = your_nextauth_secret
2751
@@ -56,17 +80,19 @@ UPSTASH_REDIS_REST_URL=your_upstash_redis_rest_url
5680UPSTASH_REDIS_REST_TOKEN = your_upstash_redis_rest_token
5781
5882# -------------------------------------------------------
59- # Anthropic Claude (optional — enables AI-generated weekly summaries in the
60- # AI Mentor widget). Without this key the widget still works and shows
61- # rule-based insights only.
62- # console.anthropic.com → API Keys
83+ # Anthropic (optional — enables the "Generate Summary" button in the weekly
84+ # digest card, which produces a 2-3 sentence natural-language summary of the
85+ # user's week using claude-haiku-4-5-20251001).
86+ # Without this key the button is hidden and the rest of the widget functions
87+ # normally. Rate limited to one generation per user per 24 hours.
88+ # console.anthropic.com -> API Keys
6389# ANTHROPIC_API_KEY=sk-ant-...
6490
6591# -------------------------------------------------------
6692# Groq API Key (optional — enables AI-generated weekly summaries in the
6793# AI Mentor widget using Llama-3).
6894# console.groq.com → API Keys
69- GROQ_API_KEY = gsk_...
95+ GROQ_API_KEY = your_groq_api_key
7096
7197# -------------------------------------------------------
7298# Leaderboard Configuration
@@ -75,4 +101,12 @@ GROQ_API_KEY=gsk_...
75101# Higher values = faster builds but more resource usage
76102# WARNING: Do not exceed 100 without load testing — risks memory exhaustion
77103LEADERBOARD_USER_CONCURRENCY = 5
78-
104+ # -------------------------------------------------------
105+ # Cron / Scheduled-sync endpoints
106+ # Shared secret supplied by the scheduler (e.g. Vercel Cron) in every request:
107+ # Authorization: Bearer <CRON_SECRET>
108+ # Required in ALL environments - cron routes fail closed when this is absent.
109+ # Local development: set any non-empty value and pass the matching header when
110+ # calling a sync endpoint manually (e.g. curl -H "Authorization: Bearer ...").
111+ # Generate with: openssl rand -hex 32
112+ CRON_SECRET = your_cron_secret
0 commit comments