Twin Documentation
  • Overview
  • Consumer
  • Developer
  • Operations
Dashboard Guide
Deploy
    Backend DeployFrontend DeployMigrations Checklist
MonitoringContracts & AddressesTroubleshooting
powered by Zudoku
Deploy

Frontend Deploy

Pipeline

Code
push to main | v GitHub Actions triggered (separate workflows for dashboard and platform) | v Build step: - npm ci - Vite build (VITE_* env vars injected at build time) | v Upload dist/ to AWS S3 | v CloudFront cache invalidation (/* ) | v Live

Dashboard vs Platform

The dashboard (twin-dashboard-frontend) and platform (twin-platform-frontend) are deployed by separate GitHub Actions workflows. Each has its own S3 bucket and CloudFront distribution.

Environment Variables

Critical: Vite embeds VITE_* environment variables at build time, not runtime. This means:

  • Env vars must be available when vite build runs in GitHub Actions.
  • They are baked into the JavaScript bundle.
  • Doppler is NOT used for frontend -- frontend uses GitHub Secrets.

GitHub Secrets Setup

For each VITE_* variable, add corresponding GitHub Secrets:

GitHub SecretUsed As
PRODUCTION_WALLET_CONNECT_PROJECT_IDVITE_WALLET_CONNECT_PROJECT_ID
STAGING_WALLET_CONNECT_PROJECT_IDVITE_WALLET_CONNECT_PROJECT_ID
PRODUCTION_API_URLVITE_API_URL
STAGING_API_URLVITE_API_URL

These are passed in the env: block of the Build step in .github/workflows/deploy.yml.

Staging vs Production

  • Staging: Triggered on push to develop (or manually). Uses STAGING_* GitHub Secrets.
  • Production: Triggered on push to main (or manually). Uses PRODUCTION_* GitHub Secrets.

Each environment has its own S3 bucket, CloudFront distribution, and API URL.

Troubleshooting

SymptomCauseFix
WalletConnect ProjectNotFound code 3000VITE_WALLET_CONNECT_PROJECT_ID missing or "development" in bundleAdd GitHub Secret + pass in deploy.yml env: block, re-deploy
Old content after deployCloudFront cache not invalidatedRun invalidation manually: aws cloudfront create-invalidation --distribution-id XXXXX --paths "/*"
Blank pageBuild error or missing env varCheck GHA build logs, verify all VITE_* vars are set
API calls failing (CORS)Wrong VITE_API_URL for the environmentVerify the GitHub Secret matches the correct backend URL
Last modified on May 12, 2026
Backend DeployMigrations Checklist
On this page
  • Pipeline
  • Dashboard vs Platform
  • Environment Variables
    • GitHub Secrets Setup
  • Staging vs Production
  • Troubleshooting