How muhammad-84/social-media-zego works
Project type and purpose
• This is a cross-platform Flutter social-media application (“social_media_zego”) that runs on Android, iOS, web, Windows, macOS, and Linux.
• It uses Firebase (for configuration and possibly authentication/database) and the Zego Cloud SDKs (ZIM for chat, ZEGOCLOUD for audio/video/live-stream) to implement real-time communication features.
File structure
• Top-level platform folders (android/, ios/, macos/, windows/, linux/, web/) contain the native runners, configs, and plugin registrants.
• lib/ holds all Dart code:
• main.dart (entry point)
• firebase_options.dart (Firebase config)
• consts/constants.dart (app constants)
• screens/… (UI screens grouped by feature: auth, home, chats, Zego cloud integrations, widgets)
• pubspec.yaml (package dependencies: flutter, firebase_core, zego_zim, zego_uikit_prebuilt_call, etc.)
• test/ for widget tests
• android/gradle and ios/macos runner projects for native builds
Additional README insights
• The README is the default Flutter template; it confirms a starter Flutter app, but doesn’t detail architecture.
• We infer a layered architecture:
• Presentation/UI layer (screens/widgets)
• Service layer (Firebase, Zego SDK wrappers)
• Platform & plugin layer (Flutter engine + native plugin code)
• External systems (Firebase backend, Zego Cloud backend)
Detailed guidance
1. Presentation Layer (Widgets & Screens)
2. Service Layer (FirebaseService, ZegoChatService, ZegoCallService)
3. Plugin Layer (auto-generated plugin registrants)
• Service Layer → Firebase Backend (labeled: Auth, Firestore, Storage)
• Service Layer → Zego Cloud Backend (labeled: ZIM Chat, Live Stream, Audio/Video Call)
• Blue for Flutter layers
• Green for external backends
• Grey for platform specifics