Skip to content

Latest commit

 

History

History
82 lines (57 loc) · 2.18 KB

README.md

File metadata and controls

82 lines (57 loc) · 2.18 KB

Music API

Overview

This API is designed to manage a music platform with features similar to those found on services like Spotify or Anghami. It supports user authentication, role-based access control (RBAC), file uploads using Cloudinary, and pagination for efficient data retrieval.

Features

  • Cloudinary for File Uploads: Easily upload and manage images for songs, albums, and artists.
  • RBAC Using JWT Bearer: Secure endpoints with JSON Web Tokens and manage user roles.
  • Pagination: Efficiently handle large datasets with pagination.

Endpoints

01music 02music

Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/yahya-saad/MusicApi.git
    cd music-api
  2. Restore packages

    dotnet restore
  3. Set up the database

    • Update the connection string in appsettings.json to point to your database.
    • Run the migrations to set up the database schema.
      dotnet ef database update
  4. Configure appsetting.json

    • Add your Cloudinary credentials , jwtSettings inside the appsettings.json.
    "CloudinarySettings": {
      "CloudName": "your_cloud_name",
      "ApiKey": "your_api_key",
      "ApiSecret": "your_api_secret"
    }
      "JwtSettings": {
     "SecretKey": "",
     "Issuer": "",
     "Audience": "",
     "ExpirationInMinutes": 30
    }
  5. Run the application

    dotnet run

Usage

Using Postman Collection attatched with repo or [Swagger] to interact with the API endpoints.

Contributing

Contributions are welcome! Please create a pull request or open an issue to discuss changes.

linkedin