-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy path.example.env
More file actions
96 lines (81 loc) · 3.66 KB
/
.example.env
File metadata and controls
96 lines (81 loc) · 3.66 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
# ============================================================================
# Environment Variables Configuration
# ============================================================================
# Copy this file to .env.local and fill in your actual values.
# Never commit .env.local to version control!
#
# ⚠️ IMPORTANT: All variables are validated at app boot.
# Missing or invalid values will cause the app to crash with clear error messages.
# ============================================================================
# ----------------------------------------------------------------------------
# Node Environment
# ----------------------------------------------------------------------------
NODE_ENV=development # Options: development | production | test
# ----------------------------------------------------------------------------
# Client-Side Variables (NEXT_PUBLIC_*)
# These are embedded in the client bundle and are NOT secret!
# ----------------------------------------------------------------------------
# Application URL (Required)
# The base URL where your app is hosted
NEXT_PUBLIC_APP_URL=http://localhost:3000
# API Base URL (Required)
# Backend API endpoint
NEXT_PUBLIC_API_BASE_URL=https://dev.mulearn.org/api/v1
# CDN URL (Required)
# Content Delivery Network base URL for assets
NEXT_PUBLIC_CDN_URL=https://mulearn.org
# Razorpay Key ID (Required)
# Public key for Razorpay payment integration
# Get from: https://dashboard.razorpay.com/app/keys
NEXT_PUBLIC_RAZORPAY_KEY_ID=rzp_test_XXXXXXXXXXXX
# Google recaptcha public key
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=6Ld9i...
# ----------------------------------------------------------------------------
# Server-Side Variables (SECRETS - Never expose to client!)
# These are only accessible in API routes and server components
# ----------------------------------------------------------------------------
# GitHub Token (Optional)
# -----------------------
# Personal access token for GitHub API (used for leaderboard generation)
# Generate from: https://github.com/settings/tokens
# Required scopes: repo, read:org
# Use this env for local purposes
GH_TOKEN=github_pat_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# Discord webhook for contact us form
DISCORD_CONTACT_WEBHOOK=
# TinaCMS Configuration (Required for CMS authentication)
# --------------------------------------------------------
# Get these from: https://app.tina.io after connecting your GitHub repo
# These are used to authenticate editors with TinaCloud
NEXT_PUBLIC_TINA_CLIENT_ID=your_tina_client_id_here
TINA_TOKEN=your_tina_token_here
# Google Analytics 4 (Optional)
# ------------------------------
# GA4 Measurement ID for analytics tracking
# Get from: Google Analytics > Admin > Data Streams > Web > Measurement ID
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
# Google Analytics Measurement ID
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
# Google recaptcha secret key
RECAPTCHA_SECRET_KEY=6Ld9i..
# ============================================================================
# How to Add New Environment Variables
# ============================================================================
#
# 1. For CLIENT-SIDE variables (safe to expose):
# - Prefix with NEXT_PUBLIC_
# - Add to src/lib/env/env.client.ts schema
# - Use: clientEnv.NEXT_PUBLIC_YOUR_VAR
#
# 2. For SERVER-SIDE secrets (never expose):
# - DO NOT prefix with NEXT_PUBLIC_
# - Add to src/lib/env/env.server.ts schema
# - Use: serverEnv.YOUR_VAR
#
# 3. Validation:
# - Use Zod validators for type safety
# - Mark as optional() or required
# - Add meaningful error messages
#
# See README.md for detailed instructions.
# ============================================================================