Skip to main content

Installation

Prerequisites

  • Python 3.12+ — Required (the codebase uses modern Python syntax such as type X = Y and list[str] | None unions).
  • uv — Python package manager used for dependency management.
  • Node.js 20+ — Only needed if you plan to build the PWA frontend.

Setup

1. Clone the repository

git clone https://github.com/your-org/iema-bot.git
cd iema-bot

2. Configure environment variables

cp .env.example .env

Edit .env and set at minimum:

  • API_KEY — a secret key for authenticating HTTP API requests

See the Configuration page for a full reference of all environment variables. Channel-specific variables (Telegram token, VAPID keys, etc.) are covered in the channel setup guides below.

3. Install Python dependencies

uv sync --extra dev

This installs all runtime and development dependencies (including test tools).

Set Up Your Channel

Continue with the setup guide for your chosen frontend (or both):

  • Telegram Setup — Create a Telegram bot, configure it, and enroll your first participant.
  • Web App Setup — Build the PWA, configure push notifications, and register your first participant.

Running Tests

uv run python -m pytest tests/ -v --asyncio-mode=auto

Run a single test file:

uv run python -m pytest tests/test_branching.py -v --asyncio-mode=auto

Run a specific test:

uv run python -m pytest tests/test_branching.py::test_name -v --asyncio-mode=auto