a live, fully static task leaderboard for the mvths robotics shop. completed tasks are tracked in a google sheet, scored on the fly, and displayed in real time. the whole thing runs in the browser — it fetches the published csv, computes all points client-side, and re-polls every 5 seconds with zero backend.
what it does
- live leaderboard — ranks students by total points or by number of completed tasks
- time & grade filters — view 24h, 5d, 30d, or all time, filter by grade (10, 11, 12), and search by name
- task breakdowns — expand any row to see every completed task, dates, base points, grade bonus, and weighted points
- shop tasks board — a separate
/tasks/page lists all tasks, lets people claim unclaimed tasks, mark claimed ones done, and reclaim tasks that have sat idle for more than 5 school days - automatic updates — polls the sheet every 5 seconds, so scores refresh almost instantly after edits
- mobile friendly — responsive layout with tap-to-expand for details
how scoring works
points are taken straight from the "Points" column of the sheet. if a task has multiple assignees, those points are divided evenly between everyone listed and rounded to the nearest 0.5 (ties round up). then a grade bonus is added: +0.2 for sophomores (gr 10), +0.1 for juniors (gr 11), +0.0 for seniors (gr 12).
the app tracks school days for the reclaim timer (skipping weekends) and respects an EXCLUDED_DAYS list for holidays/breaks in src/js/scoring.js.
tech stack
- vanilla js + css — no build step, no dependencies
- google sheets — data comes from a published csv export
- google apps script web app — handles claim/done/reclaim writes since the published sheet is read-only (deployed with execute as me and anyone access)
- client-side polling — 5s refresh for live, no backend/server required
implementation notes
- scoring engine (
src/js/scoring.js) parses csvs, normalizes names, splits multiple assignees, computes per-task shares + bonuses, builds leaderboards, and lists all tasks for the tasks page - leaderboard ui (
src/js/app.js) renders rankings with range/grade/sort/search, expandable task breakdowns, and live status - task board (
src/js/tasks.js) lists active/completed tasks, confirms actions by re-reading the sheet after posting to the apps script (works with no-cors posts), and shows reclaim hints when a task's been claimed for >5 school days - apps script backend (
apps-script/Code.gs) finds the correct row, sets Name/Start Date/End Date atomically with a lock, and responds with json
live demo & source
live at destabilized.github.io/task-leaderboard (or leaderboard.andrewhuang.cc via CNAME). source on github.