A Hugo-based static website for displaying student performance leaderboards for Embedded and Multicore Systems Programming exercises.
- Overview
- Features
- Installation
- Configuration
- Creating Exercises
- MCPGrader Integration
- Leaderboard Data Format
- Leaderboard Metrics
- Site Structure
- Troubleshooting
- License
MCPLeaderboard is a static website generator built with Hugo that displays student performance on programming exercises. It automatically generates leaderboards from grading results, organizing exercises by technology (CUDA, MPI, OpenMP, etc.).
The system:
- Receives grading results from MCPGrader
- Organizes exercises by parallel programming technology
- Displays student rankings based on performance metrics
- Provides a clean, responsive interface for viewing results
- Automated Leaderboard Generation: Displays rankings from MCPGrader JSON output
- Technology-Based Organization: Groups exercises by CUDA, MPI, OpenMP
- Exercise Templates: Standardized archetype for consistent exercise pages
- Responsive Design: Mobile-friendly interface built with Tailwind CSS
- Performance Metrics: Runtime-based rankings with average execution times
- Easy Content Management: Markdown-based content with Hugo
- Static Site: Fast, deployable anywhere (GitHub Pages, Netlify, etc.)
-
Clone this repository:
git clone https://github.com/your-org/MCPLeaderboard.git cd MCPLeaderboard -
Install Hugo (extended version recommended):
# macOS brew install hugo # Linux (Snap) snap install hugo # Or download from: https://gohugo.io/installation/
-
Install Node.js dependencies (for Tailwind CSS):
npm install
-
Run development server:
hugo server
Visit http://localhost:1313 to view the site.
-
Build for production:
hugo
Output will be in the
public/directory.
Edit hugo.toml to customize the site configuration:
baseURL = 'http://example.org/'
languageCode = 'en-us'
title = 'MCP 2025' # Website title displayed in navigation
[params]
teacher_name = "Prof. De Sensi" # Teacher name shown throughout the site
[taxonomies]
technology = "technology" # Exercise grouping by technologyField Explanations:
baseURL: The full URL where your site will be deployed. Update this before production deployment.title: Website name displayed in the browser tab and navigation bar.teacher_name: Instructor name displayed on the site. This appears in the header and footer.technology: Taxonomy used to group exercises. Do not modify unless you're adding custom taxonomies.
The homepage content is defined in content/_index.md. This Markdown file contains:
- Course overview and description
- Logistics (schedule, office hours, textbooks)
- Syllabus and technical modules
- Evaluation methods
- Exercise announcements
To modify the homepage:
- Open
content/_index.md - Edit the frontmatter (YAML between
---):--- title: "Embedded and Multicore Systems Programming" description: "Course description" date: 2025-09-23 author: "Daniele De Sensi" draft: false ---
- Edit the Markdown content below the frontmatter
- Save and reload - changes appear immediately in development mode
See the Creating Exercises section below for detailed instructions.
Copy the MCPGrader output JSON to data/leaderboard.json:
cp /path/to/grader/leaderboard.json data/leaderboard.jsonThe site will automatically read this file and display leaderboards on exercise pages. See MCPGrader Integration for details.
Each exercise is a folder under content/exercises/ containing an index.md file. The folder name must match the assignment name in the MCPGrader configuration.
The project includes an archetype template at archetypes/exercises.md that provides a standardized structure:
hugo new exercises/<exercise-slug>/index.mdExample:
hugo new exercises/matrix-multiplication/index.mdThis creates a new exercise file with:
- Pre-configured frontmatter (title, date, technology)
- Standard sections (description, guidelines, build instructions, evaluation criteria)
- Proper formatting and structure
After creation:
- Open
content/exercises/matrix-multiplication/index.md - Update the frontmatter:
--- title: "Matrix Multiplication" date: 2026-01-03T00:00:00Z draft: false technology: "cuda" # Options: cuda, mpi, omp ---
- Fill in the exercise content
- Set
draft: falseto publish
Create the exercise folder and file manually:
-
Create directory:
mkdir -p content/exercises/matrix-multiplication
-
Create
index.mdwith this template:
---
title: "Matrix Multiplication"
date: 2026-01-03T00:00:00Z
draft: false
technology: "cuda" # Options: cuda, mpi, omp
---
# Exercise Name
## What this program does
Brief description of the program's purpose and learning objectives.
## Files you must NOT edit
- `input/` contents
- `output/` contents
- `Makefile`
- `test_script.sh`
Only modify the code between the guard comments:
```
// ========================= INIT AREA OF INTEREST =========================
// Your code here
// ========================= END AREA OF INTEREST =========================
```
## Implementation guidelines
- Key implementation points
- Performance considerations
- Common pitfalls to avoid
## Build, clean, and test
- Build: `make target`
- Clean: `make clean`
- Test: `make test`
## Evaluation criteria
- Correctness: All tests must pass
- Performance: Ranked by average execution time
- Code quality: Follows guidelinesExercise Frontmatter Fields:
title(required): Exercise display name shown on the websitedate(required): Publication date (ISO 8601 format)draft(required): Set tofalseto publish,trueto hidetechnology(required): One of"cuda","mpi", or"omp"- determines grouping on exercise list page
MCPLeaderboard is designed to work with MCPGrader, an automated grading system for GitHub Classroom assignments.
- Students submit assignments via GitHub Classroom
- MCPGrader runs tests and generates
leaderboard.json - Copy results to
data/leaderboard.jsonin this project - Rebuild site with
hugo- leaderboards automatically update
The exercise folder name must exactly match the assignment name in MCPGrader's YAML configuration.
Example:
MCPGrader configuration (grader-config.yaml):
assignments:
- name: vector-sum # This is the key
invite_link: "https://classroom.github.com/a/xxxxx"
test_script_path: "./test_scripts/test_vectorsum.sh"Hugo exercise structure:
content/exercises/vector-sum/index.md # Folder name must match
If names don't match: The leaderboard will not be displayed on the exercise page.
To keep leaderboards current, set up a script that:
- Runs MCPGrader periodically (via cron or systemd timer)
- Copies the output to
data/leaderboard.json - Rebuilds and deploys the Hugo site
Example update script:
#!/bin/bash
# update-leaderboard.sh
cd /path/to/MCPGrader
uv run main.py
cd /path/to/MCPLeaderboard
cp /path/to/MCPGrader/leaderboard.json data/leaderboard.json
hugo
# Deploy public/ to your hostingThe data/leaderboard.json file should contain output directly from MCPGrader:
{
"exercise-slug": [
{
"name": "StudentUsername",
"commit_hash": "abc1234",
"status": "graded",
"error": "",
"stdout": "Test output...",
"avg_runtime": 586.76,
"data": {
"passed": 12,
"total": 12,
"times": [439.79, 662.68, 882.69, ...]
}
},
{
"name": "AnotherStudent",
"commit_hash": "def5678",
"status": "error",
"error": "Compilation failed",
"stdout": "...",
"avg_runtime": 0.0,
"data": null
}
]
}Field Descriptions:
name: Student name(s) from GitHub Classroomcommit_hash: Git commit hash (first 7 characters) of the graded submissionstatus: Grading status -"graded"(success) or"error"(failure)error: Error message if status is"error", empty otherwisestdout: Complete output from the test script executionavg_runtime: Average of all values indata.times(milliseconds)data: Parsed JSON from test script (null if tests failed):passed: Number of tests passedtotal: Total number of teststimes: Array of runtime measurements in milliseconds
The leaderboard uses runtime as the primary ranking metric:
- Ranking: Students sorted by
avg_runtime(lower is better) - Units: Milliseconds (ms)
- Calculation: Average of all runtime values from the
timesarray - Display: Shows execution times for each test case
Customizable metrics are work-in-progress (WIP).
Planned features:
- Custom performance metrics (throughput, memory usage, etc.)
- Weighted scoring across multiple metrics
- Different ranking criteria per exercise
- Configurable display formats (charts, graphs, percentiles)
- Historical performance tracking
MCPLeaderboard/
├── archetypes/
│ ├── default.md # Default content template
│ └── exercises.md # Exercise-specific template
├── assets/
│ └── css/
│ └── main.css # Tailwind CSS styles
├── content/
│ ├── _index.md # Homepage content
│ └── exercises/ # Exercise pages
│ ├── vector-sum/
│ │ └── index.md
│ └── mpi-pi-calculation/
│ └── index.md
├── data/
│ └── leaderboard.json # Grading results from MCPGrader
├── layouts/
│ ├── index.html # Homepage template
│ ├── _default/
│ │ ├── baseof.html # Base HTML structure
│ │ ├── list.html # List page template
│ │ └── single.html # Single page template
│ ├── exercises/
│ │ ├── list.html # Exercise listing with technology groups
│ │ └── single.html # Individual exercise page with leaderboard
│ └── partials/ # Reusable components
│ ├── footer.html
│ ├── navbar.html
│ └── sidebar.html
├── public/ # Generated site (after `hugo` build)
├── resources/ # Hugo's asset cache
├── hugo.toml # Hugo configuration
├── package.json # NPM dependencies
├── postcss.config.js # PostCSS configuration
├── tailwind.config.js # Tailwind CSS configuration
└── README.md # This file
Key Files:
hugo.toml: Site configuration (title, teacher name, taxonomies)content/_index.md: Homepage markdown contentcontent/exercises/*/index.md: Individual exercise pagesdata/leaderboard.json: Grading results (from MCPGrader)layouts/exercises/single.html: Template that displays leaderboard tableslayouts/exercises/list.html: Template that groups exercises by technology
Issue: Leaderboard not showing on exercise page
- Verify the exercise folder name matches the assignment
namein MCPGrader config exactly - Check that
data/leaderboard.jsoncontains data for that exercise name - Ensure the exercise has
draft: falsein its frontmatter - Try rebuilding:
hugo server --disableFastRender
Issue: Exercise not appearing on exercises list page
- Check that
draft: falsein the exercise's frontmatter - Verify the
technologyfield is set to"cuda","mpi", or"omp" - Make sure the file is named
index.md(notindex.markdownor other) - Restart the Hugo server
Issue: Changes not appearing
- Hugo caches aggressively - use
hugo server --disableFastRenderduring development - Clear the
resources/andpublic/directories:rm -rf resources/ public/ - Check browser cache - try hard refresh (Ctrl+Shift+R or Cmd+Shift+R)
Issue: Styling not working
- Ensure Node dependencies are installed:
npm install - Verify Tailwind is configured in
tailwind.config.js - Check that
assets/css/main.cssimports Tailwind directives - Rebuild:
hugo --gc
Issue: "Error: Unable to locate config file"
- Ensure you're running Hugo from the project root directory
- Verify
hugo.tomlexists and is valid TOML syntax - Try running
hugo configto validate configuration
Issue: Teacher name or site title not updating
- Edit
hugo.tomland save - Restart
hugo server - Check that you're editing the correct field (
titleorparams.teacher_name)
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Copyright (C) 2026
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Developed for the Programmazione di Sistemi Embedded e Multicore course at Università degli Studi di Roma "La Sapienza".