A basic React.js (Create React App) frontend + serverless backend with Firebase Authentication, Firestore and Hosting.
Good for quickly starting new web projects. 🙃
- Account creation and log in pages
- redux store subscribed to Auth and Firestore state changes
- basic responsive UI components: header, form elements, page container
- Create React App
- routing:
react-router-dom
- state management:
redux
+@reduxjs/toolkit
- CSS-in-JS:
styled-components
- absolute imports (
->'../../components/Button'
'components/Button'
)
git clone https://github.com/jacklj/react-firebase-skeleton.git [your-projects-desired-directory-name]
cd [your-projects-desired-directory-name]
yarn
2. install firebase cli globally (if you don't have it already) and log in to your firebase account
npm install -g firebase-tools
firebase login
3. Create your new firebase project on the Firebase website
- Enable Authentication (email and password), Firestore and Hosting
- in
/.firebaserc
, set theprojects.default
field to your firebase project name (alternatively, you can do this using the firebase cli helperfirebase init
) - in
/src/firebaseConfig.js
, add your firebase project config (these are found in the Firebase console, in Your-project > Settings > General, then scroll down to "Your apps")
yarn start
yarn deploy # does prod build then deploys it to Firebase Hosting