A premium, modern music player application built with Next.js. It functions flawlessly as a responsive web app, an installable Progressive Web App (PWA), and a fully native Android application using Capacitor.
- Cross-Platform: Works on desktop browsers, mobile browsers (as a PWA), and natively on Android.
- Premium UI/UX: Glassmorphism design, fluid animations, and beautiful dynamic layouts.
- Responsive Design: Dedicated views for desktop (
DesktopPlayer) and mobile (MobilePlayer). - Cloudinary Integration: Automatically fetches music tracks securely from a connected Cloudinary account.
- Media Session Support: Playback can be controlled via the OS lock screen, notification shade, or connected Bluetooth devices.
To run the web application locally:
- Install dependencies:
npm install
- Set up your environment variables:
Create a
.envfile in the root and add your Cloudinary credentials:CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret
- Run the development server:
npm run dev
- Open http://localhost:3000 in your browser.
Note on PWA: The PWA capabilities (Service Worker, caching) are enabled automatically in production builds (
npm run build && npm start) and disabled during local development to avoid caching issues.
We have wrapped the Next.js application using Capacitor to compile it into a native Android APK.
- Java 17 installed (
openjdk-17-jdk). - Android SDK and Command Line Tools installed (usually in
~/Android/Sdk).
If you make changes to the Next.js codebase (UI updates, new features) and want to update the Android APK:
-
Run the custom Android build script:
npm run build:android
This command exports your Next.js app as a static HTML site, prepares the API routes for offline usage, and syncs the changes to the native
androiddirectory. -
Compile the Android APK:
export ANDROID_HOME="$HOME/Android/Sdk" export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools" cd android ./gradlew assembleDebug
-
Locate your generated APK: The compiled APK will be found at:
android/app/build/outputs/apk/debug/app-debug.apk
The application is fully compatible with Vercel for seamless cloud deployment.
Because we decoupled the Capacitor static-export configuration from the standard Next.js config, pushing your code to GitHub will automatically trigger a flawless Vercel build! The Vercel deployment ignores the Android build tools and runs the app using full SSR/API capabilities.
Just push your changes to the main branch to update your live Web App / PWA!
The app icons are synchronized across the Web PWA and the Android app.
- Replace the master logo at
public/asset/logo.png. - Generate the new Android icons by running:
npx capacitor-assets generate --android
- Rebuild the Android app (
npm run build:android).