-
Notifications
You must be signed in to change notification settings - Fork 658
Expand file tree
/
Copy path.env.example
More file actions
116 lines (94 loc) · 5.21 KB
/
Copy path.env.example
File metadata and controls
116 lines (94 loc) · 5.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Environment Variables Template for CommitPulse
# Copy this file to .env.local and fill in your actual values.
# NEVER commit your .env.local file to version control.
# =============================================================================
# GitHub Authentication & API Access
# =============================================================================
# GitHub Personal Access Token for GraphQL API access.
#
# SECURITY WARNING: Minimal Scope Required
# For public contribution data only, use a Fine-Grained Personal Access Token with:
# - Repository access: No access (not applicable)
# - Permissions: Read access to user data (public_repo scope equivalent)
# - OR use a classic token with ONLY 'read:user' scope
#
# DO NOT grant 'repo', 'write', or organization scopes unless absolutely required.
# A token with excessive scopes exposes all your repositories if leaked.
#
# Generate at: https://github.com/settings/tokens
# Fine-Grained Token Guide: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Multiple GitHub Tokens for API quota multiplexing (optional).
# Comma-separated list of tokens to rotate through for higher rate limits.
# Each token must have at least 'read:user' scope.
# Example: GITHUB_TOKENS=ghp_token1,ghp_token2,ghp_token3
GITHUB_TOKENS=
# GitHub OAuth App Credentials (for user authentication in the web UI).
# Register at: https://github.com/settings/developers
# Authorized redirect URI: http://localhost:3000/api/auth/callback/github (or your deployment URL)
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
# =============================================================================
# Core Application Configuration
# =============================================================================
# The absolute URL of your deployment (e.g., http://localhost:3000, https://commitpulse.example.com)
# Required for generating full URLs like OG images and API redirects.
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# MongoDB Connection URI for storing sessions and analytics.
# Get yours from MongoDB Atlas (https://www.mongodb.com/cloud/atlas)
# Example: mongodb+srv://username:password@cluster0.mongodb.net/commitpulse?retryWrites=true&w=majority
MONGODB_URI=mongodb+srv://<username>:<password>@cluster0.mongodb.net/commitpulse?retryWrites=true&w=majority
# Authentication Secret for NextAuth.js session encryption.
# Generate with: openssl rand -base64 32
AUTH_SECRET=
# Encryption key for encrypting stored third-party API tokens and sensitive data.
# Use a unique random secret with at least 32 characters.
# Generate with: openssl rand -hex 16
ENCRYPTION_KEY=
# =============================================================================
# Rate Limiting & Caching (Upstash Redis)
# =============================================================================
# Vercel KV / Upstash Redis URL for distributed rate limiting.
# Leave blank to operate with degraded local-memory rate limits.
# Get yours at: https://upstash.com
KV_REST_API_URL=
# Vercel KV / Upstash Redis API token for authentication.
# Leave blank to operate with degraded local-memory rate limits.
KV_REST_API_TOKEN=
# Maximum background dashboard force-refreshes allowed per user per hour.
# Defaults to 5 if left blank.
MAX_REFRESHES_PER_HOUR=5
# =============================================================================
# Network & Security Configuration
# =============================================================================
# Comma-separated list of trusted proxy IPs (e.g., Cloudflare, Nginx reverse proxy).
# Required to correctly identify client IPs behind reverse proxies for rate limiting.
# Example: TRUSTED_PROXIES=192.0.2.0,198.51.100.0
TRUSTED_PROXIES=
# Set to "true" to automatically trust private IPs (10.x, 192.168.x, 172.16-31.x).
# Defaults to "false" (automatically enabled in development mode).
TRUST_PRIVATE_PROXIES=false
# Comma-separated list of allowed dev origins for local development.
# Set this to your local machine's IP if you face CORS errors during development.
# Example: NEXT_ALLOWED_DEV_ORIGINS=192.168.1.100,172.31.128.1
NEXT_ALLOWED_DEV_ORIGINS=
# =============================================================================
# Enterprise & Admin Features
# =============================================================================
# Comma-separated list of GitHub user IDs allowed to access enterprise API routes.
# Find your GitHub user ID at https://api.github.com/users/<username> (the "id" field).
# Example: ENTERPRISE_ADMIN_GITHUB_IDS=12345678,87654321
ENTERPRISE_ADMIN_GITHUB_IDS=
# =============================================================================
# Third-Party Integrations (Optional)
# =============================================================================
# Spotify Integration (Optional)
# Required for the "Currently Playing" SVG feature.
# Follow the setup guide in the documentation to get these credentials.
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
SPOTIFY_REFRESH_TOKEN=
# WakaTime Integration (Optional)
# Required for the WakaTime stats SVG feature.
# Follow the setup guide in docs/WAKATIME_SETUP.md to get your API key.
WAKATIME_API_KEY=