react-firebase-boilerplate
react-firebase-boilerplate copied to clipboard
The perfect starting point for react apps with firebase backends.
The React Firebase Boilerplate was originally based on the react-hot-redux-firebase-starter. The structure was changed durastically when creating this, so I decided to start an entirely new boilerplate based off the fork.
Stack
- React
- [X] React
15.1.0
- [X] React Hot Loader
3.0.0-beta.2
- [X] React Router
3.0.0
- [X] React
- Redux
- [X] Redux
3.5.2
- [X] React Redux
4.4.5
- [X] React Router Redux
4.0.4
- [X] Redux Thunk
2.1.0
- [X] Redux Dev Tools
- [X] Redux
- Webpack
- [X] Webpack
1.13.1
- [X] Webpack Dev Middleware
1.6.1
- [X] Webpack Hot Middleware
2.10.0
- [X] Webpack
- Firebase
- [X] Firebase
3.0.3
- [X] Firebase
- Linting
- [ ] Flowtype
0.36.0
- [X] Eslint
3.11.1
- [ ] Flowtype
- Styles
- [X] Styled Components
1.1.2
- [X] Styled Components
- Extras
- [X] Emojione
2.2.6
- [X] Emojione
- Testing
- [ ] Mocha
2.5.3
- [ ] Enzyme
2.3.0
- [ ] Mocha
Features
- Firebase:
- Auth
- [X] Authentication setup (Registration/Login with GitHub—other providers easil added)
- [X] state.user sync with Firebase Auth
- [X] Protected routes (requires login)
- Auth
- Beautiful notification system via
react-notification
. - Cross browser emoji support via
emojione
.
Usage Guide
Boilerplate Setup
git clone https://github.com/jsbros/react-firebase-boilerplate
cd react-firebase-boilerplate
npm install
Firebase setup
- Create a Firebase project in the Firebase console, if you don't already have one.
- If you already have an existing Google project associated with your app, click
Import Google Project
. Otherwise, clickCreate New Project
. - If you already have a Firebase project, click
Add App
from the project overview page.
- Click
Add Firebase to your web app
. - Copy all the values keys in the
config
object over to the config/firebase.js file. - Register your app as a developer application on GitHub and get your app's OAuth 2.0 Client ID and Client Secret.
- Enable GitHub authentication:
- In the Firebase console, open the
Auth
section. - On the
Sign in method
tab, enable theGitHub
sign-in method and specify the OAuth 2.0Client ID
andClient Secret
you got from GitHub. - Then, make sure your Firebase
OAuth redirect URI
(e.g.my-app-12345.firebaseapp.com/__/auth/handler
) is set as yourAuthorization callback URL
in your app's settings page on your GitHub app's config.
Usage
npm start
Development Tasks
-
npm start
run the web app with lint and tests in watch mode -
npm run lint
linting javascript code usig eslint -
npm run test
test using mocha and enzyme
Roadmap
Check our roadmap issues
Contributing
Code Linting
All code must pass the linter 100% before getting merged into the master repo. It's highly recommended to install an eslint extension into your code editor/IDE. You can also run the linter from the command line using
npm run lint
Commit Styles
All commit messages must follow the Semantic Commit Message guidelines.
Author
License
The React Firebase Boilerplate is under the MIT License