This guide explains how to set up your local environment to work with the GCP-hosted backend (Firebase App Hosting + Secret Manager).
Install the following CLI tools:
- Google Cloud CLI: Install gcloud
- Firebase CLI:
npm install -g firebase-tools
Authenticate with your Google account that has access to the dsgt-website project:
# Login to gcloud
gcloud auth login
gcloud auth application-default login
# Login to Firebase
firebase loginSet the default project:
gcloud config set project dsgt-website
firebase use dsgt-websiteWe manage secrets in GCP Secret Manager. To avoid manually copying them into .env.local, use the sync script:
# From the root directory
./scripts/sync-secrets.shThis will pull the following from GCP:
DATABASE_URLAUTH_SECRETSTRIPE_SECRET_KEYRESEND_API_KEY- etc.
To run the entire stack (Main Web + Discord Bot) in development mode:
pnpm dev:fullIf you get a permission error when running sync-secrets.sh, make it executable:
chmod +x scripts/sync-secrets.shEnsure your account has the Secret Manager Secret Accessor role in the GCP Console for the dsgt-website project.