Skip to content

Flutter application with login, signup and chat functionality using Firebase for backend.

License

Notifications You must be signed in to change notification settings

dzavisic/flutter_firebase_chat_application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flutter Chat application with Firebase

Flutter chat application with login and signup using Firebase.

Short description

Signup form uses Firebase Email and Password authentication with Phone Number verification.

Login form uses Firebase Email and Password authentication with Users stored in firestore database.

Chat uses Firebase Realtime Database.

User profile picture is stored in firebase storage.

Setting up the project

  1. Clone the repository.
  2. Run the following command in the project directory:
    flutter pub get
  3. You'll need to install Firebase CLI.
  4. Log into Firebase using your Google account:
    firebase login
  5. Install the FlutterFire CLI with command:
    dart pub global activate flutterfire_cli
  6. Change your Firebase project plan to Blaze.
  7. Run the following command:
    flutterfire configure
  8. To deploy your functions to Firebase, run the following command:
    cd firebase/functions && firebase deploy --only functions
  9. Update your Firestore rules to allow only authenticated users to access the database.
  10. Update your Firebase Realtime Database rules to allow only authenticated users to access the database.
  11. Finally, run the following command:
    flutter run

Setup example of Realtime database structure for messaging

- chats 
 - chat_id
   - lastMessage: string
   - timestamp: number
   
- members
 - chat_id
    - user_id: true
    - user_id2: true
    
- messages
 - chat_id
    - message_id
       - message: string
       - timestamp: number
       - sender: user_id: string

Screenshots

About

Flutter application with login, signup and chat functionality using Firebase for backend.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published