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
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;
}
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.