Skip to content

Commit d7b0fe4

Browse files
authored
Merge pull request #44 from nikkybel/envrionmentent-managemen-module
fix: Implement Secure Environment Configuration Management
2 parents 9ef21c2 + 7936470 commit d7b0fe4

File tree

7 files changed

+823
-28
lines changed

7 files changed

+823
-28
lines changed

.env.example

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# =============================================================================
2+
# PropChain Frontend Environment Configuration Template
3+
# =============================================================================
4+
# Copy this file to .env.local for local development
5+
# IMPORTANT: Never commit actual secrets to version control!
6+
# =============================================================================
7+
8+
# -----------------------------------------------------------------------------
9+
# Application General Settings
10+
# -----------------------------------------------------------------------------
11+
12+
# Application name displayed in UI
13+
NEXT_PUBLIC_APP_NAME=PropChain
14+
15+
# Base URL for the application (include protocol and trailing slash)
16+
NEXT_PUBLIC_APP_URL=http://localhost:3000/
17+
18+
# Current deployment environment
19+
# Options: development, staging, production
20+
NODE_ENV=development
21+
22+
# Enable build analysis (set to "true" for bundle analysis)
23+
ANALYZE=false
24+
25+
# -----------------------------------------------------------------------------
26+
# API Configurations
27+
# -----------------------------------------------------------------------------
28+
29+
# Property API endpoint for fetching property data
30+
NEXT_PUBLIC_PROPERTY_API_URL=https://api.propchain.example.com
31+
32+
# Analytics API endpoint (optional)
33+
NEXT_PUBLIC_ANALYTICS_API_URL=https://analytics.propchain.example.com
34+
35+
# -----------------------------------------------------------------------------
36+
# Web3 / Blockchain RPC Configurations
37+
# -----------------------------------------------------------------------------
38+
# These URLs are used for blockchain interactions. For production,
39+
# use reliable RPC providers like Infura, Alchemy, or QuickNode.
40+
# Format:_provider://YOUR_API_KEY
41+
42+
# Ethereum Mainnet RPC URL
43+
ETHEREUM_MAINNET_RPC_URL=https://mainnet.infura.io/v3/YOUR_INFURA_PROJECT_ID
44+
45+
# Polygon Mainnet RPC URL
46+
POLYGON_MAINNET_RPC_URL=https://polygon-rpc.com
47+
48+
# Binance Smart Chain Mainnet RPC URL
49+
BSC_MAINNET_RPC_URL=https://bsc-dataseed.binance.org
50+
51+
# -----------------------------------------------------------------------------
52+
# Wallet Connect Configuration
53+
# -----------------------------------------------------------------------------
54+
# Get your Project ID at https://cloud.walletconnect.com
55+
# This is required for WalletConnect functionality
56+
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your-walletconnect-project-id
57+
58+
# -----------------------------------------------------------------------------
59+
# Feature Flags
60+
# -----------------------------------------------------------------------------
61+
62+
# Enable/disable analytics tracking
63+
NEXT_PUBLIC_ANALYTICS_ENABLED=false
64+
65+
# Enable/disable error reporting
66+
NEXT_PUBLIC_ERROR_REPORTING_ENABLED=true
67+
68+
# Enable/disable debug mode (shows additional logging)
69+
NEXT_PUBLIC_DEBUG_MODE=false
70+
71+
# Enable/disable maintenance mode
72+
NEXT_PUBLIC_MAINTENANCE_MODE=false
73+
74+
# -----------------------------------------------------------------------------
75+
# Internationalization (i18n)
76+
# -----------------------------------------------------------------------------
77+
78+
# Default language
79+
NEXT_PUBLIC_DEFAULT_LOCALE=en
80+
81+
# Supported locales (comma-separated)
82+
NEXT_PUBLIC_SUPPORTED_LOCALES=en,es,fr,de,zh,ar,he
83+
84+
# -----------------------------------------------------------------------------
85+
# External Services (Optional)
86+
# -----------------------------------------------------------------------------
87+
88+
# Google Analytics Measurement ID (optional)
89+
NEXT_PUBLIC_GA_MEASUREMENT_ID=
90+
91+
# Sentry DSN for error tracking (optional)
92+
# Format: https://[PUBLIC_KEY]@o[ORG_ID].ingest.sentry.io/[PROJECT_ID]
93+
NEXT_PUBLIC_SENTRY_DSN=
94+
95+
# -----------------------------------------------------------------------------
96+
# Development/Testing Only
97+
# -----------------------------------------------------------------------------
98+
# These should NOT be set in production
99+
100+
# Mock data mode (bypasses real API calls)
101+
NEXT_PUBLIC_USE_MOCK_DATA=false
102+
103+
# Skip authentication for development
104+
NEXT_PUBLIC_SKIP_AUTH=false
105+
106+
# -----------------------------------------------------------------------------
107+
# Secret Management (Production)
108+
# -----------------------------------------------------------------------------
109+
# For production deployments, use a secrets management service:
110+
# - Vercel: Use Vercel Environment Variables
111+
# - AWS: Use AWS Secrets Manager
112+
# - GCP: Use Google Secret Manager
113+
# - Azure: Use Azure Key Vault
114+
# -----------------------------------------------------------------------------

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7-
"typecheck": "tsc --noEmit --incremental false",
7+
"typecheck": "tsc --noEmit --incremental false",
88
"build": "npm run typecheck && next build",
99
"build:analyze": "node scripts/run-analyze-build.mjs",
1010
"start": "next start",
1111
"lint": "eslint . --max-warnings=0",
1212
"perf:budgets": "node scripts/check-performance-budgets.mjs",
13-
"perf:ci": "npm run build:analyze && npm run perf:budgets"
13+
"perf:ci": "npm run build:analyze && npm run perf:budgets",
14+
"validate:env": "node scripts/validate-env.js"
1415
},
1516
"dependencies": {
1617
"@coinbase/wallet-sdk": "^4.3.7",

0 commit comments

Comments
 (0)