deployed at: https://chatapp-c7c37.web.app/
The project is build using firebase
. If you want to run it on your local machine, you have to initialize firebase database first.
Firestore is used over the real-time firebase database because firestore provides indexing and faster in general.
In order to set up your own firebase db, go to firebase website, create a new project and Add Firebase to your app and follow the steps. Then go to Database side option, choose Start in test mode. Go to project settings, select Config and copy firebaseConfig to firebase.js
file. You may later set up .env
file with all the sensitive info (keys) being stored in there like apiKey
, authDomain
and so on.
After that step, run npm install firebase
in your project root folder and declare variable const firebaseApp = firebase.initializeApp(firebaseConfig)
that will connect the database to the project and don't forget to import necessary modules. Access to the database is stored in db
variable that is passed around the front-end react app and provider
variable gives access to Google services.