{"id":21686045,"url":"https://github.com/safnaj/devfest-2023-demo","last_synced_at":"2025-08-09T23:38:49.831Z","repository":{"id":211326269,"uuid":"719498812","full_name":"Safnaj/devfest-2023-demo","owner":"Safnaj","description":"A Demo Application on Firebase Feature Flagging using Remote Config for Google DevFest 2023 Sri Lanka","archived":false,"fork":false,"pushed_at":"2024-11-18T19:21:13.000Z","size":250,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T08:16:45.618Z","etag":null,"topics":["firebase","firebase-remote-config","react-firebase"],"latest_commit_sha":null,"homepage":"https://devfest-2023-demo.web.app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Safnaj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-16T09:50:16.000Z","updated_at":"2025-03-15T07:46:36.000Z","dependencies_parsed_at":"2024-11-20T13:15:59.261Z","dependency_job_id":null,"html_url":"https://github.com/Safnaj/devfest-2023-demo","commit_stats":null,"previous_names":["safnaj/devfest-2023-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Safnaj%2Fdevfest-2023-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Safnaj%2Fdevfest-2023-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Safnaj%2Fdevfest-2023-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Safnaj%2Fdevfest-2023-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Safnaj","download_url":"https://codeload.github.com/Safnaj/devfest-2023-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537193,"owners_count":21120711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-remote-config","react-firebase"],"created_at":"2024-11-25T16:27:32.387Z","updated_at":"2025-04-12T08:16:52.079Z","avatar_url":"https://github.com/Safnaj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevFest 2023 - Sri Lanka\n\n\n![image](https://github.com/Safnaj/devfest-2023-demo/assets/37530024/2c476c77-adec-4723-80a5-0dc44c6915b3)\n\n\n### 1. Create a new Firebase Project.\n\n- Go to [Firebase Console](https://console.firebase.google.com) and create a new Firebase Project.\n- Navigate to Remote Config and create a Boolean Flag Named `feature_enable_dark_mode`\n\n### 2. Clone the Repository\n- `git clone https://github.com/Safnaj/devfest-2023-demo.git`\n\n### 3. Add Firebase Config values to `.env` file\n- Inside the project folder create a file called `.env`\n- Refer the `.env.example` and add the values as shown below \n\n```\nREACT_APP_FIREBASE_API_KEY=YOUR_API_KEY\nREACT_APP_FIREBASE_AUTH_DOMAIN=YOUR_AUTH_DOMAIN\nREACT_APP_FIREBASE_PROJECT_ID=YOUR_PROJECT_ID\nREACT_APP_FIREBASE_STORAGE_BUCKET=YOUR_STORAGE_BUCKET\nREACT_APP_FIREBASE_MESSAGING_SENDER_ID=YOUR_MESSAGING_SENDER_ID\nREACT_APP_FIREBASE_APP_ID=YOUR_APP_ID\nREACT_APP_FIREBASE_MEASUREMENT_ID=YOUR_MEASUREMENT_ID\n```\n\n### 4. Set Default Config Values\n- Go to `src/config/remoteConfig.js` and inside the `initRemoteConfig` add your flag and it's default value.\n\n### 5. Define Flags in Constants\n- Move to `src/constants/flags.js` and create a constant for your flag:\n```\nexport const FEATURE_ENABLE_DARK_MODE = 'feature_enable_dark_mode';\n```\n\n### 6. Check flag value \n- Check your flag value using `isFeatureEnabled` function and write your logic \u003cbr/\u003e\n  Ex: `const isShowStatsEnabled = isFeatureEnabled(FEATURE_ENABLE_STATS);`\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafnaj%2Fdevfest-2023-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafnaj%2Fdevfest-2023-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafnaj%2Fdevfest-2023-demo/lists"}