Skip to content

xifengzhu/ionic-firebase-chat

Repository files navigation

IonicFirebaseChat

IonicFirebaseChat is a sample chat widget powered by Firebase. We created a simple authentication system with email and Facebook support in Ionic.

Screenshot

alt text

login with facebook

chat

add room

Setup

1.Setting up a Firebase Account

In order to user Firebase, you need to have an account with them. Url: https://www.firebase.com/signup/

2.Setting up a facebook App for Login

Login the firebase dashboard, and select the login&&Auth tab, select the facebook tab, fill the Facebook APP Id and Facebook App Secret. https://developers.facebook.com/

3.Install the lib by bower
bower install firebase --save
bower install angularfire --save
bower install angular-md5 --save  // md5 for Angular.js and Gravatar filter
4.Replace the firebase url with your's in www/js/configs.js

Data Structure

  • users/

    • user-id
      • username - The display name of the user.
      • email - The user email.
      • connected - The user online or offline.
  • rooms/

    • room-id
      • name -The room name.
      • type - The room type(private and public).
      • createdAt- The time at which the room was created.
      • ownerId - The room's owner id .
  • room-messages/

    • room-id
      • message-id
        • sender_username
        • sender_email - For getting the gravatar.
        • content - The message content.
        • createdAt - The time at which the message was created.

Get help

About

Create a Real Time Chat App with Ionic && Firebase

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published