Skip to content

Fleshed-out example codebase for a firebase app, to be used in a Build Team curriculum.

Notifications You must be signed in to change notification settings

lawrencewin/convergent-react-firebase-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convergent Messenger

This repo contains a barebones Facebook Messenger clone, implemented with a React-Firebase tech stack. The project was built for use by Texas Convergent as a part of our curriculum to show new developers what is possible with React and Firebase.

Setup and Installation

Make sure you have the following prerequisites on your computer:

  • Git
  • NodeJS installation
  • Javascript Package Manager
    • NPM (comes with NodeJS)
    • Yarn

Download the Code Locally

Using your terminal of choice, navigate to the folder you want to put this project folder in. Then run:

git clone https://github.com/lawrencewin/convergent-react-firebase-demo.git

In the current working directory, you should see a folder called convergent-react-firebase-demo with all of the code files.

Set Up Your Firebase Project

To set up the Firebase stack in this project, you will need to create a Firebase project in the google console.

  1. Navigate to the firebase console. Using your google account of choice, click "create project".

Firebase Initial Screen

  1. Choose an ID for your project. This ID is not front-facing, so it can be anything you want. Then, click "continue".

Choose ID For Project

  1. Choose whether you want to enable or disable Google Analytics. Analytics is optional, and this project shouldn't be used in a production setting. I recommend disabling it, but for future production Firebase projects, consider enabling it.

  2. On the dashboard homepage, you'll be greeted with buttons to add an app to your project. Click the third button with the </> icon to set up a Javascript web app.

Add Firebase to your App

  1. Enter a nickname for the web app. This nickname isn't front-facing so you can put whatever here.

  2. After putting your app name, you'll be greeted with a code example containing your firebase config object. Make note of the JSON - this will be used in the react project. (You can always come back to the config object through the project settings page). After making note, click "continue to console".

Firebase App Config Object

  1. With you App created, you'll need to enable the Firebase services used by the front-end. In the sidebar of the project dashboard, click Authentication under the Build section. On the authentication dashboard, click Get Started.

Firebase Authentication Enable

  1. In the sidebar , click Firestore Database under the Build section. On the firestore dashboard, click Get Started.

Firebase Firestore Enable

  1. In the sidebar , click Storage under the Build section. On the storage dashboard, click Get Started.

Firebase Firestore Enable

Algolia Project Setup

If you want to get the user search functionality working, you will need to create an algolia account. Go to algolia.com, create an account, and follow the instructions to create an index. From there, you will need to make note of your API key, Search Key, and App ID.

Front-End Setup

To get the rest of the React stack set up, read the README in the react folder.

Cloud Functions Setup

To set up the project's cloud functions, read the README in the functions folder.

Understanding the Project

To get a better understanding of the project, you can view the slide deck detailing the project's component, and you can study the source typescript files within both client and functions folders.

Here are general resources to get you up to speed in terms of Firebase and React.

Finally, here's a slide deck that goes over the structure of the app.

Things to Improve On

  • Add support for Group Conversations
  • Create front-end notifications on new message send
  • Mark unread conversations in the ConversationList component
  • Add support for other forms of media for each message
  • Add other authentication methods

About

Fleshed-out example codebase for a firebase app, to be used in a Build Team curriculum.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published