Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
274 lines (256 loc) · 15.3 KB
/
Copy path.env.example
File metadata and controls
274 lines (256 loc) · 15.3 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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# =============================================================================
# AEO Platform — Environment Variables
# Copy this file to .env.local and fill in your values
# =============================================================================
# -----------------------------------------------------------------------------
# Supabase
# Get these from: https://supabase.com/dashboard/project/YOUR_PROJECT/settings/api
# -----------------------------------------------------------------------------
NEXT_PUBLIC_SUPABASE_URL=https://xxxxxxxxxxxxxxxxxxxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
# -----------------------------------------------------------------------------
# AI API Keys (users can provide their own)
# -----------------------------------------------------------------------------
OPENAI_API_KEY=sk-...
GOOGLE_GEMINI_API_KEY=AIza...
ANTHROPIC_API_KEY=sk-ant-...
# Optional (Chat's model menu, W4-03): Ansvisor's OpenRouter key for picked
# models offered through OpenRouter. Unset, the menu offers Claude's models
# only and such a pick runs on Auto. With Chat on, Chat (W4-08) and the
# Content Editor's Generate with AI (W4-09) make images on it too (Nano
# Banana, GPT-5 Image Mini), each request drawing on the workspace's AI budget
# at what OpenRouter billed; a workspace whose own key is an OpenRouter one
# uses its own. Unset, no images are made.
OPENROUTER_API_KEY=
# -----------------------------------------------------------------------------
# Agent (in-product BYOK)
# -----------------------------------------------------------------------------
# Cloud customers paste their own AI provider keys in Settings › AI
# Providers. We encrypt them at rest with AES-256-GCM; this is the master key. Must be a
# 32-byte (256-bit) value, base64-encoded.
# Generate one: `openssl rand -base64 32`
# Self-host instances can skip this — they use ANTHROPIC_API_KEY directly.
ANSVISOR_ENCRYPTION_KEY=base64-32-bytes-here
PERPLEXITY_API_KEY=pplx-...
GROK_API_KEY=xai-...
# -----------------------------------------------------------------------------
# App
# -----------------------------------------------------------------------------
NEXT_PUBLIC_APP_URL=http://localhost:3000
# -----------------------------------------------------------------------------
# Product analytics (optional — OFF by default for self-hosted)
# -----------------------------------------------------------------------------
# When unset, PostHog is never loaded and no events are sent anywhere.
# Set NEXT_PUBLIC_POSTHOG_KEY to enable funnel / retention analytics. You can
# point it at PostHog Cloud, your own self-hosted PostHog, or any compatible
# endpoint via NEXT_PUBLIC_POSTHOG_HOST. The official cloud deployment uses
# its own PostHog project; self-host users get zero telemetry by default.
# With a key set, PostHog records page views, the events in the code, session
# replays (every input masked) and heatmaps (click, move and scroll points,
# no element text). URLs lose invite tokens, addresses and sign-in codes
# first (web/src/lib/analytics-privacy.ts).
# And upgrade walls, error toasts and key flows, by id (lib/friction-events.ts).
NEXT_PUBLIC_POSTHOG_KEY=
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
# -----------------------------------------------------------------------------
# Welcome e-mail (optional)
# -----------------------------------------------------------------------------
# Resend's API key, the same as the API server's (server/.env). This app sends
# Resend the `user.signed_up` event from a new account's first signed-in page;
# it starts the welcome e-mail Automation set up in Resend. Unset: no welcome
# event is sent and no account is claimed for it, and the app logs
# "RESEND_API_KEY is not set" once per server process. A refused event (a
# 4xx) is tried again from a later page, up to 3 times; on a 5xx, a timeout or
# a network error it is not, as Resend may have it. An e-mail sign-up whose
# address is never confirmed never reaches a signed-in page, so it never gets
# the welcome (by design). For accounts that missed it, run
# server/src/scripts/send-missed-welcome.js on the API server.
# On the cloud, the Stripe webhook also sends `trial.ending` 3 days before a
# free trial ends, once per trial, for the trial reminder Automation
# (web/src/lib/billing/trial-ending.ts).
# RESEND_API_KEY=re_...
# -----------------------------------------------------------------------------
# Cloud / Self-hosted mode
# Set to "true" only for the official cloud deployment.
# Self-hosted instances should leave this unset or "false" — all features
# will be unlocked automatically.
# -----------------------------------------------------------------------------
NEXT_PUBLIC_IS_CLOUD=false
# -----------------------------------------------------------------------------
# MCP over OAuth (#2141): apps such as Claude and ChatGPT connect to /api/mcp by
# signing the person in, instead of a pasted API key. On by default wherever
# NEXT_PUBLIC_APP_URL is https (or http on localhost) with no path: it is the
# authorization server's issuer, so an install on plain http elsewhere stays
# off. Set MCP_OAUTH_ENABLED=false to switch it off (the kill switch). API keys
# work either way.
# -----------------------------------------------------------------------------
# MCP_OAUTH_ENABLED=
# OpenAI's domain check for the ChatGPT app: the token OpenAI's portal gives,
# served as plain text at /.well-known/openai-apps-challenge (404 while unset).
# OPENAI_APPS_CHALLENGE=
# -----------------------------------------------------------------------------
# Action Center: show "Regenerate tasks" in an action's Tasks tab (AC-004).
# Set to "true" together with the server's ACTION_TASKS_AI.
# -----------------------------------------------------------------------------
NEXT_PUBLIC_ACTION_TASKS_AI=
# -----------------------------------------------------------------------------
# Content Editor Quality (Drive quality spec): which phase is live, 0 (unset)
# for none. 1 shows Instructions › Quality and the header's Quality chip.
# 2 adds the AI checks, starting with the site type picked in the editor
# (CE-056); set the server's CONTENT_QUALITY_PHASE to the same value, so the
# Content Agent is told it too. 3 weighs the checks by the page's type (a
# product page has no author, a comparison wants balance; CE-052).
# -----------------------------------------------------------------------------
NEXT_PUBLIC_CONTENT_QUALITY_PHASE=
# -----------------------------------------------------------------------------
# Visibility result cache: Overview, Mentions and Citations results kept in
# Next's data cache per brand, filters and the brand's latest results, so a
# tab opened again is one lookup (lib/visibility-cache). Off unless "true";
# off, every read runs as before. Read by server code at request time; a
# change applies once the app starts again (a new deployment on Vercel).
# VISIBILITY_CACHE_ORGS: with it on, only these organizations (ids,
# comma-separated); empty = every organization. Web only.
# Pre-warm: with the API server's VISIBILITY_PREWARM_ENABLED on, the server
# calls this app's /api/internal/visibility-prewarm after each brand's run
# stamps, with "Authorization: Bearer ${CRON_SECRET}" (CRON_SECRET below, the
# same on both), and the common views are stored before anyone opens them.
# Nothing to set here beyond CRON_SECRET; it warms only the organizations the
# cache is on for.
# -----------------------------------------------------------------------------
VISIBILITY_CACHE_ENABLED=
VISIBILITY_CACHE_ORGS=
# -----------------------------------------------------------------------------
# Chat: the new Chat (Drive Chat specs, CHAT-00…25), off unless "true".
# Off, today's /dashboard/agent stays as it is. Read by server code at
# request time (not NEXT_PUBLIC_, so never in the browser's code); a change
# applies once the app starts again: a restart when self-hosted, a new
# deployment on Vercel. Set the server's CHAT_AGENTIC and CHAT_AGENTIC_ORGS
# to the same values.
# CHAT_AGENTIC_ORGS: with Chat on, only these organizations (ids,
# comma-separated); empty = every organization.
# With Chat on, a workspace without its own key (own keys: Growth and
# Enterprise, or a Starter key saved before) runs Chat on ANTHROPIC_API_KEY
# above, and each model step draws on its monthly AI budget through the
# server's internal endpoints (CRON_SECRET below).
# -----------------------------------------------------------------------------
CHAT_AGENTIC=
CHAT_AGENTIC_ORGS=
# Agents going live on their own (Settings › Chat); off unless "true". Set the
# server's CHAT_AUTO_GO_LIVE and CHAT_AUTO_GO_LIVE_ORGS to the same values.
# CHAT_AUTO_GO_LIVE=
# With it on, only these organizations (ids, comma-separated); empty = all.
# CHAT_AUTO_GO_LIVE_ORGS=
# The AEO Operator (an agent that picks which of a person's agents run each
# morning, on one card they approve in Chat or Slack); off unless "true", on
# top of CHAT_AGENTIC. Web only: the server doesn't read it.
# CHAT_OPERATOR=
# With it on, only these organizations (ids, comma-separated); empty = all.
# CHAT_OPERATOR_ORGS=
# STAFF_EMAILS: Ansvisor staff, by sign-in e-mail (comma-separated, any
# case). With Chat on, they get the Debug switch in a chat's ⋯ menu: each
# answer's tools, inputs, outputs, tokens and cost (CHAT-03 items 25–26),
# and Chat's design preview at /dashboard/chat/preview (404 for anyone else).
# Empty = nobody. Server only, like CHAT_AGENTIC; each Debug view is logged.
STAFF_EMAILS=
# UI_LOCALES_PREVIEW=true lets anyone on this install pick the interface
# languages that have no translation yet, and the test language en-XA (English
# made ~35% longer, with accents), in Settings › Account › Language. Staff
# (STAFF_EMAILS) always can. Empty = off. Server only.
# UI_LOCALES_PREVIEW=
# The free report card's caps, as its staff view (/dashboard/admin/report-cards)
# shows them; only when the API's differ from 200 cards a day and $200 a month.
# REPORT_CARD_DAILY_CAP=200
# REPORT_CARD_MONTHLY_BUDGET_USD=200
# Chat's agents: the API server's minute cron and signal hook call this app's
# /api/internal/chat/agents/* endpoints with
# "Authorization: Bearer ${CHAT_INTERNAL_SECRET}". Set the server's
# CHAT_INTERNAL_SECRET to the same value; unset, those calls are refused (401)
# and agents run only by Run now. Generate: openssl rand -hex 32
CHAT_INTERNAL_SECRET=
# The other way: an agent's triggered run has no one's session, so this
# app's writes through the API server for it (an opportunity's status, a
# dismissed prompt suggestion, Send to Action Center and its duplicate
# check), and its reads of Ads' Opportunities with ADS_ENABLED on, send
# "Authorization: Bearer ${CHAT_ACTING_SECRET}" and
# "X-Acting-User: <the member's id>". A secret of its own, not
# CHAT_INTERNAL_SECRET's value; set the server's CHAT_ACTING_SECRET to the
# same value. At least 32 characters; unset or shorter, or a value that
# differs from the server's (it answers 401), those changes ask first in such
# a run, on a card in the owner's Inbox.
# Generate: openssl rand -hex 32
CHAT_ACTING_SECRET=
# Chat's skill import from a GitHub link (W3-09b): a fine-grained token with
# no permissions, which reads public repositories only. Optional: unset, the
# import asks GitHub's API anonymously (60 requests an hour per server).
GITHUB_TOKEN=
# -----------------------------------------------------------------------------
# Ads (Drive Ads spec, ADS-01), an internal preview. Ads is in development:
# leave unset in production. "true" (local development and preview
# deployments only) puts Analytics > Ads on the menu and opens /dashboard/ads,
# for every workspace on the install; anything else, Ads is on no menu and
# its page is not found. No per-workspace or per-person switch. Read by
# server code at request time (not NEXT_PUBLIC_, so never in the browser's
# code), like CHAT_AGENTIC; a change applies once the app starts again.
# The API server reads it too: set its ADS_ENABLED to the same value.
# -----------------------------------------------------------------------------
ADS_ENABLED=
# -----------------------------------------------------------------------------
# ChatGPT Business Hub (Businesses in ChatGPT), an internal preview until its
# pages, names and regions are confirmed: leave unset in production. "true"
# turns on the Business Hub features for every workspace on the install; they
# add no menu item or page. Read by server code at request time (not
# NEXT_PUBLIC_), like ADS_ENABLED; a change applies once the app starts again.
# The API server reads it too: set its BUSINESS_HUB_ENABLED to the same value.
# -----------------------------------------------------------------------------
BUSINESS_HUB_ENABLED=
# -----------------------------------------------------------------------------
# AEO Server (backend API)
# -----------------------------------------------------------------------------
NEXT_PUBLIC_API_URL=http://localhost:80
# -----------------------------------------------------------------------------
# Cron / Internal-endpoint secret (cloud, and self-hosted with Chat on)
# -----------------------------------------------------------------------------
# Shared secret that authenticates calls from the web layer to the server's
# internal endpoints. Used by:
# - Vercel Cron → /api/cron/daily-tracking
# - Stripe success route → post-checkout tracking trigger
# - MCP layer → content-brief generation (throws if unset)
# - Chat (CHAT_AGENTIC) → each model step's AI budget; without it Chat
# can't answer, self-hosted too
# Web sends: Authorization: Bearer ${CRON_SECRET}
# Server checks its own CRON_SECRET copy — both values MUST match.
# Generate: openssl rand -hex 32
# CRON_SECRET=
# -----------------------------------------------------------------------------
# Stripe (cloud only — not needed for self-hosted)
# -----------------------------------------------------------------------------
# NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
# STRIPE_SECRET_KEY=sk_test_...
# STRIPE_WEBHOOK_SECRET=whsec_...
# STRIPE_STARTER_MONTHLY_PRICE_ID=price_...
# STRIPE_GROWTH_MONTHLY_PRICE_ID=price_...
# Annual prices (a year up front, 20% off twelve months: Starter $470, Growth
# $2,390 — the amounts in web/src/config/plans.ts). Without them the Billing
# page's Annual choice can't be bought.
# STRIPE_STARTER_ANNUAL_PRICE_ID=price_...
# STRIPE_GROWTH_ANNUAL_PRICE_ID=price_...
# The first-month offer with "Buy now": 50% off a monthly plan's first month
# through the SAVE50 promotion code (FIRST_MONTH_OFFER in
# web/src/config/plans.ts). On unless set to `off`; off, every plan button
# and line shows the plain price. End the code in Stripe as well.
# NEXT_PUBLIC_FIRST_MONTH_OFFER=
# -----------------------------------------------------------------------------
# Supabase Service Role Key (cloud only — for Stripe webhooks)
# -----------------------------------------------------------------------------
# SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOi...
# -----------------------------------------------------------------------------
# Extensions (optional; leave unset when self-hosting)
# -----------------------------------------------------------------------------
# A build may list extension modules in web/src/extensions/index.ts; this repo
# lists none, so these do nothing here. Server only, read at request time.
# See docs/contributing/extensions.md.
# EXTENSIONS_ENABLED=
# EXTENSIONS_ORGS=
# EXTENSIONS_IDS=
# EXTENSIONS_SERVICE_URL=
# EXTENSIONS_SERVICE_SECRET=