Skip to content
Live demo

Environment Variables

Copy .env.example to .env.local and fill in the values relevant to your setup. Only BETTER_AUTH_SECRET is required to boot in development.

cp .env.example .env.local
VariableRequiredDefaultDescription
DATABASE_URLProduction onlyfile:rss.dblibSQL/SQLite connection string. Local dev defaults to rss.db in the project root. For Turso: libsql://your-db.turso.io
DATABASE_AUTH_TOKENOnly with TursoNoneAuth token for remote Turso databases. Not needed for local SQLite.
VariableRequiredDefaultDescription
BETTER_AUTH_SECRETYesNoneLong random string used to sign sessions. Generate with openssl rand -base64 32
APP_URLRecommendedhttp://localhost:3000The full public URL of your app. Used for email links and OAuth callbacks.
VITE_AUTH_URLRecommendedhttp://localhost:3000Client-side auth base URL. Usually the same as APP_URL.

Set exactly one of the three keys below. SparkFeed checks in priority order: OPENAI_API_KEYAI_GATEWAY_API_KEYOPENROUTER_API_KEY.

VariableDescription
OPENAI_API_KEYOpenAI API key (sk-...). Get one →
AI_GATEWAY_API_KEYVercel AI SDK Gateway key. Best for Vercel-deployed apps.
OPENROUTER_API_KEYOpenRouter key (sk-or-...). Access to 200+ models.
AI_MODELOptional. Override the default model ID for the active provider.

See AI Providers for model lists and recommendations.

Set one email option. SparkFeed checks RESEND_API_KEY first, falls back to SMTP.

VariableDescription
EMAIL_FROMSender address shown in outbound emails. e.g. SparkFeed <[email protected]>
RESEND_API_KEYResend API key (re_...). Get one →. Requires a verified sending domain.
SMTP_HOSTSMTP server hostname
SMTP_PORTSMTP port (typically 587 for TLS, 465 for SSL)
SMTP_USERSMTP username
SMTP_PASSSMTP password
SMTP_SECUREtrue for SSL/TLS, false for STARTTLS
SMTP_IGNORE_TLStrue to skip TLS verification (dev only, never in production)
VariableDefaultDescription
VITE_DEMO_MODEfalseSet to true to boot with pre-seeded feeds and no auth. Uses an isolated database. See Demo Mode for details.
BETTER_AUTH_SECRET=your-long-random-secret-here

That’s the absolute minimum. The database defaults to file:rss.db locally, and AI / email features are simply disabled until you add their keys.

See .env.example in the project root for an annotated copy of every variable.