Skip to main content

Deployment (Vercel + Firebase)

Web (Vercel):

  • Import apps/web as a Vercel project.
  • Set environment variables from Quickstart.
  • Build command: pnpm --filter web build
  • Output: .next (default Next.js)

Functions (Firebase):

  • Ensure firebase.json and project are configured.
  • Deploy: firebase deploy --only functions

Domains and callbacks:

  • Update provider callback URLs in apps/functions/config.js to point to deployed callback endpoints.
  • Configure Stripe webhook to call your Firebase Function stripeWebhook URL (e.g., https://us-central1-<project-id>.cloudfunctions.net/stripeWebhook).

Post-deploy checks:

  • /api/debug-env returns expected env presence.
  • OAuth start endpoints return valid provider URLs.
  • Cloud Tasks queues exist in your region (create if missing):
REGION=us-central1
gcloud tasks queues describe orchestrate-posts --location="$REGION" || \
gcloud tasks queues create orchestrate-posts --location="$REGION"

for q in publish-facebook publish-instagram publish-threads publish-x publish-tiktok publish-youtube; do
gcloud tasks queues describe "$q" --location="$REGION" || \
gcloud tasks queues create "$q" --location="$REGION"
done

Storage:

  • Ensure the default Storage bucket exists and CORS is applied for your domains.
  • Deploy Storage rules with:
firebase deploy --only storage