Backend for grudgeplatform.com, powering PvP games, Discord integration, Gruda chain, and GBuX currency.
- Clone:
git clone https://github.com/GrudgeDaDev/gruda.git - Install:
npm install parse dotenv - Configure: Copy
.env.exampleto.env, add keys (see Environment Variables). - Test Database: Run
node test-back4app.js(see Test Script). - Deploy Cloud Code: Upload
cloud/main.jsin Back4app (see Cloud Code). - Create Images Directory: Create a directory named
imagesin the root of the project. - Install Grunt:
npm install grunt grunt-cli --save-dev - Launch App: Follow the instructions below to launch the app and log in with OAuth.
The following environment variables are required and should be added to the .env file:
PARSE_APP_IDPARSE_CLIENT_KEYPARSE_JAVASCRIPT_KEYPARSE_SERVER_URLDISCORD_CLIENT_IDDISCORD_CLIENT_SECRETDISCORD_GUILD_IDDISCORD_WEBHOOK_URLDISCORD_GBUX_WEBHOOK_URLDISCORD_REDIRECT_URISUPABASE_URLSUPABASE_KEY
The test script test-back4app.js uses dotenv to load environment variables and parse to connect to the Parse server.
The cloud code in cloud/main.js implements the following features:
- Parse SDK for web pages like
/launcher,/card-minter. - Discord webhooks for notifications.
- Future NFT/GBuX integration.
- New Parse Cloud function to fetch data for Season0.
- Web: Use Parse SDK for pages like
/launcher,/card-minter. - Discord: Webhooks for notifications.
- Gruda: Future NFT/GBuX integration.
- Season0: Explore the events and stories of Season0.
- Start the app:
npm start - Open your browser and navigate to
https://www.grudgeplatform.com/login - Log in with your Discord account.
- After logging in, you will be redirected to
https://www.grudgeplatform.com/card-minter. - You can now open and buy cards, with an active database and ways to earn GBuX.
To build the project, run the following command:
npm run build
This will use Grunt to minify JavaScript and CSS files.
To run the app, use the following command:
npm start
This will start the server and serve the static files from the public directory.
The app provides the following routes:
/card-minter: Access the card minter page./nexus: Access the nexus page./season0: Access the Season0 page./index: Access the index page.
To deploy the app to Netlify, use the following command:
npm run deploy
This will deploy the contents of the public directory to Netlify.