How nihildigit/bilby works
Bilby is a Kotlin Multiplatform bilibili client for Android and Windows. Users browse followed creators, search for content, and play videos or audio; related workflows include an OpenAI-compatible search agent, a personal media library, and offline downloads. The shared Compose application sits above platform entry points, repositories, and the bilibili API client. The graph combines README-described capabilities with the sampled wiring; several feature-to-repository links are documented at the capability level, but their implementations were not sampled, so those edges are marked unverified.
Main entry points: AppContainer.kt Dependency container · BilbyApp.kt Compose app · AudioPlaybackService.kt Playback service · BiliClient.kt Bilibili API client
Components 25
App entry
- Android entry
shared/src/androidMain/kotlin/dev/bilby/ui/MainActivity.kt - Windows entry
desktop/src/main/kotlin/dev/bilby/desktop/Main.kt - Compose app
shared/src/commonMain/kotlin/dev/bilby/ui/BilbyApp.kt
Content experience
- Follow feed
shared/src/commonMain/kotlin/dev/bilby/ui/feed/FeedViewModel.kt - Search
shared/src/commonMain/kotlin/dev/bilby/ui/search/NormalSearchController.kt - Agent search
shared/src/commonMain/kotlin/dev/bilby/agent/AgentLoop.kt - Player UI
shared/src/commonMain/kotlin/dev/bilby/ui/player/PlayerShell.kt - Listen mode
shared/src/commonMain/kotlin/dev/bilby/ui/listen/ListenScreen.kt - Media library
shared/src/commonMain/kotlin/dev/bilby/ui/history/HistoryScreen.kt
Shared services
- Bilibili API client
shared/src/commonMain/kotlin/dev/bilby/api/BiliClient.kt - Search repository
shared/src/commonMain/kotlin/dev/bilby/data/SearchRepository.kt - Video repository
shared/src/commonMain/kotlin/dev/bilby/data/VideoRepository.kt - Settings and credentials
shared/src/commonMain/kotlin/dev/bilby/data/SettingsStore.kt - Dependency container
shared/src/commonMain/kotlin/dev/bilby/AppContainer.kt - LLM client
shared/src/commonMain/kotlin/dev/bilby/agent/LlmClient.kt - Feed cache
shared/src/commonMain/kotlin/dev/bilby/data/db/BilbyDatabase.kt - Logging
shared/src/commonMain/kotlin/dev/bilby/BiliLog.kt
Playback and offline
- Playback service
shared/src/androidMain/kotlin/dev/bilby/player/AudioPlaybackService.kt - Offline downloads
shared/src/commonMain/kotlin/dev/bilby/offline/OfflineDownloader.kt
Platform support
- Download service
shared/src/androidMain/kotlin/dev/bilby/offline/OfflineDownloadService.kt - Desktop window
desktop/src/main/kotlin/dev/bilby/desktop/WindowFrame.kt - App updates
shared/src/commonMain/kotlin/dev/bilby/update/AppUpdateService.kt
Other components
- User
- Bilibili services
- Compatible LLM endpoint
Connections 31
- User → Android entry: launches
- User → Windows entry: launches
- Android entry → Compose app: starts
- Windows entry → Compose app: starts
desktop/src/main/kotlin/dev/bilby/desktop/Main.kt - Compose app → Follow feed: routes to
- Compose app → Search: routes to
- Compose app → Player UI: routes to
- Compose app → Media library: routes to
- Search → Search repository: queries
shared/src/commonMain/kotlin/dev/bilby/ui/search/NormalSearchController.kt - Search repository → Bilibili API client: requests
shared/src/commonMain/kotlin/dev/bilby/data/SearchRepository.kt - Bilibili API client → Bilibili services: calls
shared/src/commonMain/kotlin/dev/bilby/api/BiliClient.kt - Compose app → Dependency container: creates
- Dependency container → Bilibili API client: provides
shared/src/commonMain/kotlin/dev/bilby/AppContainer.kt - Dependency container → Search repository: provides
shared/src/commonMain/kotlin/dev/bilby/AppContainer.kt - Dependency container → Video repository: provides
shared/src/commonMain/kotlin/dev/bilby/AppContainer.kt - Bilibili API client → Settings and credentials: reads credentials
shared/src/commonMain/kotlin/dev/bilby/api/BiliClient.kt - Agent search → LLM client: uses
- LLM client → Compatible LLM endpoint: streams requests
shared/src/commonMain/kotlin/dev/bilby/agent/LlmClient.kt - Search → Agent search: offers assisted search
- Player UI → Playback service: controls
- Listen mode → Playback service: uses playback
- Playback service → Video repository: loads media
shared/src/androidMain/kotlin/dev/bilby/player/AudioPlaybackService.kt - Playback service → Settings and credentials: reads preferences
shared/src/androidMain/kotlin/dev/bilby/player/AudioPlaybackService.kt - Offline downloads → Download service: signals activity
shared/src/androidMain/kotlin/dev/bilby/offline/OfflineDownloadService.kt - Playback service → Offline downloads: uses cached media
shared/src/androidMain/kotlin/dev/bilby/player/AudioPlaybackService.kt - Media library → Feed cache: uses cache
- Windows entry → Desktop window: configures
desktop/src/main/kotlin/dev/bilby/desktop/Main.kt - Dependency container → Feed cache: creates
shared/src/commonMain/kotlin/dev/bilby/AppContainer.kt - Dependency container → LLM client: provides
shared/src/commonMain/kotlin/dev/bilby/AppContainer.kt - Dependency container → Logging: uses
- User → App updates: checks updates