Jump to content

User:Valcio/Sandbox

From Wikitech
Toolforge tools
ArbCom Tools
Website toolforge:arbcom
Description Suite of tools for local arbitration committees.
Author(s) valcio
Maintainer(s) valcio (View all)
License GNU General Public License 3.0 or later

ArbCom Tools is a suite of tools designed specifically for local arbitration committees.

The following Arbitration Committees (ArbComs) are currently using this tool:

If you wish to enable support for your ArbCom, please feel free to reach out to the maintainers.

User guide

User:Valcio/Sandbox/Users

Developer Guide

This guide provides step-by-step instructions for setting up and running the ArbCom Tools on your local machine.

Prerequisites

Before you begin, ensure that you have the following installed on your machine:

  • Git
  • Node.js
  • A database server (this can be on your localhost)
  • A Wikimedia OAuth consumer (instructions)

Setup Instructions

Step 1: Clone the Repository

First, clone the repository to your local machine using Git. You can do this by running the following command in your terminal:

git clone <repository_url>

Step 2: Install Dependencies

Next, navigate to the project directory and install the necessary npm package dependencies by running:

npm install

Step 3: Set Up Environment Variables

Create a `.env` file in the root of your project directory. This file will hold all your environment variables. Be sure to replace the values with your actual data.

export MEDIAWIKI_CONSUMER_KEY="OAuth Consumer Key"
export MEDIAWIKI_CONSUMER_SECRET="OAuth Consumer Secret"
export MEDIAWIKI_CALLBACK_URL="http://localhost:3003/api/login/callback"

export DB_PASSWORD=""
export DB_NAME="s55827"
export DB_USER="root"
export DB_HOST="127.0.0.1"

Step 4: Start the Database

Start your database server. If it's on your localhost, it should start automatically.

Step 5: Run Maintenance Scripts

Finally, run the maintenance scripts using Node.js. You can do this by running the following command in your terminal:

Setup Encryption
node maintenance/setup-encryption.js

This script will automatically configure the .env file, adding an encryption key and salt:

export DB_ENCRYPTION_KEY="My Random Key"
export DB_ENCRYPTION_SALT="My Random Salt"
New ArbCom
node maintenance/new-arbcom.js

This script will guide you into setting up end enabling a new ArbCom.

Update Members
node maintenance/update-arbcom.js

This script will update the members of an ArbCom.

node maintenance/link-user.js

This script will guide you into setting up the proper settings to access mediawiki on a service user's behalf. Make sure to run maintenance/setup-encryption.js prior to this; if encryption is reset, the user has to be linked again.

Step 6: Start the tool

Now, just run:

npm run start

And that's it! You have successfully set up and run the ArbCom Tools on your local machine. If you encounter any issues, feel free to reach out to the maintainers.