-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.mvp.example
More file actions
192 lines (160 loc) · 7.09 KB
/
Copy path.env.mvp.example
File metadata and controls
192 lines (160 loc) · 7.09 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# ============================================
# ARCANEA MVP - ENVIRONMENT VARIABLES
# ============================================
# This file documents all required environment variables for the MVP deployment.
# Copy this to .env.local for local development or configure in Vercel dashboard.
# ============================================
# APPLICATION CONFIGURATION
# ============================================
NODE_ENV=production
NEXT_PUBLIC_APP_NAME=Arcanea
NEXT_PUBLIC_APP_URL=https://arcanea.ai
VERCEL_ENV=production
# ============================================
# SUPABASE CONFIGURATION
# ============================================
# Get these from: https://app.supabase.com/project/_/settings/api
# Required for: Authentication, Database, Storage, Real-time features
# Public Supabase URL (safe to expose to client)
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
# Public Anonymous Key (safe to expose to client - has RLS protection)
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# Service Role Key (NEVER expose to client - bypasses RLS)
# Used for: Server-side operations, admin tasks, cron jobs
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# Direct connection URL for Prisma migrations (optional)
DATABASE_URL=postgresql://postgres:[password]@db.your-project-id.supabase.co:5432/postgres
DIRECT_URL=postgresql://postgres:[password]@db.your-project-id.supabase.co:5432/postgres
# ============================================
# NEXTAUTH CONFIGURATION
# ============================================
# Generate NEXTAUTH_SECRET with: openssl rand -base64 32
# Required for: User authentication, session management
NEXTAUTH_URL=https://arcanea.ai
NEXTAUTH_SECRET=your-super-secret-key-min-32-chars
# ============================================
# AI API KEYS - CORE ACADEMIES
# ============================================
# GEMINI API (Google AI Studio) - Draconic Academy
# Get from: https://makersuite.google.com/app/apikey
# Required for: Image generation, visual AI features
# Cost: Free tier: 60 requests/minute, then pay-as-you-go
GEMINI_API_KEY=AIzaSy...
GEMINI_MODEL=gemini-2.0-flash-exp
# ANTHROPIC CLAUDE - Atlantean Academy
# Get from: https://console.anthropic.com/
# Required for: Story generation, narrative AI, advanced text processing
# Cost: $3 per million input tokens, $15 per million output tokens (Claude Sonnet)
ANTHROPIC_API_KEY=sk-ant-api03-...
CLAUDE_MODEL=claude-sonnet-4-5-20250929
# OPENROUTER API - Fallback & Additional Models
# Get from: https://openrouter.ai/keys
# Required for: Model routing, fallback handling, cost optimization
# Cost: Variable by model, typically $0.50-$5 per million tokens
OPENROUTER_API_KEY=sk-or-v1-...
AI_MODEL=anthropic/claude-3.5-sonnet
# ============================================
# AI API KEYS - OPTIONAL SERVICES
# ============================================
# OPENAI API (Optional - for GPT models)
# Get from: https://platform.openai.com/api-keys
# Required for: GPT-4 features, DALL-E image generation
# Cost: $5-$30 per million tokens depending on model
OPENAI_API_KEY=sk-proj-...
OPENAI_IMAGE_MODEL=dall-e-3
# SUNO AI - Academy of Creation & Light (Music Generation)
# Get from: https://suno.ai/api
# Required for: Music generation, audio AI features
# Cost: Pay-per-generation, ~$0.10-$0.50 per song
SUNO_API_KEY=suno_...
SUNO_BASE_URL=https://api.suno.ai/v1
# REPLICATE API (Video Generation - Optional)
# Get from: https://replicate.com/account/api-tokens
# Required for: Video generation features
# Cost: Pay-per-prediction, ~$0.01-$1 per generation
REPLICATE_API_TOKEN=r8_...
REPLICATE_MODEL_VERSION=stability-ai/stable-video-diffusion
REPLICATE_WEBHOOK_URL=https://arcanea.ai/api/webhooks/replicate
# FAL AI (Video Generation - Alternative)
# Get from: https://fal.ai/dashboard
# Required for: Alternative video generation
# Cost: Pay-per-generation
FAL_KEY=fal_...
FAL_API_URL=https://fal.run/
FAL_STATUS_URL=https://queue.fal.run/
# ============================================
# ANALYTICS & MONITORING
# ============================================
# VERCEL ANALYTICS (Automatic with Vercel deployment)
# Required for: Web analytics, performance monitoring
# Cost: Included with Vercel Pro plan
NEXT_PUBLIC_VERCEL_ANALYTICS_ID=auto
# POSTHOG (Optional - Product Analytics)
# Get from: https://app.posthog.com/project/settings
# Required for: User behavior tracking, feature flags
# Cost: Free tier: 1M events/month
NEXT_PUBLIC_POSTHOG_KEY=phc_...
NEXT_PUBLIC_POSTHOG_HOST=https://app.posthog.com
# SENTRY (Optional - Error Tracking)
# Get from: https://sentry.io/settings/projects/
# Required for: Error monitoring, performance tracking
# Cost: Free tier: 5K errors/month
SENTRY_DSN=https://...@sentry.io/...
SENTRY_ORG=arcanea
SENTRY_PROJECT=web
# ============================================
# TURBO CONFIGURATION (Monorepo Build Cache)
# ============================================
# Get from: https://vercel.com/docs/concepts/monorepos/remote-caching
# Required for: Faster builds via remote caching
# Cost: Included with Vercel deployment
TURBO_TOKEN=your-vercel-token
TURBO_TEAM=team_...
TURBO_REMOTE_CACHE_SIGNATURE_KEY=...
# ============================================
# FEATURE FLAGS & CONFIGURATION
# ============================================
# Guardian AI System
GUARDIAN_LEARNING_ENABLED=true
GUARDIAN_MEMORY_RETENTION_DAYS=90
# Luminor AI Companion
LUMINOR_PERSONALITY_ENGINE_ENABLED=true
LUMINOR_MAX_CONTEXT_LENGTH=4096
# Remix System
REMIX_TRACKING_ENABLED=true
REMIX_ATTRIBUTION_REQUIRED=true
# ARC Token Economy
ARC_PER_MUSIC_GENERATION=10
ARC_PER_IMAGE_GENERATION=10
ARC_PER_STORY_GENERATION=15
ARC_PLATFORM_FEE_PERCENTAGE=5
# Rate Limiting
RATE_LIMIT_MAX_REQUESTS=100
RATE_LIMIT_WINDOW_MS=900000
# ============================================
# DEVELOPMENT ONLY (DO NOT SET IN PRODUCTION)
# ============================================
# SKIP_ENV_VALIDATION=false
# NEXT_TELEMETRY_DISABLED=1
# ============================================
# ESTIMATED MONTHLY COSTS (MVP)
# ============================================
# Vercel Pro: $20/month (hosting)
# Supabase Pro: $25/month (database + auth + storage)
# Gemini API: ~$50-100/month (1M requests at free tier + overflow)
# Anthropic Claude: ~$100-200/month (varies with usage)
# OpenRouter: ~$50/month (fallback/routing)
# Total Estimated: $245-395/month for MVP with moderate usage
#
# Note: AI costs scale with usage. Monitor via provider dashboards.
# Implement rate limiting and caching to optimize costs.
# ============================================
# SECURITY NOTES
# ============================================
# 1. NEVER commit .env files to git
# 2. Rotate NEXTAUTH_SECRET every 90 days
# 3. Use Vercel's encrypted environment variables in production
# 4. Keep SUPABASE_SERVICE_ROLE_KEY secret - it bypasses RLS
# 5. Monitor API keys for unusual usage patterns
# 6. Set up billing alerts on all AI provider accounts
# 7. Use Vercel's environment variable scopes (production/preview/development)