Skip to main content

Environments, Deployments & Feature Flags

Paved Path

  • Environments: Staging and Prod
  • Promotion: branch‑based
  • Hosting: Next.js → Vercel, Backend → Firebase Cloud Functions
  • Release strategy: Canary
  • Feature Flags: Firebase Remote Config

Client-side example:

import { getRemoteConfig } from 'firebase/remote-config';
export async function getFlag(rc: ReturnType<typeof getRemoteConfig>, key: string, fallback: string) {
const value = rc.getString(key);
return value || fallback;
}

Server-side example using Admin SDK:

import { getRemoteConfig } from 'firebase-admin/remote-config';
export async function isEnabled(key: string) {
const rc = getRemoteConfig();
const template = await rc.getTemplate();
return template.parameters[key]?.defaultValue?.value === 'true';
}

LLM Notes

  • Use Remote Config for gradual rollouts/canaries. Do not hard‑code flags.