Skip to content

avrahm/react-redux-firebase-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Redux Firebase Boilerplate

The repo stores a boilerplate with React.js for frontend, Redux for state management, and Firebase for user authentication.

1. To get started:

  • clone the repo git clone https://github.com/avrahm/react-redux-firebase-boilerplate.git
  • cd into the directory labelled react-redux-firebase-boilerplate
  • Inside the directory run yarn to install the node_modules

2. **Required: Before running the app, you will need to create a firebaseConfig file

  • Navigate to firebase.google.com
    1. Create a new web project. Follow Step 1 and 2 of the official Google Documentation
    2. After setting up the project, navigate to Authentication on Firebase and enable Email/Password
    3. Lastly, enable the Firestore Database to store data

3 . Add the firebaseConfig in the firebase directory of the src directory

4 . Run the app with yarn start

Tips

  • This repo has functioning persist user logic that maintains the user state. If the web app reload, Firebase auth checks for an acitve user object and maintains the logged in state.

  • Use the componenent PrivateRoute.js to control components that require a signed in user. When a private route is selected they will be reroute to the HomePage unless a user is logged in.

    <PrivateRoute path='/example' component={ExamplePage} />

About

Simple React.js project with Redux for state management and Firebase for User Authentication

Resources

Stars

Watchers

Forks