A quick start Create React App template with react-router-dom, material-ui, gh-pages and firebase

Overview

Create React App Firebase Starter Template

npm npm License MIT PRs Welcome

React NPM

Make sure you ⭐️ this repository if you find it helpful or interesting :)

Installation

npx create-react-app your-project-name --template firebase-starter

OR

yarn create react-app your-project-name --template firebase-starter

⚙️ Usage

SetUp firebase

  1. Go to your Firebase Console

  2. Click on Add project.

    • Follow steps and create project.
  3. Click on web icon.

    • Register web app.
    • You will get details for setting up Firebase SDK.
  4. Add your config details in your .env.

SetUp SignIn with google

  1. In your project console, click on Authentication and Get Started.

  2. In Sign-in method, click on Google.

  3. Toggle Enable and click on Save.

To create a new screen

  1. Create a new component in src/screens.

  2. In your src/config/routes.ts.

{
    path: "/your-route",
    component: YourScreenComponentName,
    name: "Screen Name For Reference",
    protected: false, // if user needs to be authenticated to access this screen
}

To Deploy on GitHub Pages

  1. Add your domain (your-github-username.github.io) to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.

  2. 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)

  3. In your terminal

npm run deploy

Featues

1. Routing

Routing setup using react-router-dom.

  • With easily implementable private routes (routes only authenticated users can use).

  • Easily add new screens.

2. Authentication

Authentication implemented implemented

SignIn with Google implemented using firebase and react-firebase-hooks.

3. Firebase Configured

Firebase configured with GoogleAuthProvider implemented.

4. Material UI

Login Screen UI built using @mui/material.

5. Deploy on Github Pages

Deploying on GitHub pages powered by gh-pages and spa-github-pages

🔧 File Structure

├── src
│   ├── components
│   │   ├── auth
│   │   |   ├── AuthChecker.js
│   │   |   ├── AuthContainer.js
│   │   |   ├── Logout.js
│   │   ├── utils
│   │   |   ├── Center.js
│   ├── config
│   │   ├── firebase.config.js
│   │   ├── firebase.js
│   │   ├── routes.js
│   ├── screens
│   │   ├── Login.js
│   │   ├── Home.js

📝 Authors

Special thanks to this well written blog and this repo by alexandr-g.

You might also like...

Nestia template project installed by "npx nestia start"

Nestia Template Outline A template repository for backend projects using nestia. You can create a new project from this boilerplate by running below c

Dec 26, 2022

Template to start developing a REST API with Node.js (Express), TypeScript, DDD, etc. 🔰🦸

Template to start developing a REST API with Node.js (Express), TypeScript, DDD, etc. 🔰🦸

Typescript DDD Boilerplate Plantilla para una API con Typescript basada en arquitectura DDD. En qué consiste este proyecto Este proyecto es un punto d

Nov 26, 2022

Firebase Angular Skeleton - Quickly create an application with a fully functional authentication, authorization and user management system.

Firebase Angular Skeleton - Quickly create an application with a fully functional authentication, authorization and user management system.

FAngS - Firebase Angular Skeleton FAngS lets you quickly create an application with a fully functional authentication, authorization and user manageme

Sep 21, 2022

Angular 14 Firebase CRUD with Realtime Database - AngularFireDatabase Object and List example: create, retrieve, update, delete

Angular 14 Firebase CRUD with Realtime Database - AngularFireDatabase Object and List example: create, retrieve, update, delete

Angular 14 Firebase CRUD example with Realtime DataBase | AngularFireDatabase Build Angular 14 CRUD example with Firebase Realtime Database that uses

Dec 26, 2022

A template for buildind scrollable landing pages with Gsap, ScrollTrigger and webgi engine in typescript using parcel bundler.

A template for buildind scrollable landing pages with Gsap, ScrollTrigger and webgi engine in typescript using parcel bundler.

Threejs + GSAP + WEBGi 100% Free Course This is a template used in my fast course "building scrolable pages with ScrollTrigger and Threejs" for a vani

