How karanjot-singh/microsoft_teams_clone works
Purpose and Runtime
This is an Android-focused Flutter/Dart Microsoft Teams-style client for authenticated chat, channels, and video meetings. Flutter owns most UI and app flow; the Android host embeds Flutter and integrates platform SDK setup. Key entry points: lib/main.dart, lib/home_page.dart, android/app/src/main/kotlin/com/karanjot/microsoft_teams_karanjot/MainActivity.kt.
Application Bootstrap and Navigation
lib/main.dart initializes the application and its service dependencies before rendering the root UI. lib/home_page.dart acts as the main authenticated application shell. Named-route registration and route dispatch are separated in lib/routes/app_routes.dart and lib/routes/routes.dart, forming the boundary between feature pages and global navigation.
Identity and Session Boundary
Google sign-in and Firebase authentication establish the user identity used by the rest of the client. The authentication abstraction is in lib/services/authentication/authentication.dart; login/account UI is in lib/pages/login/sign_in_page.dart and lib/pages/login/user_info_page.dart. Firebase Android configuration is supplied through android/app/google-services.json.
Chat Integration
Stream Chat is the core messaging backend, responsible for real-time conversations and chat state. Service-layer integration is concentrated in lib/services/stream_chat/stream_api.dart and lib/services/stream_chat/chat_list.dart; feature UI begins at lib/pages/chats/chats_home_page.dart. This boundary allows chat pages to support direct/group conversations, threads, pinned messages, reactions, media, and channel operations without owning backend connectivity.
Conversation and Channel Flows
Chat navigation branches from chat lists into individual threads, metadata, and channel resources. Primary screens include lib/pages/chats/thread_page.dart, lib/pages/chats/group_chat/channel_page.dart, and lib/pages/chats/group_chat/channel_info_page.dart. New-conversation/channel creation is handled separately under lib/pages/chats/new_chat/new_chat_page.dart, with member selection in lib/pages/chats/new_chat/add_channel_members_page.dart.
Meeting and Collaboration Flows
Meeting UI is organized around browse/create/join flows in lib/pages/meetings/meetings_page.dart, lib/pages/meetings/create_meetings_page.dart, and lib/pages/meetings/join_meetings_page.dart. The declared Jitsi Meet dependency supplies live conferencing capabilities; meeting pages are the Flutter-side control boundary for entering those native/video sessions. Channel file and media views extend collaboration from chat context: lib/pages/chats/group_chat/channel_file_page.dart, lib/pages/chats/group_chat/channel_media_page.dart.
Platform, Notifications, and Delivery
The Android project uses Gradle/AndroidX and contains the native application setup in android/app/build.gradle and android/app/src/main/kotlin/com/karanjot/microsoft_teams_karanjot/Application.kt. Notification behavior is isolated in lib/services/notifications/notifications_service.dart. Required device capabilities—network, camera, microphone, and storage—are declared through Android manifests, principally android/app/src/main/AndroidManifest.xml. Release APK artifacts are present in apks/.
Main entry points: main.dart App bootstrap · chats_home_page.dart Chat lists · routes.dart Route dispatch · authentication.dart Authentication service
Components 22
Flutter client
Application UI, routing, and feature flows.
- App bootstrap · Initializes dependencies and renders the application.
lib/main.dart - Authenticated shell
lib/home_page.dart - Route registry · Registers named routes.
lib/routes/app_routes.dart - Route dispatch · Maps route requests to feature pages.
lib/routes/routes.dart - Sign-in UI
lib/pages/login/sign_in_page.dart - Account UI
lib/pages/login/user_info_page.dart - Chat lists · Entry point for conversations and channels.
lib/pages/chats/chats_home_page.dart - Thread and channel views · Individual threads, channels, and channel metadata.
lib/pages/chats/thread_page.dart - New conversation · Creates conversations and selects channel members.
lib/pages/chats/new_chat/new_chat_page.dart - Channel resources · Channel file and media views.
lib/pages/chats/group_chat/channel_file_page.dart - Meeting flows · Browse, create, and join meeting controls.
lib/pages/meetings/meetings_page.dart
Service integrations
Identity, chat, and notification boundaries.
- Authentication service · Establishes the authenticated user session.
lib/services/authentication/authentication.dart - Firebase Auth · Google sign-in and Firebase authentication.
android/app/google-services.json - Stream Chat API · Owns real-time chat backend connectivity.
lib/services/stream_chat/stream_api.dart - Chat list service
lib/services/stream_chat/chat_list.dart - Notification service
lib/services/notifications/notifications_service.dart
Android host
Native embedding, SDK setup, and device permissions.
- Flutter activity · Embeds the Flutter runtime.
android/app/src/main/kotlin/com/karanjot/microsoft_teams_karanjot/MainActivity.kt - Android application · Initializes Android-side application integrations.
android/app/src/main/kotlin/com/karanjot/microsoft_teams_karanjot/Application.kt - Android build · Declares Android and platform SDK dependencies.
android/app/build.gradle - Device permissions · Declares network, camera, microphone, and storage access.
android/app/src/main/AndroidManifest.xml - Jitsi Meet · Provides live native/video meeting sessions.
- Release APKs
apks/MsTeams-arm64-v8a-release.apk
Connections 24
- App bootstrap → Authentication service: initializes
- App bootstrap → Authenticated shell: renders
- App bootstrap → Route registry: configures
- Route registry → Route dispatch: routes through
- Route dispatch → Sign-in UI: opens
- Route dispatch → Chat lists: opens
- Route dispatch → Meeting flows: opens
- Authenticated shell → Chat lists: hosts
- Authenticated shell → Meeting flows: hosts
- Sign-in UI → Authentication service: authenticates with
- Account UI → Authentication service: uses session
- Authentication service → Firebase Auth: uses
- Chat lists → Chat list service: loads
- Chat list service → Stream Chat API: uses
- Chat lists → Thread and channel views: navigates to
- Chat lists → New conversation: creates
- Thread and channel views → Channel resources: opens
- Meeting flows → Jitsi Meet: joins sessions via
- App bootstrap → Notification service: initializes
- Flutter activity → App bootstrap: launches
- Android application → Flutter activity: hosts
- Android build → Jitsi Meet: declares
- Device permissions → Flutter activity: permits device access
- Android build → Release APKs: produces