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.
- 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.
-
Clone the repository
git clone https://github.com/yahya-saad/MusicApi.git cd music-api
-
Restore packages
dotnet restore
-
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
- Update the connection string in
-
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 }
- Add your Cloudinary credentials , jwtSettings inside the
-
Run the application
dotnet run
Using Postman Collection attatched with repo or [Swagger] to interact with the API endpoints.
Contributions are welcome! Please create a pull request or open an issue to discuss changes.