Dec 17, 2022

A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and configure Typescript on it.

CTSP- Create TS Project A CLI tool to create a NodeJS project with TypeScript CTSP is a CLI tool to make easier to start a new NodeJS project and conf

Sep 13, 2022

A small web app that tries to imitate the desktop web version of amazon site, you can add items to the basket, delete them, and have your user authentication feature thanks to Firebase.

A small web app that tries to imitate the desktop web version of amazon site, you can add items to the basket, delete them, and have your user authentication feature thanks to Firebase.

Features Here's the feature's included in this project 👨‍👩‍👧‍👦 Login Page 📦 Products Page 🛒 Cart and Checkout Page 📝 Sign up function with Goog

Aug 22, 2022

🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

🍭 search-buddy search-buddy is an open‑source ultra lightweight javascript plugin (* 1kb). It can help you create instant search and/or facilitate n

Jun 16, 2022

Create beautiful and simple HTML pages from your Readme.md files

Create beautiful and simple HTML pages from your Readme.md files

🐠 Oranda Create beautiful and simple HTML pages from your Readme.md files 🛠 No config 👩‍💻 Code Highlighting 💯 Emoji Support ✨ Creates Static file

Oct 13, 2022
Quick way to start a new TypeScript/Next.js/Firebase web app 😼

create-crash-app Template repo to quickly set up an opinionated, strict config, typesafe Next.js project. Get started with create-crash-app by running

Diego Dorantes-Ferreira 5 Oct 28, 2022
MUI Core is a collection of React UI libraries for shipping new features faster. Start with Material UI, our fully-loaded component library, or bring your own design system to our production-ready components.

MUI Core MUI Core contains foundational React UI component libraries for shipping new features faster. Material UI is a comprehensive library of compo

MUI 83.6k Dec 30, 2022
💻 A simple Create Next App template to start your projects with Next.js, TypeScript, ESLint, Prettier and other tools.

⚡ Next Typescript Template ⚡ A simple Create Next App template to start your projects with Next.js, TypeScript, ESLint, Prettier and other tools. Quic

João Gabriel 13 Nov 23, 2022
a quick start boilerplate for developing web3 apps and deploying smart contracts.

create-web3 A boilerplate for starting a web3 project. This boilerplate quickly creates a mono repo with 2 environments, a Next JS environment for fro

Eric Roupe 83 Dec 16, 2022
Custom Vitest matchers to test the state of the DOM, forked from jest-dom.

vitest-dom Custom Vitest matchers to test the state of the DOM This library is a fork of @testing-library/jest-dom. It shares that library's implement

Chance Strickland 14 Dec 16, 2022
An extension of DOM-testing-library to provide hooks into the shadow dom

Why? Currently, DOM-testing-library does not support checking shadow roots for elements. This can be troublesome when you're looking for something wit

Konnor Rogers 28 Dec 13, 2022
Awesome books app is a basic website that allows users to add/remove books from a list. It is a single page app (SPA) which allow switching to different pages of the app without page load. Built with JavaScript.

Awesome Books ES6 In this project, I build a basic website that allows users to add/remove books from a list. using ES6 syntax and make it more organi

Abdulhamid 11 Jul 1, 2022
Extended version of create-t3-app to make it even faster to start (or maybe slower)

create-T3-app with extra tools/config out of the box create-t3-app is one of the fastest and easiest way to scaffold fullstack app. create-t3-extended

A Riolly C 7 Jan 4, 2023
Template to showcase different use-cases about Ionic, Firebase, Capacitor

Ionic, Angular, Capacitor, and Firebase Template This is a starter templates for projects using Ionic, Angular, Capacitor, and Firebase. It covers the

Jorge Vergara 7 Oct 6, 2022
A template to quickly start a new Node.js project

?? A template, for your node project. Including typescript, eslint and prettier.

Lorenzo Carneli 6 Aug 25, 2022