.env.local file for local development. Copy the example file to get started:
Supabase
These variables connect the app to your Supabase project. TheNEXT_PUBLIC_ prefixed variables are safe to expose to the browser; the service role keys must remain server-only.
The base URL of your Supabase project. For local development this is
http://localhost:54321. For production, find it in your Supabase dashboard under Project Settings → API → Project URL.The anonymous (public) JWT for your Supabase project. Safe to expose to the browser — Row Level Security enforces data access. Find it in Project Settings → API → Project API Keys →
anon public.The service role JWT that bypasses RLS. Used only in server-side routes and background jobs. Never expose this to the browser. Find it in Project Settings → API → Project API Keys →
service_role secret.Previous version of the service role key, retained for rolling-key rotation. Leave blank unless actively rotating keys.
Current version of the service role key used during key rotation. Leave blank unless actively rotating keys.
Indicates which version slot (
v1 or v2) is currently active during key rotation. Leave blank unless using the rotation mechanism.Google OAuth
Required only if you enable Google sign-in. These are configured insidesupabase/config.toml under [auth.external.google] — not in .env.local. The Supabase CLI reads them from the config file via the env(...) syntax:
supabase/config.toml
.env file that the Supabase CLI can read:
OAuth 2.0 client ID from the Google Cloud Console. Create an OAuth client ID of type Web application and copy the client ID.
OAuth 2.0 client secret from the same Google Cloud credential entry. Keep this server-side only.
For local development, add
http://127.0.0.1:54321/auth/v1/callback as an authorised redirect URI in your Google Cloud OAuth credential. These variables are consumed by the Supabase local stack only — they are not read by the Next.js server.Email — Resend
Sintesis sends transactional email (invitations, notifications) via Resend.Your Resend API key. Create one in the Resend dashboard under API Keys. The key starts with
re_.The verified sender address used in outgoing emails, e.g.
[email protected]. The domain must be verified in your Resend account.Previous Resend API key slot for rolling-key rotation.
Current Resend API key slot during rotation.
Active version slot (
v1 or v2) during key rotation.AI providers
OpenAI API key used for AI-assisted features such as OCR post-processing and document analysis. Create one in the OpenAI Platform under API Keys. The key starts with
sk-.Previous OpenAI key slot for rolling-key rotation.
Current OpenAI key slot during rotation.
Active version slot (
v1 or v2) during rotation.Sintesis also supports Google AI via
@ai-sdk/google. No separate environment variable is listed in env.example; if you add Google AI features, add GOOGLE_GENERATIVE_AI_API_KEY following the same pattern.WhatsApp Cloud API
All WhatsApp variables are server-only. Never expose them to the browser.Permanent or temporary access token for the WhatsApp Cloud API. Generate one in the Meta for Developers portal under your app’s WhatsApp → API Setup section.
Numeric ID of the phone number you registered with the WhatsApp Cloud API. Found in Meta for Developers → WhatsApp → API Setup → Phone number ID.
A string you define and provide to Meta when setting up the webhook. Sintesis uses it to verify incoming webhook requests from Meta.
Upstash Redis — rate limiting
Sintesis uses Upstash Redis to enforce per-IP and per-tenant rate limits on API routes.REST endpoint of your Upstash Redis database. Found in the Upstash console under Databases → your database → REST API.
Authentication token for the Upstash Redis REST API. Found alongside the REST URL in the Upstash console.
Maximum number of requests allowed per IP address within the configured window. Defaults to
120.Time window for the per-IP rate limit. Uses Upstash duration syntax, e.g.
1m, 30s, 5m.Maximum number of requests allowed per tenant within the configured window. Defaults to
2000.Time window for the per-tenant rate limit. Defaults to
5m.Domain split
Sintesis supports an optional configuration where the marketing site lives on the root domain and the application lives on anapp. subdomain.
Set to
true to activate domain-split routing. When enabled, Next.js middleware redirects users between the marketing and app domains based on the route.The hostname for the application subdomain. Used in server-side redirect logic.
The hostname for the marketing/root domain. Used in server-side redirect logic.
Client-side equivalent of
ENABLE_DOMAIN_SPLIT. Must match the server-side value.Client-side equivalent of
APP_HOST. Used in client components that build cross-domain links.Client-side equivalent of
MARKETING_HOST.Request signing
Set to
1 to disable HMAC request signing for internal API calls. Useful during local development if you do not have a signing key configured. Leave at 0 in production.Maximum age in milliseconds for a signed request before it is rejected as a replay. Defaults to
300000 (5 minutes).Monitoring — Sentry
Error tracking and performance monitoring via Sentry. Sentry is only active on Vercel production builds (VERCEL_ENV=production).
The Data Source Name for your Sentry project. Found in Sentry → Settings → Projects → your project → Client Keys (DSN).
The environment name reported to Sentry (e.g.
development, staging, production).Fraction of transactions to send to Sentry for performance monitoring (0–1). Keep low in production to control costs.
Fraction of sampled transactions that also capture a performance profile.
Fraction of sessions where an error occurred for which a Session Replay is captured. Defaults to
1 (capture all error sessions).Fraction of all sessions to capture as Session Replays. Defaults to
0 to avoid storage costs in development.Your Sentry organisation slug. Used by the Sentry webpack plugin to upload source maps during production builds. Found in Sentry → Settings → General Settings → Organization slug.
Your Sentry project slug. Used by the webpack plugin alongside
SENTRY_ORG.Health checks and cron
A secret token that uptime monitoring services must include in the
Authorization header when calling the health-check endpoint. Generate a random string, e.g. openssl rand -hex 32.A secret used to authenticate requests to cron-triggered API routes (schedule runners, orphan cleanup jobs). Vercel Cron sends this automatically when you configure it in
vercel.json. Generate with openssl rand -hex 32.