Workspace Configuration
The monorepo is configured inpnpm-workspace.yaml:
package.json.
Directory Structure
Applications
Mobile App (apps/mobile)
The main React Native application for Android and iOS.
Package Name
@bbplayer/mobileVersion
2.3.2
Framework
React Native 0.83.1 + Expo 55
Dependencies
Uses all workspace packages
src/app/: Expo Router file-based routingsrc/features/: Feature-sliced modules (player, library, downloads, etc.)src/lib/: Core libraries (API clients, database, services)src/components/: Shared React componentssrc/hooks/: Custom React hookssrc/utils/: Utility functions
The mobile app uses Rozenite for advanced Metro bundler optimizations and profiling capabilities.
Backend Service (apps/backend)
Serverless API built with Hono and deployed on Cloudflare Workers.
Package Name
@bbplayer/backendVersion
0.0.1
Framework
Hono 4.12.2
Runtime
Cloudflare Workers
src/routes/: API route handlerssrc/db/: Database schema and migrationssrc/middleware/: Request middlewaresrc/validators/: ArkType validation schemas
Documentation (apps/docs)
Mintlify-powered documentation website (you’re reading it now!).
Shared Packages
@bbplayer/orpheus
Custom Expo module for audio playback based on Android Media3 ExoPlayer.- Native audio playback with Media3
- Background playback support
- Queue management
- Audio focus handling
- Media session integration
src/: TypeScript APIandroid/: Kotlin implementationios/: Swift implementationexample/: Test application
@bbplayer/splash
Lyrics parsing and conversion library supporting SPL format.- Parse LRC and SPL lyrics formats
- Word-level timing support
- Romaji annotation
- Translation layers
- Format conversion utilities
SPL (Synchronized Progressive Lyrics) is BBPlayer’s custom format supporting word-level timing and multi-layer translations. See the SPL specification for details.
@bbplayer/image-theme-colors
Expo module for extracting theme colors from images.- Extract dominant colors from album artwork
- Material Design 3 color scheme generation
- Monet theming support
- Native performance using Expo ImageRef
@bbplayer/logs
Performance-aware logging library.- Namespace-based logging
- Custom log levels
- Multiple transports (console, file)
- Performance-optimized for React Native
- Conditional logging based on environment
@bbplayer/eslint-plugin
Custom ESLint rules for BBPlayer code conventions.Workspace Dependencies
Internal Package References
Packages reference each other using theworkspace:* protocol:
Dependency Synchronization
The monorepo uses syncpack to ensure consistent dependency versions:All packages share the same versions of React (19.2.0), React Native (0.83.1), TypeScript (5.9.3), and other core dependencies.
TypeScript Configuration
The monorepo uses TypeScript project references for efficient type checking:Development Workflow
Root Scripts
The rootpackage.json provides workspace-wide commands:
Git Hooks
Lefthook manages git hooks for the entire monorepo:- Pre-commit: Runs linting and formatting on staged files
- Commit-msg: Validates commit messages (conventional commits)
- Pre-push: Runs type checking
Package Patches
Thepatches/ directory contains modifications to node_modules:
pnpm install.
Build Optimization
Selective Dependencies
The workspace configuration specifies which dependencies should be built:Next Steps
Architecture Overview
Return to the high-level architecture overview
Tech Stack
Explore the complete technology stack