forked from JhaSourav07/commitpulse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.local.example
More file actions
65 lines (59 loc) · 2.94 KB
/
.env.local.example
File metadata and controls
65 lines (59 loc) · 2.94 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
# ============================================================
# CommitPulse — Environment Variables
# ============================================================
# Copy this file to .env.local and fill in your own values.
# cp .env.local.example .env.local
#
# .env.local is in .gitignore and will NEVER be committed.
# ============================================================
# ------------------------------------------------------------
# REQUIRED — GitHub Personal Access Token
# ------------------------------------------------------------
# Used to authenticate with the GitHub GraphQL API.
# Without this, every request to /api/streak returns 401.
#
# How to generate:
# GitHub → Settings → Developer settings →
# Personal access tokens → Tokens (classic) →
# Generate new token (classic)
# Required scope: read:user
# ------------------------------------------------------------
GITHUB_TOKEN=
# ------------------------------------------------------------
# REQUIRED — Public site URL
# ------------------------------------------------------------
# Used for generating absolute URLs (e.g. Open Graph metadata).
# For local development, use http://localhost:3000
# ------------------------------------------------------------
NEXT_PUBLIC_SITE_URL=http://localhost:3000
# ------------------------------------------------------------
# OPTIONAL — MongoDB connection string
# ------------------------------------------------------------
# Enables user tracking: when someone generates a monolith on
# the landing page, their GitHub username is stored in MongoDB.
#
# If this is NOT set, the /api/track-user route will log a
# warning and skip the DB write — the app works fine without it.
#
# How to get one (free):
# 1. Create a free cluster at https://cloud.mongodb.com
# 2. Create a database user and whitelist your IP
# 3. Click "Connect" → "Drivers" → copy the connection string
# 4. Replace <password> with your DB user's password
# ------------------------------------------------------------
# MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/commitpulse?retryWrites=true&w=majority
# ------------------------------------------------------------
# OPTIONAL — Upstash Redis / Vercel KV (Distributed Rate Limiting)
# ------------------------------------------------------------
# Enables distributed rate limiting across all serverless instances.
# Without these, rate limiting is per-instance (each Vercel function
# gets its own counter), which allows N× the intended limit under load.
#
# How to get one (free):
# 1. Create a free Upstash Redis database at https://console.upstash.com
# 2. Copy the REST API URL and token
# 3. If using Vercel KV, link it to your project in the Vercel dashboard
# — it sets KV_REST_API_URL and KV_REST_API_TOKEN automatically.
# ------------------------------------------------------------
# KV_REST_API_URL=https://<your-db>.upstash.io
# KV_REST_API_TOKEN=<your-token>