Skip to content

About

A full-stack Spotify-inspired music streaming application built with the MERN stack.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽต Spotify Clone

A full-stack Spotify-inspired music streaming web application built using the MERN stack.

The application allows users to browse music, search for songs, play audio using a persistent music player, explore collections, and manage music through a dedicated Content Manager.

Note: This project was created for educational and portfolio purposes. It is inspired by Spotify but is not affiliated with, endorsed by, or connected to Spotify.


๐Ÿ“ธ Preview

Home

Home Page

Music Library & Player

Music Library

Content Manager

Content Manager

Search

Search Page


โœจ Features

  • ๐ŸŽต Stream and play songs directly in the browser
  • โฏ๏ธ Play and pause music
  • โญ๏ธ Navigate between tracks
  • ๐Ÿ”Š Volume control
  • โฑ๏ธ Interactive playback progress bar
  • ๐Ÿ–ผ๏ธ Song cover artwork
  • ๐Ÿ” Search songs by title or artist
  • ๐Ÿ’ฟ Create and browse music collections
  • โฌ†๏ธ Upload songs through the Content Manager
  • ๐Ÿ–ผ๏ธ Upload custom song and collection artwork
  • ๐ŸŽง Persistent music player across application pages
  • ๐Ÿ” User authentication
  • ๐Ÿ‘ค User-specific interface
  • ๐Ÿ“ฑ Responsive Spotify-inspired dark UI
  • โšก Dynamic frontend connected to a REST API
  • โค๏ธ Like and unlike songs
  • ๐Ÿ’š View all favourite songs in a dedicated Liked Songs page

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React
  • Vite
  • JavaScript
  • CSS
  • React Router
  • Axios

Backend

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • JWT Authentication
  • Multer

๐Ÿงฉ Application Pages

๐Ÿ  Home

The home page displays available songs and music collections while providing quick access to playback.

๐Ÿ”Ž Search

Users can search the music library using song titles or artist names.

๐ŸŽ›๏ธ Content Manager

The Content Manager provides an interface for managing music without requiring external API tools.

Users can:

  • Upload an audio file
  • Add song title and artist information
  • Upload cover artwork
  • Create music collections
  • Select existing songs for a collection
  • Upload collection artwork

๐Ÿ’ฟ Collections

Collections group multiple songs together and provide a dedicated view for browsing and playing their tracks.

๐ŸŽง Music Player

The persistent bottom player provides:

  • Play / pause controls
  • Previous / next track controls
  • Playback progress
  • Current playback time
  • Track duration
  • Volume control
  • Current song information and artwork

๐Ÿ“ Project Structure

SPOTIFY_CLONE/
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”œโ”€โ”€ middleware/
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ .env
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ screenshots/
โ”‚   โ”œโ”€โ”€ home.png
โ”‚   โ”œโ”€โ”€ songs.png
โ”‚   โ”œโ”€โ”€ content-manager.png
โ”‚   โ””โ”€โ”€ search.png
โ”‚
โ”œโ”€โ”€ .gitignore
โ””โ”€โ”€ README.md

๐Ÿš€ Getting Started

Prerequisites

Make sure you have installed:

  • Node.js
  • npm
  • MongoDB

1. Clone the repository

git clone <your-repository-url>
cd SPOTIFY_CLONE

2. Install backend dependencies

cd backend
npm install

3. Install frontend dependencies

Open another terminal:

cd frontend
npm install

4. Configure environment variables

Create a .env file inside the backend directory.

Example:

PORT=3000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret

Add any other environment variables required by your backend configuration.

Never commit your real .env file or credentials to GitHub.


5. Start the backend

From the backend directory:

npm run dev

If your backend does not use a dev script, use the start command defined in backend/package.json.


6. Start the frontend

From the frontend directory:

npm run dev

Vite will display the local development URL in the terminal.

Open it in your browser to use the application.


๐ŸŽถ Adding Music

Songs can be added directly through the application's Content Manager.

Provide:

  1. Song title
  2. Artist name
  3. Audio file
  4. Cover image (optional)

After uploading, the song becomes available to the application and can also be added to collections.


๐Ÿ”’ Environment Variables & Security

Sensitive configuration is intentionally excluded from the repository through .gitignore.

The project ignores files such as:

.env
.env.*
node_modules/
dist/
build/
*.log

An .env.example file can be committed to demonstrate the required environment variable names without exposing actual credentials.


โš ๏ธ Media Disclaimer

This repository is intended for educational and portfolio purposes.

The repository should not contain copyrighted commercial music files or other media that the repository owner does not have permission to redistribute.

Demo song titles, artist names, and artwork shown in the project screenshots may use fictional/demo data for presentation purposes.


๐ŸŽฏ Project Goals

This project was built to practice full-stack web development concepts including:

  • Building REST APIs with Express
  • MongoDB database integration
  • React frontend development
  • Authentication and authorization
  • File uploads
  • Audio playback in the browser
  • Global player state management
  • Search functionality
  • Connecting frontend and backend applications
  • Building reusable UI components

๐Ÿ”ฎ Possible Future Improvements

Potential features that could be added in the future include:

  • Playlists for individual users
  • Recently played songs
  • Queue management
  • Shuffle and repeat controls
  • Artist profile pages
  • Improved mobile responsiveness
  • Music recommendations
  • Cloud-based media storage

๐Ÿ‘จโ€๐Ÿ’ป Author

Built as a full-stack web development project.


๐Ÿ“„ License

This project is intended for educational and portfolio use.

About

A full-stack Spotify-inspired music streaming application built with the MERN stack.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages