🎵 Your best rhythm starts from here ...
A music streaming platform back-end API, powered by Node.JS and Microsoft 365.
A carefully crafted all-in-one music streaming solution for individuals or organisations to upload, manage, stream music in a cost-effective way, but still be able to enjoy functionalities that are comparable to commercial platforms.
More to come...
- User authentication via Microsoft 365 OAuth
- Manage music based on artists, albums and tracks
- Create, add tracks to, and share your playlists
- Serve music content in byte chunks to improve user experience
- Automatically transcode and encrypt music content upon uploads
- Automatically fetch album cover arts and descriptions from external API
- Use OneDrive Business as the storage solution for static contents
- Secure transmission of copyrighted music content against leaks
More to come...
- A computing device that is capable of running Node.JS runtime environment
- A domain name with corresponding SSL certificate configured
- A relational database (preferably PostgreSQL) with appropriate access detail ready
- A Redis database with appropriate access detail ready
- An Azure Active Directory ADMIN (or global admin) account and configure it as follows:
- Create a new App Registration and configure the Redirect URI (choose "Web" for platform) as https://URL_TO_YOUR_BACKEND/auth/callback
- Go to "Certificates & secrets" section, add a new "Client secret" with desired expiry length
- Copy the value of the created secret and paste to a text file
- Go to "API permissions" section, add following permissions:
- Microsoft Graph --> Delegated permissions --> OpenId permissions --> email & profile
- Microsoft Graph --> Application permissions --> Files --> Files.ReadWrite.All
- Microsoft Graph --> Application permissions --> User --> User.Read.All
- Click "Grant admin consent for ..." and confirm
- A compatible front-end web user interface (official front-end SPA will be released soon)
- (Optional, for fetching album cover arts) A valid Last.FM API key, acquired from Last.FM developer portal
- Clone this repository
- Run following commands to install dependencies:
$ cd brhythm $ npm ci
- Use your preferred text editor to fill in all the required configurations in
.env.sample
file - Rename
.env.sample
file to.env
- Make sure you have properly configured firewalls and/or security groups so that inbound traffic is not dropped
- Start the Node.JS instance by invoking:
# Option 1: Not recommended $ npm start # Option 2: Preferred (if pm2 module is installed) $ pm2 start --name brhythm-api ./bin/www ## Run the instance automatically after server reboots $ pm2 startup $ pm2 save
- Ready to go ~
More to come...
- Register an application with the Microsoft identity platform
- PM2 - Quick Start
- Getting Started | Sequelize
- FFmpeg Formats Documentation - 4.17 hls
- HTTP Live Streaming (HLS) Authoring Specification
- Microsoft Graph REST API v1.0 endpoint reference
- OpenID Connect on the Microsoft identity platform
- AES-128 media encryption provisioned
- User profile details retrieval route added
- Data models modified for better compatibility
Omitted, refer to Commits History for more info
If you believe you have found any bug or security vulnerability, feel free to open an issue. Pull requests are also welcomed.
Connaught (Bread-John)
Copyright © 2022 Bread-John. All Rights Reserved. Licensed under Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.0) (see "License" for more detail)