Check out the full video presentation of this project: https://youtu.be/drKzOdLaC9w
A modern, animated music player app built with React Native that demonstrates advanced UI interactions and state management.
- Modern UI Design: Clean, dark-themed interface with smooth animations
- Expandable Mini Player: Interactive mini player that expands to full-screen view
- Music Library: Browse and search through music tracks
- Infinite Scroll: Seamlessly load more tracks as you scroll
- State Management: Efficient state handling with Zustand
- Smooth Animations: Fluid transitions powered by React Native Reanimated
- Cross-Platform: Runs on both iOS and Android
- React Native (0.80.1) - Cross-platform mobile framework
- TypeScript (5.0.4) - Type-safe development
- React (19.1.0) - UI library
- Zustand (5.0.6) - Lightweight state management
- TanStack Query (5.81.5) - Server state management and caching
- MusicBrainz API - Music metadata source
- React Native Reanimated (3.18.0) - High-performance animations
- React Native Gesture Handler (2.27.1) - Native gesture handling
- React Native SVG (15.12.0) - Vector graphics support
- React Native Safe Area Context (5.5.1) - Safe area handling
- @legendapp/list (1.1.4) - Optimized list component with recycling
- Node.js (≥18.0.0)
- React Native development environment set up
- iOS: Xcode and CocoaPods
- Android: Android Studio and SDK
-
Clone the repository
git clone <repository-url> cd MusicPlayer
-
Install dependencies
yarn install # or npm install -
iOS Setup (iOS only)
cd ios bundle install bundle exec pod install cd ..
-
Start Metro bundler
yarn start # or npm start -
Run the app
For iOS:
yarn ios # or npm run iosFor Android:
yarn android # or npm run android
src/
├── api/
│ └── queries.ts # API calls and data fetching
├── assets/
│ ├── next.svg # Navigation icons
│ ├── play-button.svg # Play/pause button
│ └── previous.svg # Previous button
├── components/
│ ├── MiniPlayer.tsx # Expandable mini player component
│ └── SongListItem.tsx # Individual song list item
├── screens/
│ └── MusicList.tsx # Main music library screen
├── store/
│ └── index.ts # Zustand store configuration
└── utils/
├── colors.ts # Color palette
└── consts.ts # App constants and API URLs
- Why: Lightweight alternative to Redux with minimal boilerplate
- Benefits: Simple API, TypeScript support, no providers needed
- Usage: Currently manages selected track information (id, title, artist)
- Why: Native-level performance for complex animations
- Benefits: 60fps animations, gesture handling, layout transitions
- Usage: Mini player expansion, fade transitions, layout animations
- Why: Powerful server state management with caching
- Benefits: Automatic background updates, infinite scroll, error handling
- Usage: Fetches music data from MusicBrainz API with pagination
- Why: Optimized for large datasets with item recycling
- Benefits: Better performance than FlatList for long lists
- Usage: Renders music tracks list with infinite scroll
- Why: Free, comprehensive music metadata database
- Benefits: No API key required, rich metadata, reliable service
- Usage: Fetches Swedish music tracks with artist credits
- Functional Components: Modern React patterns with hooks
- Custom Hooks: Reusable logic with useMusicStore
- Animated Components: Smooth transitions with Reanimated
interface MusicTrack {
id: string | null;
title: string | null;
artist: string | null;
}- Layout Animations: Smooth transitions between collapsed/expanded states
- Gesture Handling: Touch interactions for player controls
- Performance: Native thread animations for 60fps experience
# Start development server
yarn start
# Run on iOS simulator
yarn ios
# Run on Android emulator
yarn android
# Run tests
yarn test
# Lint code
yarn lint
# Start with logs
yarn start-logs- Launch: App loads with music library from MusicBrainz API
- Browse: Infinite scroll through Swedish music tracks
- Select: Tap a track to select it and show mini player
- Expand: Tap mini player to expand to full-screen view
- Controls: Access playback controls in expanded view
- Navigate: Seamless transitions between views
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
The app uses the MusicBrainz API for music metadata:
- Base URL:
https://musicbrainz.org/ws/2/ - Format: JSON
- Rate Limiting: Please follow MusicBrainz guidelines
- User-Agent: Required for API requests