{"id":15800873,"url":"https://github.com/pettiboy/cra-template-firebase-starter","last_synced_at":"2025-05-12T13:26:33.897Z","repository":{"id":57210395,"uuid":"450420118","full_name":"pettiboy/cra-template-firebase-starter","owner":"pettiboy","description":"A quick start Create React App template with react-router-dom, material-ui, gh-pages and firebase. With google authentication, routing and deployment capabilities built in.","archived":false,"fork":false,"pushed_at":"2023-01-23T16:15:29.000Z","size":3571,"stargazers_count":23,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T06:39:02.907Z","etag":null,"topics":["authentication","cra-template","create-react-app","deploy","firebase","gh-pages","javascript","material-ui","mui","react","react-router","react-router-dom","signinwithgoogle","template"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cra-template-firebase-starter","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pettiboy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-21T08:56:43.000Z","updated_at":"2025-01-08T02:53:03.000Z","dependencies_parsed_at":"2023-02-13T00:46:16.305Z","dependency_job_id":null,"html_url":"https://github.com/pettiboy/cra-template-firebase-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pettiboy%2Fcra-template-firebase-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pettiboy%2Fcra-template-firebase-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pettiboy%2Fcra-template-firebase-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pettiboy%2Fcra-template-firebase-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pettiboy","download_url":"https://codeload.github.com/pettiboy/cra-template-firebase-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253746798,"owners_count":21957636,"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":["authentication","cra-template","create-react-app","deploy","firebase","gh-pages","javascript","material-ui","mui","react","react-router","react-router-dom","signinwithgoogle","template"],"created_at":"2024-10-05T01:08:16.533Z","updated_at":"2025-05-12T13:26:33.875Z","avatar_url":"https://github.com/pettiboy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Create React App Firebase Starter Template\n\n[![npm](https://img.shields.io/npm/v/cra-template-firebase-starter.svg)](https://npmjs.com/package/cra-template-firebase-starter)\n[![npm](https://img.shields.io/npm/dy/cra-template-firebase-starter.svg)](https://npmjs.com/package/cra-template-firebase-starter)\n[![License MIT](https://img.shields.io/badge/license-MIT-orange.svg?style=flat)](https://raw.githubusercontent.com/pettiboy/cra-template-firebase-starter/main/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen.svg)](https://github.com/pettiboy/cra-template-firebase-starter/pulls)\n\n![React](https://img.shields.io/badge/React-20232A?style=for-the-badge\u0026logo=react\u0026logoColor=61DAFB)\n![NPM](https://img.shields.io/badge/npm-CB3837?style=for-the-badge\u0026logo=npm\u0026logoColor=white)\n\nMake sure you ⭐️ this [`repository`](https://github.com/pettiboy/cra-template-firebase-starter) if you find it helpful or interesting :)\n\n\u003c/div\u003e\n\n## ✨ Installation\n\n```bash\nnpx create-react-app your-project-name --template firebase-starter\n```\n\nOR\n\n```bash\nyarn create react-app your-project-name --template firebase-starter\n```\n\n`NOTE:` This `template` is also available in `TypeScript` [here](https://github.com/pettiboy/cra-template-typescript-firebase).\n\n## ⚙️ Usage\n\n### SetUp firebase\n\n1. Go to your [`Firebase Console`](https://console.firebase.google.com/)\n\n2. Click on `Add project`.\n\n   - Follow steps and create project.\n\n3. Click on web icon.\n\n   - Register web app.\n   - You will get details for setting up `Firebase SDK`.\n\n4. Add the config details in your `.env` file (available in root of your project).\n\n### SetUp SignIn with google\n\n1. In your project console, click on `Authentication` and `Get Started`.\n\n2. In `Sign-in method`, click on `Google`.\n\n3. Toggle `Enable` and click on `Save`.\n\n### To create a new screen\n\n1. Create a new component in `src/screens`.\n\n2. In your `src/config/routes.ts`.\n\n```js\n{\n    path: \"/your-route\",\n    component: YourScreenComponentName,\n    name: \"Screen Name For Reference\",\n    protected: false, // if user needs to be authenticated to access this screen\n}\n```\n\n### To Deploy on GitHub Pages\n\n1. Add your domain (your-github-username.github.io) to the OAuth redirect domains list in the `Firebase console -\u003e Auth section -\u003e Sign in method tab`.\n\n2. update the `homepage` field in your `package.json` to the domain you are hosting on. (By default it is: `http://your-github-username.github.io/your-repo-name`)\n\n3. (Optional) Test production build locally: Update the `homepage` field to `/` and run:\n\n```bash\nnpm i -g serve # install serve globally via npm\nnpm run build-and-serve\n```\n\n4. Deploy to GitHub Pages run:\n\n```bash\nnpm run deploy\n```\n\n## ✨ Featues\n\n### 1. Routing\n\nRouting setup using `react-router-dom`.\n\n- With easily implementable private routes (routes only authenticated users can use).\n\n- Easily add new screens.\n\n### 2. Authentication\n\nAuthentication implemented implemented\n\nSignIn with Google implemented using `firebase` and `react-firebase-hooks`.\n\n### 3. Firebase Configured\n\nFirebase configured with `GoogleAuthProvider` implemented.\n\n### 4. Material UI\n\nLogin Screen UI built using `@mui/material`.\n\n### 5. Deploy on Github Pages\n\nDeploying on GitHub pages powered by `gh-pages` and [`spa-github-pages`](https://github.com/rafgraph/spa-github-pages)\n\n## 🔧 File Structure\n\n```\n├── src\n│   ├── components\n│   │   ├── auth\n│   │   |   ├── AuthChecker.js\n│   │   |   ├── AuthContainer.js\n│   │   |   ├── Logout.js\n│   │   ├── utils\n│   │   |   ├── Center.js\n│   ├── config\n│   │   ├── firebase.config.js\n│   │   ├── firebase.js\n│   │   ├── routes.js\n│   ├── screens\n│   │   ├── Login.js\n│   │   ├── Home.js\n```\n\n## 📝 Authors\n\n- Hussain Pettiwala ([@pettiboy](https://github.com/pettiboy))\n\nSpecial thanks to this well written [`blog`](https://grischuk.de/how-to-create-custom-create-react-app-cra-templates) and this [`repo`](https://github.com/alexandr-g/cra-template-typescript-redux) by [alexandr-g](https://github.com/alexandr-g).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpettiboy%2Fcra-template-firebase-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpettiboy%2Fcra-template-firebase-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpettiboy%2Fcra-template-firebase-starter/lists"}