ChatBox is a real-time chat application built with Flutter and Firebase. It allows users to sign up, log in, chat with other users.
- User Authentication: Sign up and log in using email and password.
- Real-time Messaging: Send and receive messages in real-time.
- User Profile: View and update user profile information.
- Search Users: Search for other users to start a chat.
- Flutter SDK: Install Flutter
- Firebase Account: Create a Firebase Project
For installation go to releases and download the latest version of apk and install on your android device
or you can,
-
Clone the repository:
git clone https://github.com/your-username/chatbox.git cd chatbox -
Install dependencies:
flutter pub get
-
Set up Firebase:
- Go to the Firebase Console.
- Create a new project.
- Add an Android app and download the
google-services.jsonfile. - Place the
google-services.jsonfile in theandroid/appdirectory. - Add an iOS app and download the
GoogleService-Info.plistfile. - Place the
GoogleService-Info.plistfile in theios/Runnerdirectory. - Enable Firestore, Authentication, and Firebase Cloud Messaging in your Firebase project.
-
Configure Firebase: Replace the
firebase_options.dartfile with your Firebase configuration. You can generate this file using the Firebase CLI or manually configure it. -
Run the app:
flutter run
Ensure you have the following Firebase services enabled:
- Authentication: Enable email/password sign-in method.
- Firestore: Create necessary collections such as
users,chatrooms, etc. - Cloud Messaging: Enable Firebase Cloud Messaging for push notifications.
Users can sign up and log in using their email and password. The authentication state is handled using Firebase Authentication.
Users can chat in real-time with other users. Messages are stored in Firestore under chatrooms collection.
Users can view and update their profile information. Profile pictures are stored in Firebase Storage.
- lib
- authentication: Contains login and signup pages.
- helper: Firebase helper functions and constants.
- models: Data models for User and ChatRoom.
- pages: Main pages like Home, Chat, and Search.
- screens: Splash screen.
- widgets: Custom widgets used in the app.
main.dart: Entry point of the application.
flutterfirebase_corefirebase_authcloud_firestorefirebase_messagingfirebase_storagegoogle_fontsuuid