All Projects â†’ jeescu â†’ React Firebase

jeescu / React Firebase

🔥 Sample React + Firebase setup

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Firebase

Travelmantics
Firestore & firebase storage MVVM sample
Stars: ✭ 28 (-20%)
Mutual labels:  firebase
Firextensions
[DEPRECATED] 🔥 Unofficial Kotlin Extensions for the Firebase Android SDK.
Stars: ✭ 30 (-14.29%)
Mutual labels:  firebase
Ionic Firebase Chat
Create a Real Time Chat App with Ionic && Firebase
Stars: ✭ 33 (-5.71%)
Mutual labels:  firebase
Shoutoutplay
The mobile app that allows you to create and record personal dedications using your favorite music playlists for corporate events, parties, weddings and get togethers.
Stars: ✭ 28 (-20%)
Mutual labels:  firebase
Hana Native Adapters
Since SAP HANA SPS09 supports writing new adapters for Smart Data Access, Batch Data Loading, ETL, Realtime Replication, and Realtime Transformations. While common adapters are provided by SAP, everyone can write their own adapters using the SAP HANA Adapter SDK. This project aims to provide additional adapters for using them or as samples.
Stars: ✭ 29 (-17.14%)
Mutual labels:  sample
Angularconcepts
Key Angular Concepts using Latest Angular version 5
Stars: ✭ 31 (-11.43%)
Mutual labels:  firebase
Fireship.io
Build and ship your app faster https://fireship.io
Stars: ✭ 1,569 (+4382.86%)
Mutual labels:  firebase
Quickstart Android
Firebase Quickstart Samples for Android
Stars: ✭ 7,937 (+22577.14%)
Mutual labels:  firebase
Sapper Template Firebase
Starter Rollup template for Sapper apps with Firebase functions based on https://github.com/nhristov/sapper-template-rollup.
Stars: ✭ 29 (-17.14%)
Mutual labels:  firebase
Vuejs Slack Clone Realtime
Slack clone using VueJS and firebase
Stars: ✭ 33 (-5.71%)
Mutual labels:  firebase
Date
A dating app that creates meaningful connections through food (Push notifications, Firebase, Chat, Schedule Calendar, Onboarding, Social media Login)
Stars: ✭ 29 (-17.14%)
Mutual labels:  firebase
Filemap.xyz
upload files to a geographic point. never memorize a link again.
Stars: ✭ 29 (-17.14%)
Mutual labels:  firebase
Flutter Chat App
A chat app built on Flutter with firebase authentication and image sharing capability.
Stars: ✭ 964 (+2654.29%)
Mutual labels:  firebase
Firebase email signin
Google Firebase Login in Flutter
Stars: ✭ 28 (-20%)
Mutual labels:  firebase
Windows Workstation
Prepare my Windows 10 workstation
Stars: ✭ 33 (-5.71%)
Mutual labels:  setup
Distributed
Stars: ✭ 913 (+2508.57%)
Mutual labels:  firebase
Donne
Open-source Blood Donation Platform
Stars: ✭ 30 (-14.29%)
Mutual labels:  firebase
Pysoc.js
😎 Simple gsoc data scraper, search for any keyword and instantly get data about the orgs that match your search criteria, use filters to sort and analyse the data, uses fuzzy-searching to improve user-search experience
Stars: ✭ 35 (+0%)
Mutual labels:  firebase
Rxjava Android Samples
Learning RxJava for Android by example
Stars: ✭ 7,520 (+21385.71%)
Mutual labels:  sample
Firecord
Firecord is an ODM framework for Firebase in Ruby.
Stars: ✭ 32 (-8.57%)
Mutual labels:  firebase

React + Firebase Setup

This project was bootstrapped with Create React App.

Includes:

  • Firebase setup
  • Authentication
  • Database: Retrieve and push data
  • Cloud Storage: Upload file and save to database
  • Cloud Functions: Cloud Messaging, Message notification

Getting Started

  • Create your Firebase Project in http://console.firebase.google.com.
  • Copy config in dashboard's Web Setup and paste to firebase.js.
  • Clone project and install dependencies.
> git clone 
> cd react-firebase
> npm install

Authentication

See Firebase Authentication docs. firebase.auth()

Sign-In method is using GoogleAuthProvider with a pop-up window. When ComponentDidMount was called, auth.onAuthStateChanged will listen to current auth user state. When the user is logged-in, user state in the component will set.

Database

See Firebase Authentication docs. firebase.database()

Initially created an object guides as our first collection to push our data. The guidesRef is the database reference for the guides object in firebase. Pushing the new data will also add the current User id, who created the data.

Cloud Storage

See Firebase Storage docs. firebase.storage()

We have file input to accept images (png|gif|jpeg), onChange will upload the file first to the given storage ref and then get the file path and save to users in database. We can also listen to state changes while the file is uploading which we can display the percentage of the upload progress.

Cloud Functions

See Cloud Functions for more details. Checkout the examples of other functions The example here is creating message alert using cloud functions

Follow this steps to get started.

  1. Create a file named firebase-messaging-sw.js in public folder to serve it statically in the host. This file is our Service Worker for messaging. Follow this guide. You can find your sender id located at your project settings > cloud functions > sender id
  • Create handler here for showing the notification in the device.
  1. Create the function in function/index.js. See the file.

  2. Create file request-messaging-permission to notify new logged-in users if they want to allow notification.

  • Apply this method during user login in the app.
  1. Check function logs in firebase console.

Deployment process with firebase

  1. Install Firebase Tools globally. (You may need sudo here)
> npm install -g firebase-tools
  1. Login to firebase using this tool in CLI
> firebase login
  1. CD to your working project and initialize firebase.
> cd react-firebase
> firebase init
  1. Configure firebase:
  • Allow CLI features for Database, Functions, Hosting.
  • Select your Firebase project to be used.
  • Accept default rules to write on default file database.rules.json
  • Install dependencies.
  • Choose a build name directory since we build our app.
  • Select Yes for configuring single app page. This is suitable also when app is using react-router.
  • Firebase initialization complete!
  1. Then we will build our app.
> npm build
  1. Deploy!
> firebase deploy

Access your running application to the given Hosting URL.

Important

  • Make sure to rebuild your app if you made changes and want to deploy again.
  • If you only edited the firebase-generated folder functions/**, you can just deploy by running firebase deploy --only functions.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].