⚙️Web Usage
MelodyMine Web Developer mode
Running MelodyMine on localhost for developing parts of the website.
Before you start, you need a MySQL database.
You can use XAMPP to install MySQL. Download and install XAMPP from the link below, then create a database for your server after installation.
You also need to have Node.js installed on your system. If it's not installed, download and install Node.js.
Step 1: Download Repository
Download the MelodyMine repository from GitHub.
https://github.com/Vallerian/MelodyMine
Step 2: Create .env file for WebSocket Server
.env file for WebSocket ServerNavigate to the web/server directory and create a file named .env with the following values.
DATABASE_URL="mysql://root:@localhost:3306/melody"
PORT=4000
WEBSOCKET_PLUGIN_AUTH_KEY=random
WEBSOCKET_WEB_AUTH_KEY=randomPlease note that the WEBSOCKET_PLUGIN_AUTH_KEY must match the plugin_key in the plugin's settings.yml file.
and also, the WEBSOCKET_WEB_AUTH_KEY must match the WEBSOCKET_KEY in the client's .env file.
Step 3: Install Dependency, Prisma and Run WebSocket Server
Open a terminal in the web/server directory and run the following command.
npm i
npx prisma generate
npm run startStep 4: Create .env file for Client
.env file for ClientNavigate to the web/client directory and create a file named .env with the following values.
DATABASE_URL=mysql://root:@localhost:3306/melody
NEXTAUTH_SECRET=random
NEXTAUTH_URL=http://localhost:3000
WEBSOCKET_KEY=random
WEBSOCKET_URL=ws://localhost:4000
TURN_URL=turn:melodymine.taher7.ir:3477
TURN_USERNAME=melodymine
TURN_PASSWORD=melodyminePlease note that the WEBSOCKET_KEY in the server's .env file must match the WEBSOCKET_WEB_AUTH_KEY.
Step 5: Install Dependency, Prisma and Run Client
Open a terminal in the web/client directory and run the following command.
npm i
npx prisma generate
npm run devIf you don't want to use Next.js in developer mode, instead of running
npm run devuse
npm run build
npm startStep 6: Download and Install Plugin
Download the latest version of the MelodyMine plugin from the following link and place it in the plugins folder of your server.
https://github.com/Vallerian/MelodyMine/releases
Step 7: Configure mysql.yml file
mysql.yml fileRestart the server to generate the plugin files. After the files are created, navigate to the server/plugins/MelodyMine directory,
open the mysql.yml file, and enter your database details.
Step 8: Configure settings.yml file
settings.yml fileNavigate to the server/plugins/MelodyMine directory and open the settings.yml file.
Set the plugin_key value to exactly the same value you set in the server's .env file for WEBSOCKET_PLUGIN_AUTH_KEY:
WEBSOCKET_PLUGIN_AUTH_KEY=plugin_keyStep 9: Test MelodyMine in Server
Restart the server to apply the changes. After the server restarts, enter the server and run the command /melodymine start link.
After receiving the link, click on it to enter the voice chat.
Last updated