This Spotify Clone web app was built with Next.JS, TypeScript, Node.JS, and Prisma. It includes user/email authentication, home page, playlists, and music player with shuffle, repeat, play, current duration, and seek bar. This project takes advantage of different Next.js features like API routes protection by using a middleware edge function that checks users token, custom hooks with SWR to fetch user and playlists data, server side rendering to load playlists by exporting the getServerSideProps function, manages the music player state with the Easy Peasy library and synchronizes its UI updates using the requestAnimationFrame method.
The live site can be found here.
Note: The user email/pass to access the app is user@test.com/password. As the database is deployed at Heroku Free Tier it needs some minutes to awake and reload after the first authentication intent.
Frontend: React.JS,Next.js, TypeScript, Chakra UI, React Howler, React Material Design Icons
Backend: Node.JS
Authentication: BCrypt and JWT
API/Database: Prisma and PostgreSQL
Deployment: Vercel and Heroku
To run this project locally:
- Clone this repository
- Yarn install
- Run
npx prisma migrate dev
- Go to Heroku and create a new project
- Create 2 databases within that project
- Create an
env
file:
DATABASE_URL="URL1"
SHADOW_DATABASE_URL="URL2"
- Run
yarn dev
to start the project - Go to
localhost:3000
to view the project - Login with
user@test.com/password