Skip to content

Commit 45c71bd

Browse files
authored
Merge pull request #202 from codeunia-dev/production-readiness-improvements
🚀 Production Readiness: Security, Monitoring & Performance Improvements
2 parents 0954eab + eb3ce8b commit 45c71bd

117 files changed

Lines changed: 10383 additions & 1085 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# ===========================================
2+
# Codeunia Environment Variables
3+
# ===========================================
4+
# Copy this file to .env.local and fill in your actual values
5+
6+
# ===========================================
7+
# Core Application Settings
8+
# ===========================================
9+
NODE_ENV=development
10+
NEXT_PUBLIC_SITE_URL=http://localhost:3000
11+
12+
# ===========================================
13+
# Supabase Configuration
14+
# ===========================================
15+
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
16+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
17+
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
18+
19+
# ===========================================
20+
# Authentication & Security
21+
# ===========================================
22+
NEXTAUTH_SECRET=your_nextauth_secret_key
23+
CSRF_SECRET=your_csrf_secret_key
24+
25+
# ===========================================
26+
# Monitoring & Alerting System
27+
# ===========================================
28+
# Enable/disable alerting system
29+
ALERTING_ENABLED=true
30+
31+
# Email alerting configuration
32+
ALERT_EMAIL_RECIPIENTS=connect@codeunia.com
33+
RESEND_API_KEY=your_resend_api_key
34+
35+
# Alert thresholds
36+
ALERT_RESPONSE_TIME_THRESHOLD=5000
37+
ALERT_ERROR_RATE_THRESHOLD=10
38+
ALERT_CONSECUTIVE_FAILURES=3
39+
40+
# Optional: Webhook URLs for additional alerting
41+
ALERT_WEBHOOK_URL=your_webhook_url
42+
SLACK_WEBHOOK_URL=your_slack_webhook_url
43+
DISCORD_WEBHOOK_URL=your_discord_webhook_url
44+
45+
# ===========================================
46+
# Database & Caching
47+
# ===========================================
48+
# Redis configuration for caching
49+
REDIS_URL=redis://localhost:6379
50+
51+
# ===========================================
52+
# Payment Integration
53+
# ===========================================
54+
# Razorpay configuration
55+
RAZORPAY_KEY_ID=your_razorpay_key_id
56+
RAZORPAY_KEY_SECRET=your_razorpay_key_secret
57+
58+
# ===========================================
59+
# AI Integration
60+
# ===========================================
61+
# OpenRouter API for AI features
62+
OPENROUTER_API_KEY=your_openrouter_api_key
63+
64+
# ===========================================
65+
# SEO & Analytics
66+
# ===========================================
67+
# Search engine verification codes
68+
GOOGLE_SITE_VERIFICATION=your_google_verification_code
69+
BING_VERIFICATION=your_bing_verification_code
70+
YANDEX_VERIFICATION=your_yandex_verification_code
71+
YAHOO_VERIFICATION=your_yahoo_verification_code
72+
73+
# ===========================================
74+
# Build & Deployment
75+
# ===========================================
76+
# Vercel deployment
77+
VERCEL_URL=your_vercel_url
78+
VERCEL_GIT_COMMIT_SHA=your_git_commit_sha
79+
80+
# GitHub Actions
81+
GITHUB_SHA=your_github_sha
82+
83+
# Build configuration
84+
BUILD_ID=your_build_id
85+
ANALYZE=false
86+
87+
# ===========================================
88+
# Development & Testing
89+
# ===========================================
90+
# Puppeteer configuration
91+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
92+
PUPPETEER_CACHE_DIR=/tmp/.cache/puppeteer
93+
94+
# Node.js memory configuration
95+
NODE_OPTIONS=--max-old-space-size=4096
96+
97+
# ===========================================
98+
# Security & Rate Limiting
99+
# ===========================================
100+
# Rate limiting configuration
101+
RATE_LIMIT_ENABLED=true
102+
RATE_LIMIT_MAX_REQUESTS=100
103+
RATE_LIMIT_WINDOW_MS=900000
104+
105+
# ===========================================
106+
# Optional: Third-party Services
107+
# ===========================================
108+
# Cloudflare (if using Cloudflare for caching)
109+
CLOUDFLARE_API_TOKEN=your_cloudflare_api_token
110+
CLOUDFLARE_ZONE_ID=your_cloudflare_zone_id
111+
112+
# ===========================================
113+
# Production-specific Settings
114+
# ===========================================
115+
# Uncomment and configure for production
116+
# NODE_ENV=production
117+
# NEXT_PUBLIC_SITE_URL=https://your-domain.com
118+
# ALERTING_ENABLED=true
119+
# REDIS_URL=redis://your-production-redis-url
120+
121+
# ===========================================
122+
# CI/CD & Testing
123+
# ===========================================
124+
# Test environment URLs
125+
STAGING_URL=https://your-staging-url.vercel.app
126+
PRODUCTION_URL=https://your-production-url.vercel.app
127+
128+
# Lighthouse CI
129+
LHCI_GITHUB_APP_TOKEN=your_lighthouse_ci_token
130+
131+
# Codecov
132+
CODECOV_TOKEN=your_codecov_token
133+
134+
# Vercel deployment tokens (for GitHub Actions)
135+
VERCEL_TOKEN=your_vercel_token
136+
VERCEL_ORG_ID=your_vercel_org_id
137+
VERCEL_PROJECT_ID=your_vercel_project_id

0 commit comments

Comments
 (0)