A real-time chat application built using Flutter and various services of Firebase, such as, Firebase Authentication, Cloud Storage, Firestore Database, CLoud Functions, etc.
The application allowed users to authenticate through their email and create a customized account. The app is a typical chat application where users can send messages and images to other registered users.
- Real-time Messaging: Enjoy instant messaging with real-time updates.
- User Authentication: Securely authenticate users using Firebase Authentication.
- Firestore Database Integration: Store and retrieve chat messages in real-time using Firebase Cloud Firestore.
- Cloud Storage: Help to send images via chat and also allow users to customize their profile photo.
- Flutter UI: Intuitive and responsive user interface built with Flutter for a smooth user experience.
- Lexical Seach: To find specific users amongst all registered users.
The system consists of the following major components:
- Client Application: Built with Flutter, the client app handles the user interface and interactions, including sending and receiving messages and images.
- Firebase Authentication: Manages user authentication and secure login using email and password.
- Firestore Database: A NoSQL database that stores user profiles, messages, and other chat-related data in real-time.
- Firebase Cloud Storage: Stores media files such as profile pictures and images shared in chat.
- Cloud Functions: Used for server-side logic, such as sending notifications, handling complex queries, and other backend operations.
- User Authentication: Users register or log in using their email credentials. Firebase Authentication manages secure sessions.
- Real-time Messaging: Messages are sent and received in real-time using Firestore, where each conversation is stored as a collection of messages.
- Media Sharing: Images sent in chat are uploaded to Firebase Cloud Storage, and their URLs are stored in Firestore.
- Profile Management: Users can update their profiles, including their profile pictures, which are stored in Cloud Storage.
- Auth Section:
- User opens the app -> Check if the user is logged in.
- If not logged in -> Redirect to Login or Registration page.
- Upon successful login -> Redirect to the Dashboard.
- On Dashboard:
- Access Conversations, Users, or Profile sections.
- Start a new conversation or continue an existing one.
- Messaging:
- Send text messages or images.
- Messages are displayed in real-time.
Document ID: UserID (auto-generated)
Fields:
email: String - User's email address.
username: String - User's display name.
profileImageUrl: String - URL of the profile picture stored in Cloud Storage.
status: String - User status (online, offline).
createdAt: Timestamp - Account creation date.
lastLogin: Timestamp - Last login date.
Document ID: ConversationID (auto-generated)
Fields:
participants: Array - List of user IDs participating in the conversation.
lastMessage: String - Preview of the last message sent.
lastMessageTimestamp: Timestamp - Time when the last message was sent.
Document ID: MessageID (auto-generated)
Fields:
senderId: String - User ID of the sender.
text: String - Content of the text message (if any).
imageUrl: String - URL of the image in Cloud Storage (if any).
timestamp: Timestamp - Time when the message was sent.
Document ID: ImageID (auto-generated)
Fields:
uploadedBy: String - User ID who uploaded the image.
imageUrl: String - URL of the image in Cloud Storage.
uploadedAt: Timestamp - Time when the image was uploaded.
Follow the instruction below to setup the project on your device.
Before you begin, ensure you have met the following requirements:
- Flutter installed on your local machine. Install Flutter
- Firebase account for setting up Firestore and Authentication. Firebase Console
-
Clone the repository:
git clone https://github.com/ANSHIKA010/talkify.git
-
Move to the created directory.
cd talkify
-
Install Dependencies
flutter pub get
-
Setup Firebase
- Create a new project on the Firebase Console.
- Add an Android and/or iOS app to your Firebase project.
- Configure your project using flutterfire
-
Configure and Deploy Cloud Functions
- Activate the service in firebase project for google cloud functions.
- Use the functions designed --> File containg functions
- Deploy those function on firebase.
-
Run the app
flutter run
Contributions are welcomed! Please follow the contribution guidelines for details.