Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
252 lines (205 loc) · 10.7 KB
/
Copy path.env.example
File metadata and controls
252 lines (205 loc) · 10.7 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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
# =============================================================================
# Unified Environment Variables
# =============================================================================
# This file contains ALL environment variables for:
# - Backend (FastAPI)
# - Frontend (Next.js)
# - iOS (build-time configuration)
#
# Copy this file to .env and fill in your values
# DO NOT commit .env to version control
# =============================================================================
# =============================================================================
# SHARED CONFIGURATION
# =============================================================================
# These values are used across multiple parts of the stack
# -----------------------------------------------------------------------------
# App Settings
# -----------------------------------------------------------------------------
APP_NAME=Template API
APP_VERSION=1.0.0
DEBUG=true
# Secret key for API security (generate with: openssl rand -hex 32)
API_SECRET_KEY=your-secret-key-here-generate-with-openssl
# -----------------------------------------------------------------------------
# Billing Model Configuration
# -----------------------------------------------------------------------------
# Options: "subscription" or "credits"
# - subscription: Users pay recurring fee for unlimited access
# - credits: Users purchase credit packs, consume credits per use
BILLING_MODEL=credits
# -----------------------------------------------------------------------------
# Firebase Configuration
# -----------------------------------------------------------------------------
# Project ID - shared between backend and frontend
FIREBASE_PROJECT_ID=your-project-id
# Backend Admin SDK (from Firebase Console > Project Settings > Service Accounts)
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nYOUR_KEY_HERE\n-----END PRIVATE KEY-----\n"
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-xxx@your-project.iam.gserviceaccount.com
# Frontend Client SDK (from Firebase Console > Project Settings > General)
# These are PUBLIC keys - safe to expose in client-side code
NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key-here
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=123456789012
NEXT_PUBLIC_FIREBASE_APP_ID=1:123456789012:web:your-app-id
# =============================================================================
# BACKEND CONFIGURATION
# =============================================================================
# -----------------------------------------------------------------------------
# URL Configuration
# -----------------------------------------------------------------------------
# Frontend URL for redirects and CORS
FRONTEND_URL=http://localhost:3000
# Backend URL (used by iOS and for webhooks)
BACKEND_URL=http://localhost:8000
# -----------------------------------------------------------------------------
# CORS Configuration
# -----------------------------------------------------------------------------
# Comma-separated list of allowed origins (JSON array format)
CORS_ORIGINS=["http://localhost:3000", "https://yourdomain.com"]
# -----------------------------------------------------------------------------
# Redis Cache & Queue
# -----------------------------------------------------------------------------
# Local: redis://localhost:6379
# Managed (Upstash/Digital Ocean): redis://user:password@host:port
REDIS_URL=redis://localhost:6379
# -----------------------------------------------------------------------------
# RunPod GPU Workers
# -----------------------------------------------------------------------------
# Get API key from RunPod Console > Settings > API Keys
RUNPOD_API_KEY=your-runpod-api-key
# Worker endpoint IDs (created in RunPod Console > Serverless)
# Add endpoint IDs for each worker you deploy
# Example: RUNPOD_IMAGE_PROCESSOR_ENDPOINT_ID=abc123xyz
RUNPOD_ENDPOINT_ID=
# Optional: Network volumes and template IDs for persistent storage
RUNPOD_NETWORK_VOLUME_ID=
RUNPOD_A1111_TEMPLATE_ID=
# -----------------------------------------------------------------------------
# Docker Hub (for worker deployment)
# -----------------------------------------------------------------------------
# Your Docker Hub username for pushing worker images
DOCKER_HUB_USERNAME=your-dockerhub-username
# -----------------------------------------------------------------------------
# Stripe Payment Processing
# -----------------------------------------------------------------------------
# Get keys from Stripe Dashboard > Developers > API Keys
# Use sk_test_ and pk_test_ for development
# Secret key (backend only - never expose)
STRIPE_SECRET_KEY=sk_test_your-secret-key
STRIPE_WEBHOOK_SECRET=whsec_your-webhook-secret
# Stripe Price IDs for credit packages (for BILLING_MODEL=credits)
STRIPE_PRICE_STARTER=price_xxx
STRIPE_PRICE_STANDARD=price_xxx
STRIPE_PRICE_PRO=price_xxx
# Stripe Price IDs for subscriptions (for BILLING_MODEL=subscription)
STRIPE_PRICE_SUBSCRIPTION_MONTHLY=price_xxx
STRIPE_PRICE_SUBSCRIPTION_YEARLY=price_xxx
# -----------------------------------------------------------------------------
# Apple In-App Purchase (iOS)
# -----------------------------------------------------------------------------
# Get shared secret from App Store Connect > Your App > App Information > Shared Secret
APPLE_SHARED_SECRET=your-apple-shared-secret
# -----------------------------------------------------------------------------
# Generation/Job Settings
# -----------------------------------------------------------------------------
MAX_CONCURRENT_JOBS_PER_USER=2
MAX_QUEUED_JOBS_PER_USER=5
GENERATION_TIMEOUT_SECONDS=300
# -----------------------------------------------------------------------------
# Rate Limiting
# -----------------------------------------------------------------------------
RATE_LIMIT_REQUESTS_PER_MINUTE=100
RATE_LIMIT_GENERATIONS_PER_MINUTE=10
# =============================================================================
# FRONTEND CONFIGURATION
# =============================================================================
# -----------------------------------------------------------------------------
# API Configuration
# -----------------------------------------------------------------------------
# URL of your FastAPI backend server
# Local development: http://localhost:8000
# Production: https://api.yourdomain.com
NEXT_PUBLIC_API_URL=http://localhost:8000
# -----------------------------------------------------------------------------
# Stripe Publishable Key (Frontend)
# -----------------------------------------------------------------------------
# Get this from Stripe Dashboard > Developers > API Keys
# Use pk_test_ for development, pk_live_ for production
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your-publishable-key-here
# -----------------------------------------------------------------------------
# Feature Flags
# -----------------------------------------------------------------------------
# Enable/disable face swap functionality
NEXT_PUBLIC_FACESWAP_ENABLED=false
# -----------------------------------------------------------------------------
# Google Analytics 4 (GA4)
# -----------------------------------------------------------------------------
# Get Measurement ID from Google Analytics > Admin > Data Streams > Web
# Format: G-XXXXXXXXXX
NEXT_PUBLIC_GA4_MEASUREMENT_ID=G-XXXXXXXXXX
# GA4 Debug Mode - set to true to see events in GA4 DebugView
NEXT_PUBLIC_GA4_DEBUG_MODE=false
# =============================================================================
# iOS CONFIGURATION
# =============================================================================
# These variables are used at build time to configure the iOS app.
# iOS apps are compiled, so these values are baked into the binary.
# -----------------------------------------------------------------------------
# Apple Developer
# -----------------------------------------------------------------------------
# Your Apple Developer Team ID (from developer.apple.com)
DEVELOPMENT_TEAM=YOUR_TEAM_ID
# -----------------------------------------------------------------------------
# App Store In-App Purchase Product IDs
# -----------------------------------------------------------------------------
# Configure in App Store Connect > Your App > In-App Purchases
IAP_MONTHLY_PRODUCT_ID=com.yourcompany.templateapp.subscription.monthly
IAP_YEARLY_PRODUCT_ID=com.yourcompany.templateapp.subscription.yearly
# Credit pack product IDs (for BILLING_MODEL=credits)
IAP_CREDITS_STARTER=com.yourcompany.templateapp.credits.starter
IAP_CREDITS_STANDARD=com.yourcompany.templateapp.credits.standard
IAP_CREDITS_PRO=com.yourcompany.templateapp.credits.pro
# =============================================================================
# ADMIN CONSOLE CONFIGURATION
# =============================================================================
# Optional admin console for managing marketing tasks and social media posting.
# Only required if using the admin/ directory features.
# -----------------------------------------------------------------------------
# Admin Authentication
# -----------------------------------------------------------------------------
# Comma-separated list of email addresses that can access the admin console
ADMIN_EMAILS=admin@yourdomain.com
# Admin console URL (for CORS and redirects)
ADMIN_URL=http://localhost:3001
# -----------------------------------------------------------------------------
# Social Media Accounts (for browser automation)
# -----------------------------------------------------------------------------
# Instagram accounts
ADMIN_INSTAGRAM_COMPANY_USERNAME=
ADMIN_INSTAGRAM_COMPANY_PASSWORD=
ADMIN_INSTAGRAM_INFLUENCER1_USERNAME=
ADMIN_INSTAGRAM_INFLUENCER1_PASSWORD=
# Reddit accounts (also need API credentials)
ADMIN_REDDIT_CLIENT_ID=
ADMIN_REDDIT_CLIENT_SECRET=
ADMIN_REDDIT_COMPANY_USERNAME=
ADMIN_REDDIT_COMPANY_PASSWORD=
ADMIN_REDDIT_INFLUENCER1_USERNAME=
ADMIN_REDDIT_INFLUENCER1_PASSWORD=
# -----------------------------------------------------------------------------
# AI Services (for caption generation)
# -----------------------------------------------------------------------------
# Anthropic Claude API key for caption generation
ANTHROPIC_API_KEY=your-anthropic-api-key
# -----------------------------------------------------------------------------
# Content Configuration
# -----------------------------------------------------------------------------
# Website URL for CTAs in social media posts
WEBSITE_URL=https://yourdomain.com
# Link-in-bio URL (for Instagram)
LINK_IN_BIO_URL=https://yourdomain.com/links
# Default caption style: casual, professional, playful
CAPTION_STYLE=casual