Skip to content

Understanding Frontend Env

To get started with the frontend server of The DevStarter boilerplate, we need to configure the following environment variables. Each variable has been explained below with its use case and example value.

Backend Server URLs

These variables point to the backend server’s URLs.

  • NEXT_PUBLIC_BASE_URL: The base URL of the backend server.
    • Example: http://127.0.0.1:8000

Analytics

These variables are used for analytics purposes.

  • NEXT_PUBLIC_GA_ID: Google Analytics ID for tracking website traffic.
    • Example: UA-123456789-1
  • NEXT_PUBLIC_CLARITY_TAG: Clarity tag for additional website analytics.
    • Example: abc123xyz

Payments

This variable is used for payment processing.

  • NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: Stripe publishable key for handling transactions.
    • Example: pk_test_1234567890

Site Configuration

These variables configure various aspects of the website.

  • NEXT_PUBLIC_COMPANY_NAME: Name of the company or website.
    • Example: The Dev Starter
  • NEXT_PUBLIC_SITE_URL: URL of the website.
    • Example: https://thedevstarter.com
  • NEXT_PUBLIC_SUPPORT_EMAIL: Support email address.
    • Example: hello@thedevstarter.com

Error Tracking and Security

These variables are related to error tracking and security measures.

  • SENTRY_AUTH_TOKEN: Authentication token for Sentry.
    • Example: abc123xyz
  • NEXT_PUBLIC_SENTRY_DSN: Sentry DSN (Data Source Name) for error tracking.
    • Example: https://example@sentry.io/123
  • NEXT_PUBLIC_RECAPTCHA_SITE_KEY: Google reCAPTCHA site key for spam protection.
    • Example: 6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-

Customer Support

This variable is used for integrating live chat support.

  • NEXT_PUBLIC_CRISP_CHAT_WEBSTIE_ID: Crisp chat website ID for live chat support.
    • Example: abc123xyz

Waiting List Page

These variables are required to enable the waiting list page on the frontend.

  • NEXT_PUBLIC_IS_WAITING_LIST_ENABLED: Set this variable to true to enable the waiting list page.
    • Example: true
  • BREVO_API_KEY: This variable is required for collecting emails of early users.
    • Example: abc123xyz-abc123xyz

Complete List of Environment Variables

NEXT_PUBLIC_BASE_URL="http://127.0.0.1:8000"
NEXT_PUBLIC_GA_ID="Google Analytics"
NEXT_PUBLIC_CLARITY_TAG="clarity tag"
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=""
NEXT_PUBLIC_COMPANY_NAME="The Dev Starter"
NEXT_PUBLIC_SITE_URL="https://thedevstarter.com"
NEXT_PUBLIC_SUPPORT_EMAIL="hello@thedevstarter.com"
SENTRY_AUTH_TOKEN=""
NEXT_PUBLIC_SENTRY_DSN=""
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=""
NEXT_PUBLIC_CRISP_CHAT_WEBSTIE_ID=""
NEXT_PUBLIC_IS_WAITING_LIST_ENABLED="false"
BREVO_API_KEY=""