Skip to main content
Copy .env.local.example to .env.local and fill in the values below.
cp .env.local.example .env.local

Clerk (authentication)

Clerk handles user sign-in, sign-up, and session management.
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_xxx
CLERK_SECRET_KEY=sk_test_xxx
CLERK_WEBHOOK_SECRET=whsec_xxx
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
VariableDescription
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYClient-side Clerk key. Found in your Clerk application dashboard.
CLERK_SECRET_KEYServer-side Clerk key. Keep this secret.
CLERK_WEBHOOK_SECRETWebhook signing secret for syncing user records to Convex.
NEXT_PUBLIC_CLERK_SIGN_IN_URLPath for the sign-in page. Use /sign-in.
NEXT_PUBLIC_CLERK_SIGN_UP_URLPath for the sign-up page. Use /sign-up.

Convex (database)

Convex stores all application state — sessions, messages, playlists, usage events, subscriptions, influence graphs, and more.
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
VariableDescription
NEXT_PUBLIC_CONVEX_URLYour Convex deployment URL. Set automatically by npx convex dev and npx convex deploy.
CONVEX_DEPLOYMENT (e.g. dev:your-project-name) is written to .env.local automatically by the Convex CLI during npx convex dev. You do not need to set it manually.

Encryption

Used to encrypt API keys stored in the database.
ENCRYPTION_KEY=
VariableDescription
ENCRYPTION_KEYA 64-character hexadecimal string used to encrypt user API keys at rest.
Generate a secure value with:
openssl rand -hex 32
Changing ENCRYPTION_KEY after users have saved API keys will make those keys unreadable. Store this value securely and do not rotate it without a migration plan.

Platform AI key

The Anthropic API key Digcrate uses to serve free and Pro users who have not configured their own key (BYOK).
PLATFORM_ANTHROPIC_KEY=sk-ant-xxx
VariableDescription
PLATFORM_ANTHROPIC_KEYYour platform-level Anthropic API key. Costs are billed to this key for all non-BYOK queries.
This variable is required for the platform to serve free-tier users. Without it, only BYOK users can run queries. All other users will receive an error when attempting to start a research session.

Admin

ADMIN_EMAILS=admin@example.com
VariableDescription
ADMIN_EMAILSComma-separated list of email addresses. Users with these emails bypass all rate limits, usage quotas, and feature gates.

Embedded API keys

These keys are embedded in the server and used by the agent’s MCP tools. They are optional — the agent will skip tools that lack a key — but enabling them unlocks more data sources.
EMBEDDED_LASTFM_KEY=
EMBEDDED_DISCOGS_KEY=
EMBEDDED_DISCOGS_SECRET=
EMBEDDED_TICKETMASTER_KEY=
VariableDescription
EMBEDDED_LASTFM_KEYLast.fm API key for similar artists, tags, and listening stats.
EMBEDDED_DISCOGS_KEYDiscogs app key for release and label data.
EMBEDDED_DISCOGS_SECRETDiscogs app secret, paired with EMBEDDED_DISCOGS_KEY.
EMBEDDED_TICKETMASTER_KEYTicketmaster API key for concert listings.

Stripe (billing)

Required to enable subscription plans (Free, Pro, Team) and the billing portal.
STRIPE_SECRET_KEY=sk_test_xxx
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
STRIPE_PRO_MONTHLY_PRICE_ID=price_xxx
STRIPE_PRO_ANNUAL_PRICE_ID=price_xxx
STRIPE_TEAM_MONTHLY_PRICE_ID=price_xxx
VariableDescription
STRIPE_SECRET_KEYServer-side Stripe secret key.
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYClient-side Stripe publishable key.
STRIPE_WEBHOOK_SECRETWebhook signing secret for /api/webhooks/stripe.
STRIPE_PRO_MONTHLY_PRICE_IDStripe Price ID for the Pro monthly plan.
STRIPE_PRO_ANNUAL_PRICE_IDStripe Price ID for the Pro annual plan.
STRIPE_TEAM_MONTHLY_PRICE_IDStripe Price ID for the Team monthly plan.
Stripe is optional. If omitted, all users will be treated as free-tier. Subscription upgrades and the billing portal will not be available.

Auth0 Token Vault (connected services)

Required to enable Spotify, Slack, and Google Docs integrations. Auth0 Token Vault securely manages OAuth tokens on behalf of users — Digcrate never stores raw credentials.
AUTH0_DOMAIN=your-tenant.us.auth0.com
AUTH0_CLIENT_ID=your-auth0-client-id
AUTH0_CLIENT_SECRET=your-auth0-client-secret
AUTH0_TOKEN_VAULT_AUDIENCE=https://your-api-audience
AUTH0_CALLBACK_URL=http://localhost:3000/api/auth0/callback
VariableDescription
AUTH0_DOMAINYour Auth0 tenant domain (e.g. your-tenant.us.auth0.com).
AUTH0_CLIENT_IDAuth0 application client ID.
AUTH0_CLIENT_SECRETAuth0 application client secret.
AUTH0_TOKEN_VAULT_AUDIENCEThe API audience configured in Auth0 for Token Vault.
AUTH0_CALLBACK_URLOAuth callback URL. Set to your production domain in production (e.g. https://yourdomain.com/api/auth0/callback).
Auth0 Token Vault is optional. Without it, connected services (Spotify, Slack, Google Docs) will not be available to users.

Beta domains

BETA_DOMAINS=radiomilwaukee.org
VariableDescription
BETA_DOMAINSComma-separated list of email domains. Users signing up with these email domains automatically receive Pro access at no charge. Useful for beta testers, partner organizations, or radio stations.
This variable is optional.

Optional: Canny feedback widget

NEXT_PUBLIC_CANNY_APP_ID=your-canny-app-id
NEXT_PUBLIC_CANNY_URL=https://your-company.canny.io
VariableDescription
NEXT_PUBLIC_CANNY_APP_IDCanny app ID for the in-app feedback widget.
NEXT_PUBLIC_CANNY_URLYour Canny board URL.
Canny is optional. If omitted, the feedback widget will not appear.