A Flutter-based multi-user chat application that supports real-time messaging using Firebase Firestore and Authentication. This app allows users to sign in with email/password or Google and engage in real-time chat with other users.
- Firebase Authentication: Sign up and log in with email/password or Google.
- Real-Time Messaging: Chat with other users in real-time.
- Firestore Integration: Store and retrieve messages and user information.
- Responsive UI: A clean, user-friendly interface that works seamlessly on various devices.
- Scalable: Built with Firebase, making it easy to scale as your user base grows.
- Figure 1:
- Figure 2:
- Flutter SDK: Installation guide
- Firebase account: Firebase Console
-
Clone the repository:
git clone https://github.com/sharansukesh1003/messenger.git cd messenger -
Set up Firebase:
- Create a Firebase project in the Firebase Console.
- Add your Android and/or iOS app to the Firebase project.
- Download
google-services.json(for Android) and/orGoogleService-Info.plist(for iOS) and place them in the appropriate directories:android/app/google-services.jsonios/Runner/GoogleService-Info.plist
- Enable Email/Password and Google sign-in methods in the Authentication section of Firebase.
- Set up Firestore as your database and adjust the rules as needed.
-
Install dependencies:
flutter pub get
-
Run the app:
flutter run
lib/
β
βββ models/
β βββ chat_screen_arguments_model.dart # Data model for passing chat arguments
β βββ message_model.dart # Data model for chat messages
β
βββ screens/
β βββ chat_screen.dart # UI for the chat interface
β βββ home_screen.dart # UI for displaying user list
β βββ login_screen.dart # UI for user login
β βββ signup_screen.dart # UI for user signup
β
βββ service/
β βββ authentication.dart # Firebase authentication service
β βββ message_service.dart # Firestore message handling service
β
βββ widgets/
β βββ message_bubble.dart # Widget for displaying chat messages
β
βββ main.dart # Main entry point of the app- Sign Up: Users can sign up using their email and password or through Google sign-in.
- Login: Once registered, users can log in and start chatting.
- Chat: Users can select other users from the list and start a conversation in real-time.
Contributions are welcome! Please fork this repository and submit a pull request for any changes you'd like to see.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to open an issue or reach out to me on LinkedIn.


