Skip to content

Development

Zachary Le edited this page Oct 12, 2026 · 1 revision

Development

Run it locally

uv venv -p 3.12 .venv && uv pip install --python .venv/bin/python -r requirements-dev.txt
.venv/bin/python -m pytest -q
NYERK_WEB_ONLY=1 ADMIN_PASSWORD=devpassword .venv/bin/python -m nyerk   # web page without Discord

Screenshots

Screenshots in docs/images come from tools/screenshots.py: it builds a demo database (fake members and IDs, fixed clock), renders the Discord channels from Nyerk's real message code and photographs the web pages with Playwright. The Screenshots workflow runs it after each change on main and opens a pull request when an image changes. To run it locally:

uv pip install --python .venv/bin/python -r requirements-screenshots.txt
.venv/bin/python -m playwright install chromium
.venv/bin/python -m tools.screenshots docs/images

What's where

Path Purpose
nyerk/schedules.py Schedule types (hourly, daily, every N hours, weekly, monthly, one-off, kill-reported). Each type answers "next occurrence after T". To add a type, subclass ScheduleType and decorate it with @register; the admin form builds itself from fields.
nyerk/engine.py Due alerts, skip-after-downtime, message templates, dashboard text, cleanup. Has no Discord code.
nyerk/timers.py World boss reports, edits, cancels, overrides and limit rules.
nyerk/bot.py Discord side of timers and roles: 30 s scheduler, dashboard and its buttons, the /nyerk commands, the roles channel, quiet hours, #logs.
nyerk/party.py / nyerk/party_bot.py Party finder rules (classes, gear score, slots, registrations, pings) and its Discord panels, buttons and forms.
nyerk/reaction_roles.py Builds the roles channel's role messages and emoji numbering.
nyerk/quiet.py Quiet hours: when to pause and restore dungeon ping roles.
nyerk/members.py / nyerk/tracking.py The Members page, and the record of class and ping roles Nyerk has handed out.
nyerk/stats.py Numbers for the Stats page.
nyerk/transfer.py / nyerk/history.py Settings export and import; change history with restore.
nyerk/safety.py The link/invite filter and the @everyone guard.
nyerk/shugo.py shugo.gg table parser and the review diff.
nyerk/housekeeping.py Nightly backup, daily shugo.gg check, self-signed certificate.
nyerk/web/ The web page (FastAPI, server-rendered); auth.py decides who may do what, security.py handles rate limits, headers and Cloudflare client IPs.
data/ nyerk.db, backups/, logs/nyerk.log, tls/.

Clone this wiki locally