LogoShipTanStarter Docs

Environments

Configure environment variables for your ShipTanStarter application

ShipTanStarter requires several environment variables to function properly, and this guide explains how to set them up step by step.

Environment Variables

Website Configuration

VariableDescription
VITE_BASE_URLThe public URL of your site, e.g. http://localhost:3000 for development, https://your-domain.com for production

Cloudflare

Learn how to obtain and configure the Token in the Cloudflare guide.

VariableDescription
CLOUDFLARE_ACCOUNT_IDCloudflare account ID (for Wrangler CLI and Cloudflare REST API)
CLOUDFLARE_API_TOKENCloudflare API token (for Wrangler CLI and Cloudflare REST API)

Database

Learn how to set up a database in the Database Setup guide.

VariableDescription
CLOUDFLARE_DATABASE_IDCloudflare D1 database ID (for Drizzle Kit remote operations)

Authentication

Learn how to set up authentication in the Authentication Setup guide.

VariableDescription
BETTER_AUTH_SECRETA random string used to hash tokens and sign cookies
GOOGLE_CLIENT_IDGoogle OAuth client ID (optional)
GOOGLE_CLIENT_SECRETGoogle OAuth client secret (optional)

Email

Learn how to set up email in the Email Setup guide.

ShipTanStarter supports Resend and Cloudflare Email Service as email providers. Use the tabs below to see the environment variables for each provider.

VariableDescription
RESEND_API_KEYAPI key for Resend email service

The RESEND_API_KEY is shared between the Email and Newsletter modules when using Resend.

VariableDescription
CLOUDFLARE_ACCOUNT_IDCloudflare account ID
CLOUDFLARE_API_TOKENCloudflare API token with Email Sending Write permission

Storage

Learn how to set up storage in the Storage Setup guide.

ShipTanStarter uses Cloudflare R2 binding for storage, no additional environment variables are needed.

Payment

Learn how to set up payments in the Payment Setup guide.

ShipTanStarter supports Stripe and Creem as payment providers.

Learn how to set up Stripe in the Stripe Setup guide.

VariableDescription
VITE_PAYMENT_PROVIDERSet to stripe to enable Stripe as payment provider
STRIPE_SECRET_KEYStripe secret key
STRIPE_WEBHOOK_SECRETStripe webhook signing secret
VITE_STRIPE_PRICE_PRO_MONTHLYStripe price ID for pro monthly subscription
VITE_STRIPE_PRICE_PRO_YEARLYStripe price ID for pro yearly subscription
VITE_STRIPE_PRICE_LIFETIMEStripe price ID for lifetime one-time payment

Learn how to set up Creem in the Creem Setup guide.

VariableDescription
VITE_PAYMENT_PROVIDERSet to creem to enable Creem as payment provider
CREEM_API_KEYCreem API key
CREEM_WEBHOOK_SECRETCreem webhook signing secret
CREEM_DEBUGSet to true to use Creem sandbox API (optional)
VITE_CREEM_PRODUCT_PRO_MONTHLYCreem product ID for pro monthly subscription
VITE_CREEM_PRODUCT_PRO_YEARLYCreem product ID for pro yearly subscription
VITE_CREEM_PRODUCT_LIFETIMECreem product ID for lifetime one-time payment

AI

Learn how to set up AI in the AI Setup guide.

VariableDescription
FAL_API_KEYfal.ai API key for image generation, create one in fal.ai Dashboard

Newsletter

Learn how to set up newsletter in the Newsletter Setup guide.

ShipTanStarter supports Resend and Beehiiv as newsletter providers.

VariableDescription
RESEND_API_KEYAPI key for Resend newsletter service (shared with email module)

The RESEND_API_KEY is shared between the Email and Newsletter modules when using Resend.

VariableDescription
BEEHIIV_API_KEYAPI key for Beehiiv newsletter service
BEEHIIV_PUBLICATION_IDPublication ID for Beehiiv newsletter

Notification

Learn how to set up notification in the Notification Setup guide.

VariableDescription
DISCORD_WEBHOOK_URLDiscord webhook URL for receiving notifications
FEISHU_WEBHOOK_URLFeishu webhook URL for receiving notifications

Analytics

Learn how to set up analytics in the Analytics Setup guide.

VariableDescription
VITE_GOOGLE_ANALYTICS_IDGoogle Analytics ID
VITE_UMAMI_WEBSITE_IDUmami Analytics website ID
VITE_UMAMI_SCRIPTUmami Analytics script URL
VITE_PLAUSIBLE_SCRIPTPlausible Analytics script URL
VITE_CLARITY_PROJECT_IDClarity Analytics project ID

Chatbox

Learn how to set up chatbox in the Chatbox Setup guide.

VariableDescription
VITE_CRISP_WEBSITE_IDCrisp Chat ID for website live chat

Affiliates

Learn how to set up affiliates in the Affiliates Setup guide.

VariableDescription
VITE_AFFILIATE_AFFONSO_IDAffonso affiliate marketing ID
VITE_AFFILIATE_PROMOTEKIT_IDPromoteKit affiliate marketing ID

Verifying Environment Variables

To verify that your environment variables are correctly set up, run:

pnpm run dev

If everything is configured correctly, your application should start and run normally without any environment-related errors.

Video Tutorials

Coming soon.

Next Steps

Now that your environment is set up, explore these related topics:

On this page