Skip to content

Developer Setup Guide

This guide will help you set up a local development environment for the Community Signal Moderation Bot.

  • Node.js (v18 or higher)
  • Docker and Docker Compose
  • pnpm
Terminal window
git clone https://github.com/your-username/Community-Signal-Moderation-Bot.git
cd Community-Signal-Moderation-Bot

Install the project dependencies using pnpm:

Terminal window
pnpm install

The bot requires a PostgreSQL database and a Redis cache. You can start these services using Docker Compose:

Terminal window
docker compose up -d postgres redis

Copy the .env.example file to .env:

Terminal window
cp .env.example .env

Now, open the .env file and fill in the required environment variables. For local development, you will need to set the following variables:

  • DATABASE_URL
  • REDIS_URL
  • BOT_NUMBER
  • SIGNAL_CLI_CONFIG_PATH

You can run the bot in development mode using the following command:

Terminal window
pnpm dev

This will start the bot and automatically restart it when you make changes to the code.

To run the tests, use the following command:

Terminal window
pnpm test