-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathenv.local.template
More file actions
185 lines (149 loc) · 7.88 KB
/
env.local.template
File metadata and controls
185 lines (149 loc) · 7.88 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
# =============================================================================
# 🗄️ DATABASE BACKEND CONFIGURATION
# =============================================================================
# Ring Platform supports three sophisticated backend deployment modes:
#
# 1. k8s-postgres-fcm (RECOMMENDED FOR PRODUCTION & LOCAL DEV)
# - PostgreSQL on Kubernetes for all database operations
# - Firebase for FCM push notifications only
# - Apple Push Notification Service for iOS
# - Best performance and cost-efficiency for self-hosted deployments
# - USE THIS FOR LOCAL DEVELOPMENT with local PostgreSQL
#
# 2. firebase-full (RAPID DEVELOPMENT / VERCEL EDGE)
# - Firebase Firestore for all database operations
# - Firebase for FCM push notifications
# - Fastest setup for prototyping and Vercel Edge deployments
# - Pay-per-use pricing model
#
# 3. supabase-fcm (CLOUD POSTGRESQL)
# - Supabase PostgreSQL for database operations
# - Firebase for FCM push notifications only
# - Apple Push Notification Service for iOS
# - Best for cloud-hosted PostgreSQL without Kubernetes
# CRITICAL: This variable is REQUIRED - the platform will not start without it
# For local development with PostgreSQL, use: k8s-postgres-fcm
DB_BACKEND_MODE=k8s-postgres-fcm
# PostgreSQL Configuration (required for k8s-postgres-fcm and supabase-fcm modes)
DB_HOST=localhost # Use 'postgres.ring-platform-org.svc.cluster.local' for K8s
DB_PORT=5432
DB_NAME=ring_platform
DB_USER=ring_user
DB_PASSWORD=ring_password_2024
DB_POOL_SIZE=20
DB_TIMEOUT=30000
DB_RETRIES=3
DB_SSL=false # Set to 'true' for production and Supabase
# Supabase Configuration (only for supabase-fcm mode)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_KEY=your-service-key
# =============================================================================
# 🔐 AUTH.JS CONFIGURATION
# =============================================================================
# Auth.js configuration for authentication
# Generate AUTH_SECRET with: npx @better-auth/cli secret
AUTH_SECRET="someSecretKeyGoesHere" # Use `npx @better-auth/cli secret` to create one
# Trust host in production (required for Vercel deployment)
#AUTH_TRUST_HOST=true
# =============================================================================
# 🔐 OAUTH PROVIDERS (Auth - AUTO PREFIX)
# =============================================================================
# Auth.js automatically uses AUTH_ prefix for OAuth providers
# Get these from each provider's developer console
# Google OAuth (get from https://console.developers.google.com)
AUTH_GOOGLE_ID=your_google_client_id
AUTH_GOOGLE_SECRET=your_google_client_secret
# Apple OAuth (get from https://developer.apple.com)
AUTH_APPLE_ID=your_apple_client_id
AUTH_APPLE_SECRET=your_apple_client_secret
# =============================================================================
# 🔥 FIREBASE ADMIN SDK (Server-side - AUTH_ prefix)
# =============================================================================
# Get these from: Firebase Console → Project Settings → Service Accounts → Generate new private key
# Required for Firebase Admin operations (server-side)
AUTH_FIREBASE_PROJECT_ID=your_firebase_project_id
AUTH_FIREBASE_CLIENT_EMAIL=your_firebase_client_email
AUTH_FIREBASE_PRIVATE_KEY="your_firebase_private_key"
# Additional Firebase Admin configuration
FIREBASE_PRIVATE_KEY_ID=your_firebase_private_key_id
FIREBASE_CLIENT_ID="your_firebase_client_id"
FIREBASE_FIRESTORE_DEBUG=true
FIREBASE_DATABASE_URL=https://your-project-default-rtdb.firebaseio.com
# =============================================================================
# 🌐 FIREBASE CLIENT SDK (Client-side - NEXT_PUBLIC_ prefix)
# =============================================================================
# Get these from: Firebase Console → Project Settings → General → Web apps
# Required for Firebase client operations (browser-side)
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_firebase_project_id # Same value as AUTH_FIREBASE_PROJECT_ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=G-YCZKPV315E
NEXT_PUBLIC_FIREBASE_VAPID_KEY=your_vapid_key
# =============================================================================
# 🔧 ADDITIONAL CONFIGURATION
# =============================================================================
# Storage Configuration
# Choose storage provider: 'vercel_blob' (default), 'local_storage', 'firebase_storage'
NEXT_PUBLIC_STORAGE_PROVIDER=vercel_blob
# Vercel Blob Storage (optional - for file uploads)
BLOB_READ_WRITE_TOKEN=your_blob_token
# Local Storage Configuration (for self-hosted deployments)
NEXT_PUBLIC_LOCAL_STORAGE_URL=/uploads
# Email Provider (optional - for email auth/notifications)
AUTH_RESEND_KEY=your_resend_key
# Application Configuration
NEXT_PUBLIC_API_URL=https://myringproject.url # set your public API URL here
# Polygon RPC for Web3 functionality
POLYGON_RPC_URL=https://polygon-rpc.com
# Wallet encryption key for securing private keys
# Generate a secure key with: openssl rand -hex 32
WALLET_ENCRYPTION_KEY=your_wallet_encryption_key_32_hex_chars
# =============================================================================
# 🌐 WEB3 CONFIGURATION (Modern Wagmi + Viem + RainbowKit)
# =============================================================================
# WalletConnect Project ID (get from https://cloud.walletconnect.com)
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id
# Default chain configuration
NEXT_PUBLIC_DEFAULT_CHAIN=mainnet # 'mainnet', 'polygon', 'arbitrum', 'optimism', 'base'
# Gas price settings
NEXT_PUBLIC_MAX_GAS_PRICE=500000000000 # 500 gwei max gas price
NEXT_PUBLIC_GAS_PRICE_BUFFER=20 # 20% buffer on gas estimates
# Transaction settings
NEXT_PUBLIC_DEFAULT_CONFIRMATIONS=1 # Required confirmations for transactions
# Nova Poshta API key for Address and Warehouse lookups (optional)
NOVAPOST_API_KEY=your_nova_poshta_api_key
# =============================================================================
# 🤖 AI/LLM CONFIGURATION (Ring Matcher System)
# =============================================================================
# LLM provider configuration for AI-powered opportunity matching
# Get API keys from: https://platform.openai.com/api-keys or https://console.anthropic.com/
# Primary LLM Provider ('openai' or 'anthropic')
LLM_PROVIDER=openai
# OpenAI Configuration (required if using OpenAI)
OPENAI_API_KEY=your_openai_api_key_here
# Anthropic Configuration (required if using Anthropic)
ANTHROPIC_API_KEY=your_anthropic_api_key_here
# LLM Model Configuration
# OpenAI: 'gpt-4o', 'gpt-4-turbo', 'gpt-3.5-turbo'
# Anthropic: 'claude-3-5-sonnet-20241022', 'claude-3-haiku-20240307'
LLM_MODEL=gpt-4o
# Matching Configuration
MATCHING_SCORE_THRESHOLD=0.7 # Minimum match score (0.0-1.0) to trigger notifications
MAX_MATCHES_PER_OPPORTUNITY=10 # Maximum matches to return per opportunity
MATCHING_MAX_TOKENS=2000 # Maximum tokens for LLM matching requests
# Vector Store Configuration (optional - for advanced matching)
RING_VECTOR_STORE=memory # 'memory', 'pgvector', or 'pinecone'
PGVECTOR_URL=your_pgvectors_url # PostgreSQL with pgvector extension
PINECONE_API_KEY=your_pinecone_api_key # Pinecone vector database
# =============================================================================
# 💳 WAYFORPAY PAYMENT INTEGRATION
# =============================================================================
# WayForPay payment gateway configuration for membership upgrades
# Get these from: https://wayforpay.com/en/account/api
WAYFORPAY_MERCHANT_ACCOUNT=your_wayforpay_merchant_account
WAYFORPAY_SECRET_KEY=your_wayforpay_secret_key
WAYFORPAY_DOMAIN=your_domain.com