Skip to main content

Configuration

The core app runs without environment variables. Add environment variables only for the services you want to enable.

Environment variables

VariableRequired forScope
VITE_SUPABASE_URLSupabase auth and cloud syncBrowser
VITE_SUPABASE_ANON_KEYSupabase auth and cloud syncBrowser
SUPABASE_URLSupabase URL used by FunctionsServer only
SUPABASE_PUBLISHABLE_KEYAccess-token verification in FunctionsServer only
SUPABASE_SECRET_KEYNotifications, premium activation, public API access, and AI capture quotasServer only
SUPABASE_SERVICE_ROLE_KEYLegacy alias for SUPABASE_SECRET_KEYServer only
VITE_STRIPE_PUBLISHABLE_KEYEnables the payment UI; never trusted for checkout authorizationBrowser
STRIPE_SECRET_KEYStripe checkout session creationServer only
STRIPE_WEBHOOK_SECRETStripe webhook verificationServer only
STRIPE_PRICE_IDThe only Stripe Price accepted by the serverServer only
SITE_URLCheckout success and cancellation URLServer only
URLNetlify function callback URLsProvided by Netlify
API_FREE_RATE_LIMIT_PER_HOURFree user public API requests per user per hour; defaults to 60Server only
API_PREMIUM_RATE_LIMIT_PER_HOURPremium user public API requests per user per hour; defaults to 1000Server only
API_FREE_ACTIVE_KEYSFree user active API key limit; defaults to 1Server only
API_PREMIUM_ACTIVE_KEYSPremium user active API key limit; defaults to 5Server only
API_FAILED_AUTH_RATE_LIMIT_PER_HOURFailed API key authentication attempts per client identity per hour; defaults to 300Server only
API_RATE_LIMIT_RETENTION_HOURSRate limit window retention before scheduled cleanup; defaults to 48Server only
OPENROUTER_API_KEYEnables AI capture with OpenRouterServer only
ANTHROPIC_API_KEYEnables AI capture with AnthropicServer only
AI_PROVIDEROptional provider override: openrouter or anthropicServer only
AI_MODELAI capture model overrideServer only
AI_FALLBACK_MODELSComma-separated OpenRouter fallback modelsServer only
OPENROUTER_SITE_URLOptional OpenRouter referer; falls back to SITE_URL or URLServer only
OPENROUTER_APP_TITLEOptional OpenRouter app title headerServer only
AI_FREE_DAILY_PARSESFree user AI captures per day; defaults to 20Server only
AI_PREMIUM_DAILY_PARSESPremium user AI captures per day; defaults to 200Server only
AI_MAX_INPUT_CHARSAI capture text input cap; defaults to 20000Server only
AI_MAX_IMAGE_BYTESAI capture image cap; defaults to 4194304Server only
AI_MONTHLY_BUDGET_USDWorkspace-wide monthly AI capture budget; defaults to 50Server only
AI_INPUT_USD_PER_MTOKInput-token cost estimate per million tokensServer only
AI_OUTPUT_USD_PER_MTOKOutput-token cost estimate per million tokensServer only

Browser variables

Variables prefixed with VITE_ are included in the browser bundle. Do not put secrets in them. Use browser variables only for public configuration such as Supabase URL, Supabase anon key, and Stripe publishable key.

Server variables

Server-only variables must be configured in the hosting provider, such as Netlify environment variables. Never commit service role keys, Stripe secret keys, or webhook secrets. Functions prefer the server-only names above and temporarily support the existing VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY, and VITE_STRIPE_PRICE_ID names. VITE_STRIPE_PRICE_ID is a legacy server fallback only and is no longer read by browser code.

Feature detection

The app checks environment variables at runtime:
  • Supabase variables enable authentication and cloud sync.
  • Stripe variables enable payment flow.
  • Public API keys require Supabase and Netlify Functions; quota variables only override the defaults.
  • AI capture requires Supabase, Netlify Functions, the AI capture migrations, and either OPENROUTER_API_KEY or ANTHROPIC_API_KEY.
  • Missing optional variables keep the app in local-first mode.

Bark settings

Bark notification settings are configured in the app UI. Users provide their Bark server URL, device key, and reminder timing.