A chat app built with React & Firebase.
this app is no longer actively developed or supported
-
Download or clone the repo.
git clone [email protected]:perspicacious-one/chattel.git -
In your terminal:
cd chattel -
Run
npm install -
Set up your firebase project linkage in firebase.js:
import firebase from 'firebase'; const config = { apiKey: "<your-api-key>", authDomain: "<your-auth-domain", databaseURL: "https://<your-project-id>.firebaseio.com", projectId: "<your-project-id>", storageBucket: "<your-project-storage>", }; firebase.initializeApp(config); export default firebase;
-
Set up your Firebase Real-time database structure:
"<project-id>": { "rooms": { "id": { "name": "value" } }, "messages": { "id": { "username": "value", "content": "value", "sentAt": "value", "roomId": "value" } } }
-
Set up your Firebase authentication (read how in the Firebase docs)
-
Run
npm start
-
Rooms -
this.props.firebase.database().ref('rooms'); -
Messages -
this.props.firebase.database().ref('messages');
User authentication is provided through Firebase Authentication.
this.props.firebase.auth.GoogleAuthProvider();
Warning! This project was built using React lifecycle methods that are now outdated.
This project was bootstrapped with Create React App.