Skip to main content
AnotherWrapper does not use one giant configuration file. The main config surface is a mix of environment variables, shared site config in config.ts, and app-specific toolConfig.ts files.

The Three Main Configuration Layers

1. Environment variables

.env.example is the source of truth for the repo’s environment variables. This covers:
  • Supabase
  • AI providers
  • payments
  • email
  • analytics
  • Meta attribution
  • Sentry
  • storage

2. Shared site config

config.ts defines the main shared site constants and route links, such as:
  • site URLs
  • support email
  • route helpers
  • marketing links
  • template/app links
This is where you update global naming and link behavior.

3. App-level tool config

Several product apps also have a toolConfig.ts file. These define app-specific behavior such as:
  • app title and metadata
  • credits cost
  • default model
  • tool path
  • app description
Good examples are:
  • app/(apps)/vision/toolConfig.ts
  • app/(apps)/voice/toolConfig.ts
  • app/(apps)/structured-output/toolConfig.ts

Env Var Groups

Core App

These are the minimum basics:
PRODUCTION_URL=http://localhost:3000
NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...
NEXT_SUPABASE_SERVICE_KEY=...
OPENAI_API_KEY=...
If those are missing, you will not get very far.

AI Providers

The repo supports multiple providers, but you only need the ones you actually plan to expose. Examples:
OPENAI_API_KEY=...
ANTHROPIC_API_KEY=...
GOOGLE_GENERATIVE_AI_API_KEY=...
GROQ_API_KEY=...
XAI_API_KEY=...
DEEPSEEK_API_KEY=...
REPLICATE_API_TOKEN=...
ELEVENLABS_API_TOKEN=...
Important detail:
  • chat can work with many providers
  • PDF RAG currently still depends on OpenAI embeddings
  • image/video generation often depends on Replicate in addition to OpenAI or Google
  • voice workflows depend on ElevenLabs

Storage

Uploads and generated assets depend on the S3-compatible storage settings:
STORAGE_REGION=...
STORAGE_ACCESS_KEY=...
STORAGE_SECRET_KEY=...
STORAGE_ENDPOINT=...
STORAGE_BUCKET=...
STORAGE_PUBLIC_URL=...
Without storage, many of the most useful workflows break:
  • chat file upload
  • PDF document flows
  • image outputs
  • video outputs
  • voice outputs
  • vision uploads

Payments

The repo uses a provider-agnostic payment layer, but you still choose one provider with env vars.
NEXT_PUBLIC_PAYMENT_PROVIDER=lemonsqueezy
NEXT_PUBLIC_DEFAULT_MARKETING_PURCHASE_TYPE=anotherwrapper-enterprise
NEXT_PUBLIC_CHECKOUT_URL_TEMPLATE=...
Then add the secret for the provider you actually use, such as:
  • LEMON_SQUEEZY_WEBHOOK_SECRET
  • STRIPE_SECRET_KEY
  • STRIPE_WEBHOOK_SECRET
  • POLAR_WEBHOOK_SECRET

Email

Email is also provider-driven:
NEXT_PUBLIC_EMAIL_PROVIDER=loops
EMAIL_PROVIDER=loops
Then add the matching provider secret:
  • LOOPS_API_KEY
  • RESEND_API_KEY
  • BREVO_API_KEY

Analytics

Analytics supports one or more providers:
NEXT_PUBLIC_ANALYTICS_PROVIDER=posthog,datafast
Then configure the specific providers you want:
  • PostHog
  • Plausible
  • DataFast

Meta Attribution

Meta Ads attribution is separate from normal analytics and is optional:
NEXT_PUBLIC_ENABLE_META_ATTRIBUTION=false
NEXT_PUBLIC_META_PIXEL_ID=
META_ACCESS_TOKEN=
Enable this only if you actually run Meta Ads and want checkout attribution.

Sentry

The minimum setup is:
NEXT_PUBLIC_SENTRY_DSN=...
Server-side overrides and tracing variables are optional.

Best Practice For Beginners

Do not try to fill every env var on day one. The clean order is:
  1. Supabase
  2. OpenAI
  3. storage
  4. your main payment provider
  5. your main email provider
  6. analytics
  7. optional extras like Meta and Sentry

Common Mistakes

  • using .env instead of .env.local
  • using the wrong Supabase service key variable name
  • enabling provider features without adding the matching secret
  • expecting uploads to work without storage
  • setting payment env vars but forgetting hosted checkout URLs
  • forgetting that NEXT_PUBLIC_APP_URL affects auth redirects and runtime URL helpers