Skip to content

A web music player where you can listen & add your favorite songs to your customized playlists.

License

Notifications You must be signed in to change notification settings

devkarim/spotify-clone

Repository files navigation

Spotify Clone

Overview

A web music player where you can listen & add your favorite songs to your customized playlists. This web application is a clone of Spotify so the information generated is not genuine. This application is not intended for commercial use.

Visit the website from here.

This project is inspired by this video ❤️

To test payment, use stripe's test cards or credit card 4242424242424242 for short.

Features

  • Authentication using either GitHub or email & password using NextAuth.js
  • Sidebar & navbar navigation
  • Create, edit, and delete playlists
  • Upload images to your playlists using Cloudinary
  • Upload songs to your playlists using Cloudinary
  • Edit songs information (title, artist, album, and image)
  • Delete songs from your playlists
  • Search for songs, artists, and albums
  • View your recently played songs & playlists
  • Play songs, pause, skip, and go back via a global web music player using useAudioPlayer
  • Premium monthly subscription using Stripe
  • Saving music player state using Zustand
  • Server-side & client-side validation using Zod & react-hook-form

Technologies

Prerequisites

- Node v20.5.1

Cloning this repo

Clone the repo and navigate to it:

  • git clone https://github.com/devkarim/spotify-clone.git
  • cd spotify-clone

Install required packages

Use one of the following commands to install the packages:

  • npm i
  • yarn
  • pnpm i

Setup .env file

These environment variables are required for the app to work:

DATABASE_URL=
SHADOW_DATABASE_URL=

NEXTAUTH_SECRET=
NEXTAUTH_URL=

GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=

NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PREMIUM_PLAN_ID=

You can check .env.example for more information.

Push changes to database and generate PrismaClient

Use this to push and generate PrismaClient:

npx prisma db push

Start development server

Use one of the following commands to start the development server:

  • npm run dev
  • yarn dev
  • pnpm dev

Author

This project is made by @devkarim.

License

This project is licensed under the MIT License - feel free to explore, modify, and share.

About

A web music player where you can listen & add your favorite songs to your customized playlists.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages