This is a Spotify clone built with NextJS using Tailwind CSS for styling, NextJS Middleware for server-side authentication, NextAuth for client-side authentication, and the Spotify API for data retrieval.
Follow the below instructions to get the project up and running on your local machine for development and testing purposes..
- Node.js (version 10 or higher)
- Spotify Developer Account (to obtain
CLIENT_ID
andCLIENT_SECRET
)
- Clone the repository:
git clone https://github.com/<your-github-username>/spotify-clone-nextjs.git
- Change to the project directory:
cd spotify-clone-nextjs
- Install dependencies:
npm install
- Create an
.env.local
file in the root of the project with the following contents:
CLIENT_ID=<your-client-id>
CLIENT_SECRET=<your-client-secret>
- Launch the development build
npm run dev
This Spotify clone includes the following features:
- Server-side authentication using NextJS Middleware and OAuth2
- Client-side authentication using NextAuth to manage tokens and user information
- Search for songs, albums, and artists
- Display album and artist details, including track listings and related artists
- Play preview audio of tracks
- Responsive design using Tailwind CSS
- NextJS - React framework for server-side rendering and static websites
- Tailwind CSS - CSS utility framework for styling
- NextJS Middleware - Middleware for NextJS serverless functions
- NextAuth - Authentication library for NextJS
- Spotify API - API for retrieving Spotify data
- Spotify Clone with React JS - Original project idea by Tech With Tim
- Blog post on NextAuth.js and Spotify - Article on using NextAuth.js with Spotify authentication
This project is licensed under the MIT License - see the LICENSE.md file for details.