-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
167 lines (147 loc) · 6.88 KB
/
Copy path.env.example
File metadata and controls
167 lines (147 loc) · 6.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
# ============================================================================
# vibestack — environment template
# Copy to .env (dev) or .env.production (Dokploy) and fill in.
# Anything starting with NEXT_PUBLIC_ is exposed to the browser.
# Validated server-side by packages/env/src/server.ts (Zod).
# ============================================================================
NODE_ENV=development
# ---------------------------------------------------------------------------
# Core URLs
# ---------------------------------------------------------------------------
APP_URL=http://localhost:3001
CORS_ORIGIN=http://localhost:3001
NEXT_PUBLIC_APP_URL=http://localhost:3001
# Per-app URLs (used by cross-app links, e.g. marketing -> web/sign-up)
NEXT_PUBLIC_WEB_APP_URL=http://localhost:3001
NEXT_PUBLIC_MARKETING_URL=http://localhost:3000
NEXT_PUBLIC_ADMIN_URL=http://localhost:3002
# Branding (shown in nav, emails, OG cards)
NEXT_PUBLIC_BRAND_NAME=stack/saas
NEXT_PUBLIC_SUPPORT_EMAIL=hello@example.com
# ---------------------------------------------------------------------------
# Database — Postgres (via docker-compose, service "postgres")
# ---------------------------------------------------------------------------
DATABASE_URL=postgresql://postgres:password@localhost:5432/vibestack
POSTGRES_USER=postgres
POSTGRES_PASSWORD=password
POSTGRES_DB=vibestack
# ---------------------------------------------------------------------------
# Redis (via docker-compose, service "redis")
# Used for: Better Auth secondary storage, rate-limit, webhook outbox queue
# ---------------------------------------------------------------------------
REDIS_URL=redis://localhost:6379
REDIS_PASSWORD=
# ---------------------------------------------------------------------------
# Better Auth
# Generate secret: openssl rand -base64 32
# ---------------------------------------------------------------------------
BETTER_AUTH_SECRET=replace-with-32-char-secret-replace-with-32-char-
BETTER_AUTH_URL=http://localhost:3001
# ---------------------------------------------------------------------------
# Google OAuth (optional — leave blank to disable Google sign-in)
# Console: https://console.cloud.google.com/apis/credentials
# Authorized redirect: <BETTER_AUTH_URL>/api/auth/callback/google
# ---------------------------------------------------------------------------
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# ---------------------------------------------------------------------------
# Polar.sh — billing
# Sandbox dashboard: https://sandbox.polar.sh
# 1. Create access token (scopes: products:rw, customers:*, subscriptions:*,
# checkouts:*, webhooks:*)
# 2. Create products in dashboard, paste their IDs below
# 3. Webhook endpoint: <APP_URL>/api/auth/polar/webhooks
# ---------------------------------------------------------------------------
POLAR_ACCESS_TOKEN=
POLAR_SUCCESS_URL=http://localhost:3001/success?checkout_id={CHECKOUT_ID}
POLAR_WEBHOOK_SECRET=
POLAR_SERVER=sandbox
POLAR_PRODUCT_ID_PRO=
POLAR_PRODUCT_ID_TEAM=
# ---------------------------------------------------------------------------
# Resend — transactional email
# Get key at https://resend.com (free 100/day)
# For dev w/o a verified domain use EMAIL_FROM=onboarding@resend.dev
# Webhook endpoint: <APP_URL>/api/webhooks/resend (deliveries/bounces)
# ---------------------------------------------------------------------------
RESEND_API_KEY=
RESEND_WEBHOOK_SECRET=
EMAIL_FROM=hello@example.com
EMAIL_REPLY_TO=
# ---------------------------------------------------------------------------
# Cloudflare R2 — file storage + nightly DB backup target
# Dashboard: https://dash.cloudflare.com -> R2
# Create bucket + API token with Object Read & Write scope
# ---------------------------------------------------------------------------
R2_ACCOUNT_ID=
R2_ACCESS_KEY_ID=
R2_SECRET_ACCESS_KEY=
R2_BUCKET=vibestack
R2_ENDPOINT=https://<account-id>.r2.cloudflarestorage.com
R2_PUBLIC_URL=
R2_BACKUP_PREFIX=backups
# ---------------------------------------------------------------------------
# PostHog — analytics + feature flags
# Project Settings -> Project API Key (NEXT_PUBLIC_POSTHOG_KEY)
# For admin feature-flag toggle UI:
# User -> Personal API Keys (POSTHOG_PERSONAL_API_KEY)
# Project ID (POSTHOG_PROJECT_ID)
# ---------------------------------------------------------------------------
POSTHOG_KEY=
POSTHOG_HOST=https://us.i.posthog.com
POSTHOG_PERSONAL_API_KEY=
POSTHOG_PROJECT_ID=
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
# ---------------------------------------------------------------------------
# Google Analytics 4
# Admin -> Data Streams -> Web -> Measurement ID (G-XXXXXXXXXX)
# ---------------------------------------------------------------------------
NEXT_PUBLIC_GA_ID=
# ---------------------------------------------------------------------------
# Sentry — error tracking + source-map upload
# Settings -> Auth Tokens (org-level)
# Scopes: org:read, project:read, project:releases, project:write
# ---------------------------------------------------------------------------
SENTRY_DSN=
NEXT_PUBLIC_SENTRY_DSN=
SENTRY_AUTH_TOKEN=
SENTRY_ORG=
SENTRY_PROJECT=
# ---------------------------------------------------------------------------
# Google Gemini — AI agents for asset + content generation
# https://aistudio.google.com (free tier)
# Used by:
# scripts/gen-image.ts (marketing illustrations, hero, FAQ art)
# scripts/agents/write-blog-post.ts
# scripts/agents/seo-audit.ts
# scripts/agents/write-changelog.ts
# ---------------------------------------------------------------------------
GOOGLE_AI_API_KEY=
GEMINI_TEXT_MODEL=gemini-3.1-flash
GEMINI_IMAGE_MODEL=gemini-3.1-flash-image-preview
# Optional fallback if Gemini is unreachable
OPENAI_API_KEY=
# ---------------------------------------------------------------------------
# GitHub — used by AI agents to file issues + open PRs
# Either a fine-grained PAT (Issues + Pull Requests + Contents write)
# or rely on the local `gh` CLI being authenticated
# ---------------------------------------------------------------------------
GITHUB_TOKEN=
# ---------------------------------------------------------------------------
# Cron / job runner — shared secret for /api/cron/* routes
# Generate: openssl rand -base64 32
# ---------------------------------------------------------------------------
CRON_SECRET=
# ---------------------------------------------------------------------------
# Affiliate program (used by packages/api affiliate router)
# ---------------------------------------------------------------------------
AFFILIATE_COOKIE_NAME=aff_ref
AFFILIATE_COOKIE_TTL_DAYS=30
AFFILIATE_DEFAULT_RATE=0.2
# ---------------------------------------------------------------------------
# Referral program (in-app refer-a-friend credits)
# ---------------------------------------------------------------------------
REFERRAL_CREDIT_CENTS=2900
REFERRAL_MAX_PENDING_PER_USER=5
GEMINI_API_KEY=lr