$ show maotoumao/MusicFree
MusicFree is a plugin-driven, cross-platform mobile music player built with React Native and Expo. In production it provides audio playback, playlist management, lyric display and fetching, music searching, downloading, local music scanning, theme customization, and backup/restore. The app is not a data pipeline or research project; its only persistent data is user config, playlists, cache metadata, and music history. The architecture is a React Native application with a custom plugin runtime: external CommonJS JS plugins define music-source capabilities such as search, getMediaSource, getLyric, and getMusicSheetInfo, and the app dynamically loads those plugins through a sandboxed require. Core services include a track player wrapper, plugin manager, music sheet manager, downloader, lyric manager, theme manager, and i18n system, all coordinated through Jotai atoms, event emitters, and singleton stores. Entry points are index.js (app registration and TrackPlayer initialization), src/entry/index.tsx (main app shell), and src/entry/bootstrap/bootstrap.ts (startup initialization). External dependencies include react-native-track-player, MMKV, AsyncStorage, react-native-fs, expo modules, WebDAV, react-native-reanimated, and react-native-gesture-handler.
The LLM identified 4 files worth highlighting for reuse:
A self-contained LRC lyric parser that converts timestamped lyric text into structured lyric lines, supports metadata tags, and handles common offset/duration variations. It is isolated from the rest of the app and could be reused directly in any lyric-related project.
A generic drag-to-reorder FlatList wrapper using Animated and gesture handling. It provides a reusable, dependency-light pattern for sortable lists and is decoupled enough to be extracted into a standalone React Native component.
Implements the lifecycle of a user-installed music source plugin: loading CommonJS code, wrapping plugin methods, lazy mounting, and version handling. The sandbox and method wrapper pattern is non-trivial and demonstrates a reusable approach for app-extensible plugin runtimes, though the implementation is coupled to MusicFree's plugin API.
Maintains a persistently sorted music list using binary-search-based insertion and removal. This is an efficient, self-contained data structure pattern useful for any application that needs ordered collections with frequent small mutations.