-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
177 lines (133 loc) · 4.83 KB
/
.env.example
File metadata and controls
177 lines (133 loc) · 4.83 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# =====================================================
# SmartWatt Frontend - Environment Configuration
# =====================================================
#
# Instructions:
# 1. Copy this file to .env.local for local development
# 2. Copy this file to .env.production for production builds
# 3. Fill in your actual values
# 4. Never commit .env.local or .env.production to git
#
# Note: Variables prefixed with NEXT_PUBLIC_ are exposed
# to the browser. Never put sensitive data in them!
#
# =====================================================
# ============================
# Required Variables
# ============================
# Backend API URL (REQUIRED)
# Local development: http://localhost:8000
# Production: Your deployed backend URL
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
# ============================
# Database Configuration
# ============================
# Supabase Configuration (Optional - for user data storage)
# Sign up at https://supabase.com to get these credentials
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-public-key-here
# ============================
# Analytics & Monitoring
# ============================
# Google Analytics (Optional)
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX
# Vercel Analytics (Automatically enabled on Vercel)
# No configuration needed
# Sentry Error Tracking (Optional)
# NEXT_PUBLIC_SENTRY_DSN=https://your-sentry-dsn.ingest.sentry.io/123456
# SENTRY_AUTH_TOKEN=your-sentry-auth-token
# ============================
# Feature Flags
# ============================
# Enable/disable features without code changes
# Dark mode toggle (future feature)
NEXT_PUBLIC_ENABLE_DARK_MODE=false
# PDF export functionality
NEXT_PUBLIC_ENABLE_PDF_EXPORT=true
# Social media sharing
NEXT_PUBLIC_ENABLE_SOCIAL_SHARE=true
# User authentication (future feature)
NEXT_PUBLIC_ENABLE_AUTH=false
# Save user preferences
NEXT_PUBLIC_ENABLE_PREFERENCES=true
# Enable appliance recommendations
NEXT_PUBLIC_ENABLE_RECOMMENDATIONS=true
# ============================
# API Configuration
# ============================
# API request timeout (milliseconds)
NEXT_PUBLIC_API_TIMEOUT=30000
# Enable API request caching
NEXT_PUBLIC_ENABLE_API_CACHE=true
# API retry attempts on failure
NEXT_PUBLIC_API_RETRY_COUNT=3
# ============================
# UI Configuration
# ============================
# App name (displayed in header/title)
NEXT_PUBLIC_APP_NAME=SmartWatt
# Default currency symbol
NEXT_PUBLIC_CURRENCY_SYMBOL=₹
# Date format (e.g., MM/DD/YYYY or DD/MM/YYYY)
NEXT_PUBLIC_DATE_FORMAT=DD/MM/YYYY
# Number format locale
NEXT_PUBLIC_LOCALE=en-IN
# ============================
# External Services
# ============================
# Map Service API Key (Optional - for location-based features)
# NEXT_PUBLIC_MAPBOX_TOKEN=your-mapbox-token
# NEXT_PUBLIC_GOOGLE_MAPS_KEY=your-google-maps-key
# Payment Gateway (Future feature)
# NEXT_PUBLIC_RAZORPAY_KEY=your-razorpay-key
# NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your-stripe-key
# ============================
# Development Only
# ============================
# Enable debug logging in browser console
NEXT_PUBLIC_DEBUG=false
# Show development tools
NEXT_PUBLIC_DEV_TOOLS=false
# Mock API responses (for development without backend)
NEXT_PUBLIC_MOCK_API=false
# Enable React Query Devtools
NEXT_PUBLIC_REACT_QUERY_DEVTOOLS=false
# ============================
# Build Configuration
# ============================
# Environment (development | staging | production)
NODE_ENV=development
# Disable telemetry (Next.js usage data)
NEXT_TELEMETRY_DISABLED=1
# ============================
# Server-Side Only Variables
# ============================
# These are NOT exposed to the browser
# Safe to store sensitive information
# Backend API Key (if required)
# BACKEND_API_KEY=your-secret-api-key
# Supabase Service Role Key (server-side only)
# SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# ============================
# Example Configurations
# ============================
# --- Local Development ---
# NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
# NEXT_PUBLIC_DEBUG=true
# NEXT_PUBLIC_MOCK_API=false
# --- Staging Environment ---
# NEXT_PUBLIC_BACKEND_URL=https://staging-api.smartwatt.com
# NEXT_PUBLIC_DEBUG=true
# NEXT_PUBLIC_GA_ID=G-STAGING123
# --- Production Environment ---
# NEXT_PUBLIC_BACKEND_URL=https://api.smartwatt.com
# NEXT_PUBLIC_DEBUG=false
# NEXT_PUBLIC_GA_ID=G-PROD123456
# NEXT_PUBLIC_ENABLE_PDF_EXPORT=true
# =====================================================
# Notes:
# - All NEXT_PUBLIC_* variables are bundled into the JavaScript sent to browsers
# - Never put passwords, API secrets, or private keys in NEXT_PUBLIC_* variables
# - Variables without NEXT_PUBLIC_ prefix are only available server-side
# - See Next.js documentation: https://nextjs.org/docs/basic-features/environment-variables
# =====================================================