Skip to content

ShubhamNagure/spotify_clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Spotify Clone

A Django REST Framework application that mimics the basic functionalities of Spotify, including managing tracks, playlists, and user authentication.

Table of Contents

Features

  • User Authentication (Register, Login, Logout)
  • CRUD operations for Tracks and Playlists
  • Add/Remove Tracks from Playlists
  • List Playlists and Tracks

Requirements

  • Python 3.x
  • Django 3.x or later
  • Django REST Framework
  • PostgreSQL (or any other preferred database)

Installation

  1. Clone the repository:

    git clone https://github.com/ShubhamNagure/spotify_clone.git
    cd spotify_clone
  2. Create and activate a virtual environment:

    python -m venv env
    source env/bin/activate  # On Windows use `env\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Set up the database:

    • Configure your database settings in spotify_clone/settings.py.
    • Apply migrations:
    python manage.py migrate
  5. Create a superuser:

    python manage.py createsuperuser
  6. Run the development server:

    python manage.py runserver

Usage

  • Access the API at http://127.0.0.1:8000/api/.
  • Use the Django admin interface at http://127.0.0.1:8000/admin/ to manage users, tracks, and playlists.

API Endpoints

Authentication

  • Register: POST /api/auth/register/
  • Login: POST /api/auth/login/
  • Logout: POST /api/auth/logout/

Tracks

  • List Tracks: GET /api/tracks/
  • Create Track: POST /api/tracks/
  • Retrieve Track: GET /api/tracks/{id}/
  • Update Track: PUT /api/tracks/{id}/
  • Delete Track: DELETE /api/tracks/{id}/

Playlists

  • List Playlists: GET /api/playlists/
  • Create Playlist: POST /api/playlists/
  • Retrieve Playlist: GET /api/playlists/{id}/
  • Update Playlist: PUT /api/playlists/{id}/
  • Delete Playlist: DELETE /api/playlists/{id}/
  • Add Track to Playlist: POST /api/playlists/{id}/add_track/
  • Remove Track from Playlist: POST /api/playlists/{id}/remove_track/

Running Tests

To run the tests, execute:

python manage.py test

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch.
  3. Make your changes.
  4. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages