From 9b5ca4209181eeeca31d30f034061c8341f2e364 Mon Sep 17 00:00:00 2001 From: MananTank Date: Fri, 1 Aug 2025 20:59:25 +0000 Subject: [PATCH] Dashboard: Remove unused envs from .env.example and turbo config (#7779) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## PR-Codex overview This PR primarily focuses on cleaning up the environment variables in the `turbo.json` and `.env.example` files, removing several unused keys and updating comments for clarity. ### Detailed summary - Removed multiple environment variables from `turbo.json`. - Updated comments and reorganized sections in `apps/dashboard/.env.example`. - Added `NEXT_PUBLIC_THIRDWEB_VAULT_URL` and `NEXT_PUBLIC_ENGINE_CLOUD_URL` as required. - Clarified purpose for `DASHBOARD_SECRET_KEY` and `API_ROUTES_CLIENT_ID`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` ## Summary by CodeRabbit * **Chores** * Cleaned up and reorganized environment variable examples for improved clarity and usability. * Removed deprecated and unused environment variables. * Updated placeholder formatting and improved instructions for setting required variables. * Simplified and reduced the environment variable list used during dashboard build tasks. * Added new environment variables for insight service and Stripe integration. --- apps/dashboard/.env.example | 66 +++++++++++-------------------------- turbo.json | 18 ++-------- 2 files changed, 22 insertions(+), 62 deletions(-) diff --git a/apps/dashboard/.env.example b/apps/dashboard/.env.example index ecb488aa74b..a5d73272512 100644 --- a/apps/dashboard/.env.example +++ b/apps/dashboard/.env.example @@ -1,29 +1,22 @@ -# # Public (client) -# - -# API authorized domain -# not required to build, defaults to prod -NEXT_PUBLIC_THIRDWEB_DOMAIN="localhost:3000" +# ------------------------------------------------------------------------ # API host. For local development, please use "https://api.thirdweb-dev.com" # otherwise: "https://api.thirdweb.com" +# local host - http://127.0.0.1:3005 NEXT_PUBLIC_THIRDWEB_API_HOST="https://api.thirdweb-dev.com" # Bridge API. For local development, please use "https://bridge.thirdweb-dev.com" # otherwise: "https://bridge.thirdweb.com" NEXT_PUBLIC_THIRDWEB_BRIDGE_HOST="https://bridge.thirdweb-dev.com" -# Paper API host +# in-app wallet host NEXT_PUBLIC_THIRDWEB_EWS_API_HOST="https://ews.thirdweb-dev.com" -# thirdweb local api host -# NEXT_PUBLIC_THIRDWEB_API_HOST="http://127.0.0.1:3005" - -# Client ID -# Get the client id from https://thirdweb.com/create-api-key and set it here, +# Client ID - Required +# Get the client id from https://thirdweb.com/create-api-key and set it here, and also set DASHBOARD_SECRET_KEY below # make sure to allow localhost:3000 in the allowed origins -NEXT_PUBLIC_DASHBOARD_CLIENT_ID="" +NEXT_PUBLIC_DASHBOARD_CLIENT_ID="" # IPFS gateway url NEXT_PUBLIC_IPFS_GATEWAY_URL="https://{clientId}.thirdwebstorage-dev.com/ipfs/{cid}/{path}" @@ -39,54 +32,35 @@ NEXT_PUBLIC_TYPESENSE_CONTRACT_API_KEY= # - not required for prod/staging NEXT_PUBLIC_POSTHOG_KEY="" -# Stripe Customer portal -NEXT_PUBLIC_STRIPE_KEY= - -NEXT_PUBLIC_STRIPE_PAYMENT_METHOD_CFG_ID= - -# -# Private (server) -# -# Get the secret key from https://thirdweb.com/create-api-key and set it here, Make sure to allow localhost:3000 in the allowed origins -DASHBOARD_SECRET_KEY="" - -# Client id for api routes -API_ROUTES_CLIENT_ID= +# required for server wallet management +NEXT_PUBLIC_THIRDWEB_VAULT_URL="" +NEXT_PUBLIC_ENGINE_CLOUD_URL="" +# Demo Engine - required for showing demo engine page +NEXT_PUBLIC_DEMO_ENGINE_URL="" -# Hubspot Access Token (used for contact us form) -# - not required to build (unless testing contact us form)> -HUBSPOT_ACCESS_TOKEN= -# Upload server url -NEXT_PUBLIC_DASHBOARD_UPLOAD_SERVER="https://storage.thirdweb-preview.com" +# Private (server) +# ------------------------------------------------------------------------ -# Unthread variables - only required for submitting the support form in /support -UNTHREAD_API_KEY="" -UNTHREAD_TRIAGE_CHANNEL_ID="" -UNTHREAD_EMAIL_INBOX_ID="" -UNTHREAD_FREE_TIER_ID="" -UNTHREAD_GROWTH_TIER_ID="" -UNTHREAD_PRO_TIER_ID="" +# Get the secret key from https://thirdweb.com/create-api-key and set it here and also set NEXT_PUBLIC_DASHBOARD_CLIENT_ID above, +# Make sure to allow localhost:3000 in the allowed origins +DASHBOARD_SECRET_KEY="" -# Demo Engine -NEXT_PUBLIC_DEMO_ENGINE_URL="" +# Client id for api routes - required for contract OG image generation +API_ROUTES_CLIENT_ID= # API server secret (required for thirdweb.com SIWE login). Copy from Vercel. API_SERVER_SECRET="" -# Used for the Faucet page (/) +# Used in faucet on chain page (/) and login page (/login) - turnstile is disabled in localhost development NEXT_PUBLIC_TURNSTILE_SITE_KEY="" TURNSTILE_SECRET_KEY="" + REDIS_URL="" ANALYTICS_SERVICE_URL="" - # required for billing parts of the dashboard (team -> settings -> billing / invoices) STRIPE_SECRET_KEY="" - -# required for server wallet management -NEXT_PUBLIC_THIRDWEB_VAULT_URL="" -NEXT_PUBLIC_ENGINE_CLOUD_URL="" \ No newline at end of file diff --git a/turbo.json b/turbo.json index 54375156430..00c7029f13d 100644 --- a/turbo.json +++ b/turbo.json @@ -72,30 +72,15 @@ "dependsOn": ["^build"], "env": [ "SENTRY_AUTH_TOKEN", - "MORALIS_API_KEY", - "ETHERSCAN_KEY", - "SSR_ALCHEMY_KEY", "BEEHIIV_API_KEY", - "GITHUB_API_TOKEN", - "LUMA_API_KEY", - "HUBSPOT_ACCESS_TOKEN", "API_ROUTES_CLIENT_ID", "DASHBOARD_SECRET_KEY", "SIMPLEHASH_API_KEY", - "NEYNAR_API_KEY", "THIRDWEB_ENGINE_URL", "THIRDWEB_ACCESS_TOKEN", "THIRDWEB_ENGINE_ACCESS_TOKEN", - "DEGEN_THIRDWEB_ENGINE_WALLET", "THIRDWEB_ENGINE_WALLET", - "UNTHREAD_TRIAGE_CHANNEL_ID", - "UNTHREAD_EMAIL_INBOX_ID", - "UNTHREAD_FREE_TIER_ID", - "UNTHREAD_GROWTH_TIER_ID", - "UNTHREAD_PRO_TIER_ID", "REDIS_URL", - "UNTHREAD_API_KEY", - "CHAINSAW_API_KEY", "ANALYTICS_SERVICE_URL", "DISABLE_FAUCET_CHAIN_IDS", "API_SERVER_SECRET", @@ -103,7 +88,8 @@ "NEXT_PUBLIC_TURNSTILE_SITE_KEY", "NEXT_PUBLIC_THIRDWEB_ENGINE_FAUCET_WALLET", "NEXT_PUBLIC_NEBULA_URL", - "INSIGHT_SERVICE_API_KEY" + "INSIGHT_SERVICE_API_KEY", + "STRIPE_SECRET_KEY" ], "outputs": [".next/**", "!.next/cache/**"] },