BeyondMafia / BeyondMafia-Integration

BeyondMafia Integration with EpicMafia.org
Other
14 stars 38 forks source link

BeyondMafia

This is the source code powering BeyondMafia.com, a website built to fill the shoes of EpicMafia.com. Contributions are welcome from anyone.

Contributing

  1. Fork the repository
  2. Make your changes to your forked repository
  3. Open a pull request to remote origin/master
  4. If approved and merged, test your changes on the test server
  5. Perform a final test on the main site after merge into master

Running the site locally

If you are a beginner, please follow this beginner guide and ask in Discord if you are stuck at any step.

Prerequisites

  1. Install node.js, and set the version to v14.15.1.

  2. Install MongoDB and Redis and run them as services. If using Windows, install Memurai instead of Redis. You can refer to this guide for setting up MongoDB and Redis via docker.

  3. Clone your forked repository. Replace "r3ndd" with your github username.

git clone https://github.com/r3ndd/BeyondMafia-Integration.git

Install node modules

  1. Install pm2 globally.

    npm i -g pm2
  2. Install backend node modules.

    cd BeyondMafia-Integration 
    npm install
  3. Install frontend node modules.

    cd react_main
    npm install

Setup environment variables

  1. Create .env file for the server under BeyondMafia-Integration/.env, and copy this example file

  2. Create a .env file for the React app under BeyondMafia-Integration/react_main/.env and copy this example file

  3. Refer to this guide for retrieving your own test API keys for Firebase and reCAPTCHA.

Start the site

  1. Start the backend server

    cd BeyondMafia-Integration 
    npm start
  2. Start the frontend React app

    cd react_main
    npm start

Role and game creation