A modern Flutter messaging application with offline-first capabilities, real-time sync, and automatic update system.
60
- β¨ Real-time messaging via WebSocket
- π΄ Offline-first architecture with local database
- π Automatic background sync when connectivity restored
- π± Update notification system with "Remind Me Later"
- π Dark mode support
- π Secure authentication with JWT
- π Message status tracking (pending, sent, delivered, read)
- π₯ User search and conversation management
- Flutter 3.24.5 or higher
- Dart SDK 3.5.0 or higher
- Android Studio / VS Code with Flutter extensions
- Java 17 (for Android builds)
-
Clone the repository:
git clone https://github.com/NotEduCo342/OMMessenger-mobile.git cd OMMessenger-mobile -
Install dependencies:
flutter pub get
-
Generate code (Drift database):
flutter pub run build_runner build --delete-conflicting-outputs
-
Configure backend URL: Edit
lib/config/constants.dartand set your backend URL:static const String baseUrl = 'https://api-om.wexun.tech'; static const String wsUrl = 'wss://api-om.wexun.tech/ws';
-
Run the app:
flutter run
Debug build:
flutter build apk --debugRelease build:
flutter build apk --release --split-per-abiAPKs will be in: build/app/outputs/flutter-apk/
Your laptop crashes during builds? Use GitHub Actions!
Just push your code and GitHub will build automatically:
git add .
git commit -m "your changes"
git pushWait ~5-10 minutes, then download APKs from: Actions β Your Workflow Run β Artifacts
- Go to Actions
- Click "Build Android APK"
- Click "Run workflow" dropdown
- Select build type (release/debug)
- Click "Run workflow"
- Download APKs from Artifacts after ~5-10 minutes
- Go to Actions
- Click "Create Production Release"
- Click "Run workflow"
- Fill in the form:
- Version: e.g.,
1.0.1 - Build number: e.g.,
2 - Changelog: Your release notes
- Force update: Check if mandatory
- Min supported build: Minimum version still supported
- Version: e.g.,
- Click "Run workflow"
- APKs will be published to Releases
- arm64-v8a - 64-bit ARM (recommended for most devices, 2019+)
- armeabi-v7a - 32-bit ARM (older devices, 2015-2019)
- x86_64 - Intel-based Android (emulators, rare tablets)
Run tests:
flutter testRun tests with coverage:
flutter test --coverageFormat code:
dart format lib/ test/Analyze code:
flutter analyzelib/
βββ config/ # App configuration
βββ database/ # Drift database (SQLite)
βββ models/ # Data models
βββ providers/ # State management (Provider)
βββ screens/ # UI screens
βββ services/ # API, WebSocket, offline queue
βββ widgets/ # Reusable UI components
- ApiService - HTTP REST API communication
- WebSocketService - Real-time messaging
- ConnectivityService - Network status monitoring
- OfflineQueueService - Queue messages when offline
- UpdateService - Check for app updates
- Local-first storage for messages and conversations
- Automatic conflict resolution
- Background sync when connectivity restored
The app checks for updates on:
- App startup
- Returning from background
- Manual refresh
Users can:
- Update now (opens browser to download)
- Remind me later (24 hours)
- Skip (if not forced)
Force updates block the app until user updates.
This mobile app requires the OMMessenger backend server:
- Repository: OMMessenger-backend
- API docs: See backend repository
Versions are defined in pubspec.yaml:
version: 1.0.0+1 # 1.0.0 is version name, 1 is build numberWhen creating a release via GitHub Actions, the version is automatically updated.
flutter clean
flutter pub get
flutter build apk- Check backend URL in
constants.dart - Ensure backend is running and accessible
- Check network permissions in
AndroidManifest.xml
flutter pub run build_runner clean
flutter pub run build_runner build --delete-conflicting-outputs- Check workflow logs for specific errors
- Ensure
pubspec.yamlis valid - Verify all dependencies are available
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is private and proprietary.
For issues or questions:
- Check the Issues page
- Review the troubleshooting section above
- Create a new issue with detailed information
Built with β€οΈ using Flutter