npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cra-template-firebase-starter

v1.0.0

Published

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.

Downloads

8

Readme

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

NOTE: This template is also available in TypeScript here.

⚙️ 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 the config details in your .env file (available in root of your project).

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. (Optional) Test production build locally: Update the homepage field to / and run:

npm i -g serve # install serve globally via npm
npm run build-and-serve
  1. Deploy to GitHub Pages run:
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.