feature-flag-firebase-remote-config
Description
Feature flag with Firebase remote config, inspired by the example feature-flag-split
- Create three variant pages (
index.tsx,B.tsx,C.tsx) in about folder. - Run a script during the pre-build time to fetch the treatments from Firebase remote config.
- Save the treatments to a JSON file and store it in the directory.
- Proceed to build the app to generate static pages for each variant (
/about,/about/B,/about/C). - When a client requests the
aboutpage, instead of calling API routes and sending HTTP requests to fetch data from Firebase, the middleware can directly retrieve the data from the pre-generated JSON file and assign a variant to it.
Full article about this approach here.
Demo URL
https://feature-flag-firebase-remote-config.vercel.app
Type of Change
- [x] New Example
- [ ] Example updates (Bug fixes, new features, etc.)
- [ ] Other (changes to the codebase, but not to examples)
New Example Checklist
- [ ] π«
npm run new-examplewas used to create the example - [x] π The template wasn't used but I carefully read the Adding a new example steps and implemented them in the example
- [x] π± Is it responsive? Are mobile and tablets considered?
The latest updates on your projects. Learn more about Vercel for Git βοΈ
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| app-dir-css-in-js | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| app-dir-i18n | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| app-dir-share-state | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-api-routes-cache-control | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-api-routes-hello-world | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-api-routes-json-response | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-api-routes-query-parameters | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-functions-authed-proxy | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-functions-cookies | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-functions-news | β Failed (Inspect) | Jul 12, 2024 11:09am | ||
| edge-functions-streams | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-geolocation-country-block | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-middleware-modify-request-header | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| edge-user-agent-based-rendering | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| example-auth-with-ory | β Failed (Inspect) | Jul 12, 2024 11:09am | ||
| example-reduce-image-bandwidth-usage | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| examples | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| geolocation-script | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| i18n | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| next-edge-api-route-hello-world | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| next-flask | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| nodejs-api | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| redirect-with-fallback | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| redirects-bloom-filter | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-combining-data-fetching-strategies | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-image-fallback | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-image-offset | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-loading-web-fonts | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-microfrontends | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-microfrontends-docs | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-pagination-with-ssg | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-parallel-routes-navbar | β Failed (Inspect) | Jul 12, 2024 11:09am | ||
| solutions-reuse-responses | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-script-component-ad | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-script-component-strategies | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| solutions-testing | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| wasm-rust-hello-world | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
| wasm-rust-xor | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:09am |
@tengweiherr is attempting to deploy a commit to the Vercel Examples Team on Vercel.
A member of the Team first needs to authorize it.
New dependencies detected. Learn more about Socket for GitHub βοΈ
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/@firebase/[email protected] | Transitive: environment | +2 |
1.18 MB | google-wombot |
| npm/@protobufjs/[email protected] | None | 0 |
9.05 kB | dcode |
| npm/@types/[email protected] | None | 0 |
4 kB | types |
| npm/@types/[email protected] | None | 0 |
3.67 MB | types |
| npm/@types/[email protected] | None | 0 |
348 kB | types |
| npm/[email protected] | unsafe Transitive: filesystem | +1 |
79 kB | vercel-release-bot |
| npm/[email protected] | filesystem | +1 |
2.89 MB | eslintbot |
| npm/[email protected] | None | 0 |
32.2 kB | samthor |
| npm/[email protected] | environment, filesystem, network Transitive: eval, shell, unsafe | +52 |
37.4 MB | google-wombot |
| npm/[email protected] | environment, network | 0 |
70.7 kB | google-wombot |
| npm/[email protected] | environment, filesystem, shell | +7 |
705 kB | google-wombot |
| npm/[email protected] | environment, filesystem, network, shell, unsafe | +10 |
1.03 GB | vercel-release-bot |
| npm/[email protected] | filesystem, network | +9 |
2.87 MB | google-wombot |
| npm/[email protected] | None | 0 |
5.72 kB | vitaly |
π¨ Potential security issues detected. Learn more about Socket for GitHub βοΈ
To accept the risk, merge this PR and you will not be notified again.
| Alert | Package | Note | CI |
|---|---|---|---|
| Critical CVE | npm/[email protected] |
| π« |
Next steps
What is a critical CVE?
Contains a Critical Common Vulnerability and Exposure (CVE).
Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.
Take a deeper look at the dependency
Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.
Remove the package
If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.
Mark a package as acceptable risk
To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all
@SocketSecurity ignore npm/[email protected]