A beautiful, real-time chat application built with Flutter and Firebase that brings people together through seamless messaging.
- Real-time Messaging: Instant message delivery using Firebase Realtime Database
- User Authentication: Secure login and signup with Firebase Auth
- Beautiful UI: Modern gradient design with a dark, elegant theme
- User Discovery: Browse and chat with all registered users
- Persistent Sessions: Stay logged in across app restarts
- Message Timestamps: See when messages were sent with formatted time
- Responsive Design: Optimized for different screen sizes
| Login Screen | Signup Screen | Home Screen | Chat Screen |
|---|---|---|---|
- Frontend: Flutter (Dart)
- Backend: Firebase
- Firebase Authentication
- Firebase Realtime Database
- State Management: StatefulWidget
- Local Storage: SharedPreferences
- Date Formatting: intl package
lib/
├── models/
│ ├── chat_model.dart # Chat message data model
│ └── user_model.dart # User data model
├── screens/
│ ├── login_screen.dart # Authentication screen
│ ├── signup_screen.dart # User registration screen
│ ├── home_screen.dart # Users list screen
│ └── chat_screen.dart # Real-time chat interface
├── services/
│ └── firebase_options.dart # Firebase configuration
└── main.dart # App entry point
- Flutter SDK (>=3.0.0)
- Dart SDK
- Firebase project setup
- Android Studio / VS Code
git clone https://github.com/yourusername/chatify.git
cd chatifyflutter pub get- Create a new Firebase project at Firebase Console
- Enable Authentication (Email/Password)
- Enable Realtime Database
- Add your Android/iOS app to the project
- Download
google-services.json(Android) orGoogleService-Info.plist(iOS) - Place the configuration files in the appropriate directories
Update lib/services/firebase_options.dart with your Firebase project credentials:
static const FirebaseOptions android = FirebaseOptions(
apiKey: 'your-api-key',
appId: 'your-app-id',
messagingSenderId: 'your-sender-id',
projectId: 'your-project-id',
storageBucket: 'your-storage-bucket',
);flutter run- Sign Up: Create a new account with username, email, and password
- Login: Sign in with your credentials
- Browse Users: View all registered users on the home screen
- Start Chatting: Tap on any user to begin a conversation
- Real-time Messaging: Send and receive messages instantly
- Logout: Use the logout button to sign out securely
- Secure Firebase Authentication
- Form validation and error handling
- Persistent login sessions using SharedPreferences
- Bidirectional message sync
- Message timestamps with 12-hour format
- Elegant message bubbles with sender/receiver distinction
- Auto-scroll to latest messages
- Stunning gradient backgrounds
- Teal accent color scheme
- Responsive design elements
- Smooth animations and transitions
{
"users": {
"userId": {
"uid": "user_unique_id",
"email": "[email protected]",
"username": "display_name"
}
}
}{
"chats": {
"senderId-receiverId": {
"timestamp": {
"senderId": "sender_uid",
"receiverId": "receiver_uid",
"message": "message_text",
"timestamp": "milliseconds_since_epoch"
}
}
}
}Made with ❤️ and Flutter
Baat Karo Lekin Dil Se :)