# pankajkc1995/live_streaming architecture

> Architecture diagram of the GitHub repository pankajkc1995/live_streaming, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pankajkc1995/live_streaming
- Repository: https://github.com/pankajkc1995/live_streaming

## Overview

This is a Flutter live-streaming app whose main journey is signing in, discovering a stream, and participating as a host or viewer through real-time video and audience interactions. The README describes a UI → BLoC → use case → repository → data source architecture, with Firebase and Agora integrations. The graph preserves major documented feature areas; source excerpts are limited to platform scaffolding, so feature-level connections rely on the README rather than inspected Dart implementations.

Main entry points: [`lib/app.dart`](https://github.com/pankajkc1995/live_streaming/blob/main/lib/app.dart) (Flutter app), [`lib/features/live_stream`](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/live_stream) (Live sessions), [`lib/features/authentication`](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/authentication) (Authentication), [`lib/features/chat`](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/chat) (Live chat)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["App foundation"]
  node_app["Flutter app<br/>[app.dart]"]
  node_routing["Routing<br/>[app_router.dart]"]
  node_firebase["Firebase services"]
  node_functions["Cloud Functions<br/>[index.js]"]
end

subgraph group_identity["Identity and discovery"]
  node_auth["Authentication"]
  node_home["Stream discovery"]
  node_search["Host search"]
end

subgraph group_streaming["Live streaming"]
  node_live["Live sessions"]
  node_viewer_feature["Viewer experience"]
  node_agora["Agora RTC<br/>[agora_service.dart]"]
end

subgraph group_engagement["Audience engagement"]
  node_chat["Live chat"]
  node_likes["Likes"]
  node_gifts["Virtual gifts"]
  node_follow["Follow"]
  node_notifications["Notifications"]
  node_fcm["Push messaging<br/>[fcm_service.dart]"]
end

subgraph group_account["User account"]
  node_profile["Profiles and history"]
  node_settings["Settings"]
end

node_viewer(("Viewer"))

node_viewer -->|"uses"| node_app
node_app -->|"routes through"| node_routing
node_app -->|"presents"| node_auth
node_app -->|"presents"| node_home
node_app -->|"presents"| node_search
node_app -->|"presents"| node_live
node_app -->|"presents"| node_viewer_feature
node_live -->|"streams with"| node_agora
node_app -->|"provides"| node_chat
node_app -->|"provides"| node_likes
node_app -->|"provides"| node_gifts
node_app -->|"provides"| node_follow
node_app -->|"provides"| node_notifications
node_notifications -->|"uses"| node_fcm
node_app -->|"provides"| node_profile
node_app -->|"provides"| node_settings
node_auth -->|"authenticates with"| node_firebase
node_chat -->|"stores chat in"| node_firebase
node_live -->|"gets tokens from"| node_functions

click node_app "https://github.com/pankajkc1995/live_streaming/blob/main/lib/app.dart"
click node_routing "https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/routing/app_router.dart"
click node_auth "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/authentication"
click node_home "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/home"
click node_search "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/search"
click node_live "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/live_stream"
click node_viewer_feature "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/viewer"
click node_agora "https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/services/agora_service.dart"
click node_chat "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/chat"
click node_likes "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/like"
click node_gifts "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/gift"
click node_follow "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/follow"
click node_notifications "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/notification"
click node_fcm "https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/services/fcm_service.dart"
click node_profile "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/profile"
click node_settings "https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/settings"
click node_firebase "https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/firebase/firebase_service.dart"
click node_functions "https://github.com/pankajkc1995/live_streaming/blob/main/functions/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_routing,node_firebase,node_functions,node_viewer toneBlue
class node_auth,node_home,node_search toneAmber
class node_live,node_viewer_feature,node_agora toneMint
class node_chat,node_likes,node_gifts,node_follow,node_notifications,node_fcm toneRose
class node_profile,node_settings toneIndigo
```

## Components

### App foundation

- [Flutter app](https://github.com/pankajkc1995/live_streaming/blob/main/lib/app.dart): `lib/app.dart`
- [Routing](https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/routing/app_router.dart): `lib/core/routing/app_router.dart`
- [Firebase services](https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/firebase/firebase_service.dart): `lib/core/firebase/firebase_service.dart`
- [Cloud Functions](https://github.com/pankajkc1995/live_streaming/blob/main/functions/index.js): `functions/index.js`

### Identity and discovery

- [Authentication](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/authentication): `lib/features/authentication`
- [Stream discovery](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/home): `lib/features/home`
- [Host search](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/search): `lib/features/search`

### Live streaming

- [Live sessions](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/live_stream): `lib/features/live_stream`
- [Viewer experience](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/viewer): `lib/features/viewer`
- [Agora RTC](https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/services/agora_service.dart): `lib/core/services/agora_service.dart`

### Audience engagement

- [Live chat](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/chat): `lib/features/chat`
- [Likes](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/like): `lib/features/like`
- [Virtual gifts](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/gift): `lib/features/gift`
- [Follow](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/follow): `lib/features/follow`
- [Notifications](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/notification): `lib/features/notification`
- [Push messaging](https://github.com/pankajkc1995/live_streaming/blob/main/lib/core/services/fcm_service.dart): `lib/core/services/fcm_service.dart`

### User account

- [Profiles and history](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/profile): `lib/features/profile`
- [Settings](https://github.com/pankajkc1995/live_streaming/tree/main/lib/features/settings): `lib/features/settings`

### Other components

- **Viewer**

## Connections

- Viewer → Flutter app: uses (evidence: `README.md`)
- Flutter app → Routing: routes through (evidence: `README.md`)
- Flutter app → Authentication: presents (evidence: `README.md`)
- Flutter app → Stream discovery: presents (evidence: `README.md`)
- Flutter app → Host search: presents (evidence: `README.md`)
- Flutter app → Live sessions: presents (evidence: `README.md`)
- Flutter app → Viewer experience: presents (evidence: `README.md`)
- Live sessions → Agora RTC: streams with (evidence: `README.md`)
- Flutter app → Live chat: provides (evidence: `README.md`)
- Flutter app → Likes: provides (evidence: `README.md`)
- Flutter app → Virtual gifts: provides (evidence: `README.md`)
- Flutter app → Follow: provides (evidence: `README.md`)
- Flutter app → Notifications: provides (evidence: `README.md`)
- Notifications → Push messaging: uses (evidence: `README.md`)
- Flutter app → Profiles and history: provides (evidence: `README.md`)
- Flutter app → Settings: provides (evidence: `README.md`)
- Authentication → Firebase services: authenticates with (evidence: `README.md`)
- Live chat → Firebase services: stores chat in (evidence: `README.md`)
- Live sessions → Cloud Functions: gets tokens from (evidence: `README.md`)
