NEVER expose, display, return, or leak submitted code (leaderboard.code_files) for open/active competitions to non-moderators. This includes API responses, database queries, debug output, logs, and any other channel. Leaking competition submissions would compromise the integrity of the competition and is a catastrophic failure. Always verify that any code path touching submission data enforces proper access control and that only moderators can view other users' submitted code for open competitions.
The hackathons displayed on the /lectures page are defined in:
frontend/src/pages/lectures/Lectures.tsx
Look for the hackathons array around line 87. To add a hackathon:
{
title: "Hackathon Name",
type: "digital", // or "in-person"
startDate: "2025-11-03", // YYYY-MM-DD format
endDate: "2026-02-20",
location: "Online", // or city name for in-person
lumaUrl: "https://lu.ma/xxxxx",
description: "Optional description",
}Only ongoing hackathons are displayed. Past and future hackathons are automatically hidden based on the current date. No cleanup needed - just add new hackathons when they start.
Upcoming lectures are pulled live from Discord's scheduled events API (5-minute cache).
Requires DISCORD_BOT_TOKEN and DISCORD_GUILD_ID environment variables.
The production PostgreSQL database is hosted on Heroku under the discord-cluster-manager app:
- Heroku Dashboard: https://dashboard.heroku.com/apps/discord-cluster-manager
- Connection: Use
heroku pg:psql -a discord-cluster-managerto connect interactively - Credentials: Use
heroku pg:credentials:url -a discord-cluster-managerto get the connection string - Schema: All tables live under the
leaderboardschema (e.g.,leaderboard.runs,leaderboard.submission,leaderboard.leaderboard,leaderboard.user_info,leaderboard.code_files,leaderboard.gpu_type,leaderboard.submission_job_status)
leaderboard.leaderboard- Competition definitions (name, deadline, task JSONB)leaderboard.submission- User submissions linked to code filesleaderboard.runs- Individual run results with scores (lower is better), GPU type, pass/failleaderboard.user_info- User accounts (Discord/Google/GitHub OAuth)leaderboard.gpu_type- GPU types supported per leaderboardleaderboard.code_files- Submitted code with SHA256 hashleaderboard.submission_job_status- Job tracking (pending/running/succeeded/failed/timed_out)
Rankings are computed via SQL window functions:
- Best run per user per GPU type (lowest score wins, must be
passed=true,secret=false,score IS NOT NULL) - Global rank via
RANK() OVER (PARTITION BY leaderboard_id, runner ORDER BY score ASC) - GPU priority order: B200 > H100 > MI300 > A100 > L4 > T4
CI enforces linting for both Python and the frontend. PRs will fail if either linter reports errors.
Python (Ruff):
- Check:
ruff check kernelboard/ tests/ - Auto-fix:
ruff check --fix kernelboard/ tests/ - Config:
pyproject.tomlunder[tool.ruff]
Frontend (ESLint):
- Check:
cd frontend && npm run lint - Auto-fix:
cd frontend && npm run lint -- --fix
kernelboard/- Flask backendfrontend/- React frontend (Vite + TypeScript + MUI)kernelboard/api/events.py- Discord events API integration