A modern, feature-rich real-time chatting application built with Flutter and Firebase, supporting Android, iOS, and Web platforms.
- Features
- Screenshots
- Tech Stack
- Architecture
- Getting Started
- Usage
- Building for Production
- CI/CD Pipeline
- Project Structure
- Contributing
- Roadmap
- Known Issues
- License
- Contact
- Acknowledgments
- 🔐 User Authentication - Secure email/password authentication via Firebase Auth
- 💬 Real-time Messaging - Instant message delivery using Cloud Firestore
- 📷 Image Sharing - Send and receive images in conversations (Android/iOS)
- 🔒 Password Management - Change password functionality with validation
- 💾 Persistent Sessions - Stay logged in across app restarts
- 🖼️ Full-Screen Image Viewer - Tap images to view in full screen
- 🎨 Beautiful UI/UX - Clean, modern, and intuitive interface
- 📱 Responsive Design - Optimized layouts for all screen sizes
- 🔄 Smooth Animations - Loading indicators and transitions
- ⚡ High Performance - Optimized scrolling and rendering
- 🌐 Cross-Platform - Single codebase for Android, iOS, and Web
- 🔔 Real-time Updates - Messages appear instantly
- 📐 Landscape Support - Works in both portrait and landscape modes
- ✅ Form Validation - Client-side validation for all inputs
- 🚨 Error Handling - User-friendly error messages via Flushbar
- 🎭 Splash Screen - Custom splash screen on app launch
- 🖼️ Cached Images - Efficient image caching for better performance
- 📊 Firebase Backend - Scalable cloud infrastructure
Note: Image sending is currently not supported in the web version.
- Framework: Flutter (Dart SDK ^3.9.0)
- State Management: StatefulWidget with setState
- UI Components: Material Design
- Authentication: Firebase Authentication
- Database: Cloud Firestore
- Storage: Firebase Storage
- Local Storage: Shared Preferences
| Package | Version | Purpose |
|---|---|---|
| firebase_core | ^4.2.0 | Firebase SDK initialization |
| firebase_auth | ^6.1.1 | User authentication |
| cloud_firestore | ^6.0.3 | Real-time database |
| firebase_storage | ^13.0.3 | Image storage |
| image_picker | ^1.1.2 | Camera/gallery access |
| cached_network_image | ^3.4.1 | Image caching |
| email_validator | ^3.0.0 | Email validation |
| another_flushbar | ^1.12.30 | Toast messages |
| shared_preferences | ^2.3.2 | Local data persistence |
lib/
├── main.dart # App entry point
├── theme.dart # App-wide theme configuration
├── common.dart # Common utilities
├── components/ # Reusable UI components
│ ├── circular_loader.dart
│ ├── flush_message.dart
│ ├── general_button.dart
│ └── login_register_header.dart
├── models/ # Data models
│ ├── message.dart
│ └── user.dart
├── screens/ # App screens
│ ├── login/
│ ├── register/
│ ├── chat/
│ ├── settings/
│ ├── change_password/
│ └── full_sized_image.dart
└── services/ # Business logic & Firebase services
├── auth/
├── database.dart
└── responsive.dart
Before you begin, ensure you have the following installed:
- Flutter SDK (3.35.6 or higher)
- Dart SDK (^3.9.0)
- Android Studio or VS Code
- Git
- A Firebase account (Create one here)
-
Clone the repository
git clone https://github.com/Rezuanul-Islam-Fahim/anonymous_chat.git cd anonymous_chat -
Install dependencies
flutter pub get
-
Verify Flutter installation
flutter doctor
-
Create a Firebase Project
- Go to Firebase Console
- Click "Add Project" and follow the setup wizard
- Enable Google Analytics (optional)
-
Add Firebase to your Flutter app
For Android:
- Download
google-services.jsonfrom Firebase Console - Place it in
android/app/ - Update
android/build.gradlewith Firebase dependencies (already configured)
For iOS:
- Download
GoogleService-Info.plistfrom Firebase Console - Add it to
ios/Runner/in Xcode
For Web:
- Copy your Firebase configuration
- Update
web/index.htmlwith Firebase SDK initialization
- Download
-
Enable Firebase Services
In Firebase Console, enable:
- Authentication → Email/Password sign-in method
- Firestore Database → Create database in test mode
- Storage → Set up Firebase Storage with appropriate rules
-
Configure Firestore Security Rules
rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { match /messages/{message} { allow read, write: if request.auth != null; } match /users/{user} { allow read: if request.auth != null; allow write: if request.auth != null && request.auth.uid == user; } } }
-
Configure Storage Security Rules
rules_version = '2'; service firebase.storage { match /b/{bucket}/o { match /chat_images/{imageId} { allow read: if request.auth != null; allow write: if request.auth != null && request.resource.size < 5 * 1024 * 1024 && request.resource.contentType.matches('image/.*'); } } }
Debug Mode:
# Run on connected device/emulator
flutter run
# Run on specific device
flutter devices
flutter run -d <device_id>
# Run on Chrome (Web)
flutter run -d chromeDevelopment:
# Hot reload - Press 'r' in terminal
# Hot restart - Press 'R' in terminal
# Quit - Press 'q' in terminal-
Registration
- Open the app
- Click "Create Account"
- Enter email, username, and password
- Submit to create account
-
Login
- Enter registered email and password
- Click "Login"
- Access the chat screen
-
Chatting
- View all messages in real-time
- Type message in input field
- Tap camera icon to send images (mobile only)
- Tap image to view full-screen
-
Settings
- Access settings from chat screen
- Change password
- Logout
# Build APK
flutter build apk --release
# Build App Bundle (for Play Store)
flutter build appbundle --release
# Split APKs by ABI
flutter build apk --split-per-abi --releaseOutput location: build/app/outputs/flutter-apk/
# Build for iOS
flutter build ios --release
# Build IPA
flutter build ipa --release# Build for web
flutter build web --releaseOutput location: build/web/
Update version:
Edit pubspec.yaml:
version: 1.1.0+6 # version_name+build_numberGenerate launcher icons:
flutter pub run flutter_launcher_icons:mainGenerate splash screen:
flutter pub run flutter_native_splash:createThis project includes an automated CI/CD pipeline using GitHub Actions that builds and deploys the APK to Appetize.io for easy testing.
- ✅ Automated Builds - Triggered on pull requests to main branch or manual dispatch
- � Firebase Auto-Configuration - Automatic Firebase setup for Android, iOS, and Web
- �🚀 Appetize Deployment - Automatic deployment to Appetize.io for browser testing
- 📦 APK Artifacts - Download ready-to-install APKs (30-day retention)
- ⚡ Smart Caching - Flutter SDK, pub dependencies, and Gradle caching (3x faster builds)
- 🔍 Code Analysis - Runs
flutter analyzeon every build - 📊 Build Summary - Detailed workflow summaries with download links
| Build Type | Duration | Notes |
|---|---|---|
| First Build | ~12-15 min | Full dependency download |
| Cached Build | ~4-5 min | With cache hits (3x faster) |
The workflow automatically configures Firebase for all platforms (Android, iOS, Web) during the build process.
Required GitHub Secrets:
-
Get Firebase CI token:
firebase login:ci
Copy the token from the output.
-
Add secrets to GitHub:
- Go to
Settings → Secrets and variables → Actions - Add the following secrets:
- Name:
FIREBASE_TOKEN
Value: Your Firebase CI token from step 1 - Name:
FIREBASE_PROJECT_ID
Value: Your Firebase project ID (e.g.,anonymous-chat-ed611)
- Name:
- Go to
What the workflow does:
- Automatically installs Firebase CLI and FlutterFire CLI
- Configures Firebase for Android, iOS, and Web platforms
- Generates
firebase_options.dart,google-services.json, andGoogleService-Info.plist - No manual Firebase configuration needed!
-
Get Appetize API Token
- Sign up at Appetize.io
- Navigate to Account Settings → API Token
- Copy your API token
-
Add GitHub Secrets
- Go to
Settings → Secrets and variables → Actions - Add secret:
APPETIZE_API_TOKEN(required) - After first run, add:
APPETIZE_PUBLIC_KEY(for updates)
- Go to
- Create a Pull Request to the main branch
- Or manually:
Actions → Build Flutter APK and Deploy to Appetize → Run workflow
- Check workflow summary for APK download link
- Test app in browser via Appetize URL
- Download APK artifact for local testing
| Secret Name | Description | Required | How to Get |
|---|---|---|---|
FIREBASE_TOKEN |
Firebase CI authentication token | ✅ Yes | Run firebase login:ci in terminal |
FIREBASE_PROJECT_ID |
Firebase project ID | ✅ Yes | Find in Firebase Console URL or project settings |
APPETIZE_API_TOKEN |
Appetize.io API token | ✅ Yes | Get from Appetize.io Account Settings → API Token |
APPETIZE_PUBLIC_KEY |
Appetize app public key (auto-generated) | ⭐ Optional | Provided in first workflow run output |
See .github/ARCHITECTURE.md for detailed workflow architecture, caching strategy, and troubleshooting guide.
- Workflow Status: Check the build badge at the top of this README
- Build History:
Actionstab →Build Flutter APK and Deploy to Appetize - APK Artifacts: Available in workflow run summaries for 30 days
anonymous_chat/
├── .github/ # GitHub configuration
│ ├── workflows/ # GitHub Actions workflows
│ │ └── build-and-deploy-appetize.yml
│ ├── ARCHITECTURE.md # CI/CD workflow architecture
│ └── copilot-instructions.md
├── android/ # Android native code
├── ios/ # iOS native code
├── web/ # Web-specific files
├── lib/ # Flutter application code
│ ├── components/ # Reusable widgets
│ ├── models/ # Data models
│ ├── screens/ # UI screens
│ │ ├── chat/ # Chat screen
│ │ ├── login/ # Login screen
│ │ ├── register/ # Registration screen
│ │ ├── settings/ # Settings screen
│ │ └── change_password/ # Password change screen
│ ├── services/ # Backend services
│ │ ├── auth/ # Authentication logic
│ │ ├── database.dart # Firestore operations
│ │ └── responsive.dart # Responsive utilities
│ ├── main.dart # Entry point
│ ├── theme.dart # App theme
│ └── common.dart # Common utilities
├── assets/ # Images and assets
├── test/ # Unit and widget tests
├── pubspec.yaml # Dependencies
├── analysis_options.yaml # Linting rules
├── firebase.json # Firebase configuration
└── README.md # This file
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch
git checkout -b feature/AmazingFeature
- Commit your Changes
git commit -m 'Add some AmazingFeature' - Push to the Branch
git push origin feature/AmazingFeature
- Open a Pull Request
- Follow Effective Dart guidelines
- Run
flutter analyzebefore committing - Format code with
flutter format . - Add comments for complex logic
- Update documentation for new features
- Use the issue tracker
- Check if the issue already exists
- Provide detailed reproduction steps
- Include screenshots/logs if applicable
- Push notifications for new messages
- Online/offline user status indicators
- Read receipts and message status
- Group chat functionality
- Voice message support
- Video call integration
- Message reactions (emoji)
- Search messages functionality
- Dark mode theme
- Multi-language support (i18n)
- Message encryption (E2E)
- User profile customization
- Image sending support for web
- File sharing capability
- Message editing and deletion
See the open issues for a full list of proposed features and known issues.
- Web Platform: Image sending is not currently supported due to platform limitations
- Performance: Large images may take time to upload on slower connections
- Compatibility: Some older Android devices may experience performance issues
For a complete list, visit the Issues page.
Distributed under the MIT License. See LICENSE file for more information.
MIT License
Copyright (c) 2021 Rezuanul Islam Fahim
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Rezuanul Islam Fahim
- GitHub: @Rezuanul-Islam-Fahim
- Project Link: https://github.com/Rezuanul-Islam-Fahim/anonymous_chat
- Flutter Team - For the amazing framework
- Firebase - For backend infrastructure
- Material Design - For design guidelines
- All contributors and users of this project
If you find this project useful, please consider:
- ⭐ Starring the repository
- 🍴 Forking and contributing
- 🐛 Reporting bugs
- 💡 Suggesting new features
- 📢 Sharing with others
Made with ❤️ and Flutter