Giter Site home page Giter Site logo

damasy / firebase-react-chakra-ui-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stephenbaidu/firebase-react-chakra-ui-starter

0.0 1.0 0.0 405 KB

Starter project for firebase web with React, Chakra UI and auth pages added

TypeScript 94.59% HTML 3.45% JavaScript 1.23% CSS 0.73%

firebase-react-chakra-ui-starter's Introduction

Firebase React Chakra UI Starter

A starter project for Firebase web.

Installation

Clone the repository

git clone [email protected]:stephenbaidu/firebase-react-chakra-ui-starter.git

Rename the directory if you want

mv firebase-react-chakra-ui-starter my-firebase-app

Go to the directory (cd if renamed above)

cd firebase-react-chakra-ui-starter

Rename the git remote url to your remote url

git remote set-url origin [email protected]:<YOUR USERNAME>/<YOUR REPO NAME>.git

Install npm modules

npm install --prefix ./functions
yarn --cwd ./hosting install

Add .env.local with following content

REACT_APP_FIREBASE_APIKEY=<from firebase config>
REACT_APP_FIREBASE_AUTHDOMAIN=<from firebase config>
REACT_APP_FIREBASE_DATABASEURL=<from firebase config>
REACT_APP_FIREBASE_PROJECTID=<from firebase config>
REACT_APP_FIREBASE_STORAGEBUCKET=<from firebase config>
REACT_APP_FIREBASE_MESSAGINGSENDERID=<from firebase config>
REACT_APP_FIREBASE_APPID=<from firebase config>
REACT_APP_FIREBASE_MEASUREMENTID=<from firebase config>

To complete deployment to firebase via Github actions, add the following Secrets to your reposity on Github:

FIREBASE_TOKEN (get this via "firebase login:ci")
REACT_APP_FIREBASE_APIKEY
REACT_APP_FIREBASE_APPID
REACT_APP_FIREBASE_AUTHDOMAIN
REACT_APP_FIREBASE_MEASUREMENTID
REACT_APP_FIREBASE_MESSAGINGSENDERID
REACT_APP_FIREBASE_PROJECTID
REACT_APP_FIREBASE_STORAGEBUCKET

Finally, push to your remote repository

git push origin master

Project Structure

  • .github (contains github workflows) Github Actions
  • functions (contains your cloud functions)
  • hosting (contains your react app)

Here is the tree:

├── .github
│   ├── workflows
│   │   ├── functions.yml
│   │   └── hosting.yml
├── functions
│   ├── package.json
│   ├── src
│   │   ├── common
│   │   │   ├── db.ts
│   │   │   └── types.ts
│   │   ├── fn
│   │   │   ├── auth
│   │   │   │   └── user_on_create_fn.ts
│   │   │   ├── common.ts
│   │   │   └── http
│   │   │       └── hello_world.ts
│   │   └── index.ts
│   ├── tsconfig.json
│   └── tslint.json
├── hosting
│   ├── README.md
│   ├── package.json
│   ├── public
│   │   ├── favicon.ico
│   │   ├── index.html
│   │   ├── logo192.png
│   │   ├── logo512.png
│   │   ├── manifest.json
│   │   └── robots.txt
│   ├── src
│   │   ├── App.tsx
│   │   ├── auth
│   │   │   ├── AuthProvider.tsx
│   │   │   ├── authContext.ts
│   │   │   ├── createUserWithEmail.ts
│   │   │   ├── index.ts
│   │   │   ├── loginAnonymously.ts
│   │   │   ├── loginWithEmail.ts
│   │   │   ├── loginWithGoogle.ts
│   │   │   ├── signOut.ts
│   │   │   └── useSession.ts
│   │   ├── background.png
│   │   ├── components
│   │   │   ├── BrandingPane.tsx
│   │   │   ├── CenteredMiddleBox.tsx
│   │   │   ├── ColorModeSwitcher.tsx
│   │   │   ├── FullPageBox.tsx
│   │   │   ├── LoginPane.tsx
│   │   │   ├── Logo.tsx
│   │   │   ├── PasswordInput.tsx
│   │   │   ├── SignupPane.tsx
│   │   │   ├── TermsAndPrivacyText.tsx
│   │   │   ├── TextDivider.tsx
│   │   │   └── index.ts
│   │   ├── firebase
│   │   │   ├── config.js
│   │   │   └── index.ts
│   │   ├── hooks
│   │   │   ├── index.js
│   │   │   ├── useError.ts
│   │   │   └── useWindowDimensions.ts
│   │   ├── index.css
│   │   ├── index.tsx
│   │   ├── logo.svg
│   │   ├── react-app-env.d.ts
│   │   ├── reportWebVitals.ts
│   │   ├── routes
│   │   │   ├── Index.tsx
│   │   │   ├── auth
│   │   │   │   └── Index.tsx
│   │   │   ├── dashboard
│   │   │   │   └── Index.tsx
│   │   │   ├── login
│   │   │   │   └── Index.tsx
│   │   │   └── signup
│   │   │       └── Index.tsx
│   │   ├── setupTests.ts
│   │   ├── theme.ts
│   │   └── utils.ts
│   ├── tsconfig.json
│   └── yarn.lock
├── .firebaserc
├── .gitignore
├── firebase.json
├── firestore.indexes.json
├── firestore.rules
├── README.md

Auth page

Screen Shot 2021-07-21 at 3 03 21 AM

firebase-react-chakra-ui-starter's People

Contributors

stephenbaidu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.