A full-stack application for managing CuratorBot jobs that upload media to Wikimedia Commons.
The Curator Application consists of:
- Backend: A FastAPI service with a REST API and WebSocket endpoint. Celery workers handle background upload tasks.
- Frontend: A Vue.js application with TypeScript and PrimeVue for managing uploads and monitoring job status.
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
X_API_KEY
CURATOR_OAUTH1_KEY
CURATOR_OAUTH1_SECRET
SESSION_SECRET_KEY
TOKEN_ENCRYPTION_KEY
MAPILLARY_API_TOKEN
WCQS_OAUTH_TOKENSESSION_SECRET_KEY signs cookie sessions. Rotating it invalidates all active user sessions. Generate with:
openssl rand -hex 32TOKEN_ENCRYPTION_KEY encrypts OAuth access tokens stored in the database using Fernet. Must be a valid Fernet key — generate with:
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"When deploying for the first time, use:
toolforge webservice buildservice start --buildservice-image tool-curator/web:latest --mount allFor subsequent deployments:
toolforge webservice restartAfter building the web image, run the worker process:
toolforge jobs run --image tool-curator/web:latest --emails all --continuous --filelog --mount all --command "worker" worker- Python 3.13 or higher
- Poetry (for dependency management)
poetry installX_USERNAME=DaxServer X_API_KEY=test CURATOR_OAUTH1_KEY=abc123 CURATOR_OAUTH1_SECRET=abc123 SESSION_SECRET_KEY=dev-secret TOKEN_ENCRYPTION_KEY=$(python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())") poetry run webThe backend server will be available at http://localhost:8000.
poetry run pytest -qpoetry run isort . && poetry run ruff format && poetry run ruff checkpoetry run ty check