A full-stack application for managing and monitoring CuratorBot jobs.
The Curator Application consists of:
- Backend: A FastAPI-based service that provides an interface to the Wikimedia Toolforge API
- Frontend: A Vue.js application with TypeScript and PrimeVue for displaying and managing Toolforge jobs
This application is designed to work within the Wikimedia ecosystem, particularly for tools that need to interact with the Toolforge infrastructure programmatically.
toolforge build start -i web https://github.com/DaxServer/wikibots-curator-backend.git -L-L flag uses the latest buildpacks and base image, required for Poetry.
Use toolforge envvars to set them up. The OAuth1 application is at OAuth applications - Wikimedia Meta-Wiki.
X_USERNAME
CURATOR_OAUTH1_KEY
CURATOR_OAUTH1_SECRET
SECRET_KEY
TOKEN_ENCRYPTION_KEYTOKEN_ENCRYPTION_KEY is used to encrypt the access tokens using Fernet key, which is a 32 url-safe base64-encoded byte string. Generate a new key using:
openssl rand -base64 32When deploying for the first time, use:
toolforge webservice buildservice start --buildservice-image tool-curator/web:latest --mount allFor subsequent deployments, use:
toolforge webservice restartAfter building the web image, run the Celery worker:
toolforge jobs run --image tool-curator/web:latest --emails all --continuous --filelog --mount all --command "worker" workerThis project is the Backend application.
- Python 3.13 or higher
- Poetry (for dependency management)
Install backend dependencies:
poetry installStart the FastAPI server:
X_USERNAME=DaxServer CURATOR_OAUTH1_KEY=abc123 CURATOR_OAUTH1_SECRET=abc123 TOKEN_ENCRYPTION_KEY=abc123 poetry run webThe backend server will be available at http://localhost:8000. The OAuth1 application is at OAuth applications - Wikimedia Meta-Wiki.
Build the frontend for production:
pack build -B tools-harbor.wmcloud.org/toolforge/heroku-builder:24_0.20.7 curator-webTo run the tests, use the following command:
poetry run pytestFor verbose output:
poetry run pytest -vThis project uses Black for code formatting. Run Black before committing your changes:
poetry run black .