A modern music player application that integrates with Dropbox for cloud storage access.
- 🎵 Play music from your Dropbox account
- 📱 Responsive design for all devices
- 🎨 Modern UI with dark mode support
- 🔄 Real-time playback controls
- 📁 File browser with folder navigation
- 🔐 Secure Dropbox authentication
- Node.js 18.0 or later
- npm or yarn
- A Dropbox account
- A Dropbox App (created through the Dropbox Developer Console)
-
Clone the repository:
git clone <repository-url> cd music-player
-
Install dependencies:
npm install # or yarn install -
Create a
.env.localfile in the root directory and add your Dropbox app key:NEXT_PUBLIC_DROPBOX_APP_KEY=your_dropbox_app_key_here -
Configure your Dropbox App:
- Go to the Dropbox Developer Console
- Create a new app with the following settings:
- Choose "Scoped access"
- Select "App folder" access
- Enable the following permissions:
files.content.read
- Set the redirect URI to:
http://localhost:3000 - Enable "No expiration" for access tokens
-
Start the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser
For the application to display and play your music, you need to:
-
Create a folder named
musicin your Dropbox app folder:- After setting up your Dropbox app, a dedicated folder will be created in your Dropbox account named after your app
- Inside this app folder, create a new folder called
music
-
Add your music files to this folder:
- Supported formats: MP3, FLAC, WAV
- For best results, name your files as
Artist - Title.mp3(the application will extract artist and title information from the filename) - You can organize your music into subfolders if needed
-
After adding music, refresh the application:
- The music player will scan your
/musicfolder and display all compatible audio files - If you add new music files while the application is running, you'll need to refresh the page to see them
- The music player will scan your
Note: If no music is found, you'll see a message prompting you to add music to your Dropbox music folder.
music-player/
├── app/
│ ├── layout.tsx # Root layout with authentication
│ ├── metadata.ts # Next.js metadata configuration
│ ├── page.tsx # Home page
│ ├── login/
│ │ └── page.tsx # Login page
│ └── globals.css # Global styles
├── components/
│ ├── layout/
│ │ └── Sidebar.tsx # Responsive sidebar
│ └── player/
│ └── PlayerControls.tsx # Music player controls
├── lib/
│ ├── context/
│ │ └── PlayerContext.tsx # Audio player context
│ ├── services/
│ │ └── dropboxService.ts # Dropbox API integration
│ └── types.ts # TypeScript interfaces
└── public/ # Static assets
- User visits the application
- If not authenticated, redirected to login page
- User authorizes with Dropbox
- Access token is stored securely
- User can access their music files
- Play/Pause control
- Next/Previous track navigation
- Volume control
- Progress bar with seek functionality
- Playlist management
- Current track information display
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Follow these steps to deploy the application on Netlify:
- Fork or clone this repository to your GitHub account
- Log in to Netlify
- Click on "New site from Git"
- Select GitHub as your provider
- Choose the repository you created
- Configure build settings:
- Build command:
npm run build - Publish directory:
.next
- Build command:
- Add environment variables:
- Add
NEXT_PUBLIC_DROPBOX_APP_KEYwith your Dropbox app key
- Add
- Click "Deploy site"
The repository includes a netlify.toml file with the necessary configuration for Next.js deployment. Make sure your Dropbox app is configured to allow your Netlify domain in the redirect URIs.
This project is licensed under the MIT License - see the LICENSE file for details.