Skip to content

milivojevic/swissgrades

Repository files navigation

πŸ‡¨πŸ‡­ Swiss Grading Visualizer

Interactive visualization tool for Swiss grading system calculations deployed on Cloudflare Workers

Live Demo Cloudflare Workers TypeScript

🎯 What It Does

An educational tool that visualizes how different Swiss grading models calculate final grades from raw points. Compare two models side-by-side:

  • Inclusive Model: Traditional rounding to nearest half-grade
  • Abrunden Model: Conservative rounding down (floor)

Perfect for teachers, students, and education administrators who need to understand or demonstrate grading calculations.

✨ Features

  • πŸ“Š Interactive Charts: Hover over data points to see grade bands
  • πŸ“± Fully Responsive: Desktop side-by-side, mobile full-screen pagination
  • 🎨 Color-Coded: Red for failing (<4), yellow-green for passing (β‰₯4)
  • πŸ’Ύ Persistent Settings: Your preferences saved locally
  • ⌨️ Keyboard Navigation: Arrow keys for quick comparison
  • πŸ“₯ Export Charts: Download as PNG images
  • 🌐 Global CDN: Fast loading worldwide via Cloudflare edge network

πŸš€ Quick Start

Run Locally

# Install dependencies
npm install

# Start development server
npm run start

# Visit http://localhost:8787

Deploy to Cloudflare Workers

# Authenticate (first time only)
npx wrangler login

# Deploy to production
npm run deploy

πŸ“– Documentation

πŸ—οΈ Architecture

swissgrades/
β”œβ”€β”€ src/
β”‚   └── index.ts              # Cloudflare Worker entry point
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ index.html            # Application structure
β”‚   β”œβ”€β”€ styles.css            # Responsive design
β”‚   β”œβ”€β”€ grading.js            # Grade calculation logic
β”‚   β”œβ”€β”€ main.js               # UI orchestration
β”‚   └── favicon.svg           # Swiss flag icon
β”œβ”€β”€ wrangler.toml             # Cloudflare configuration
β”œβ”€β”€ package.json              # Dependencies
└── tsconfig.json             # TypeScript config

πŸ› οΈ Tech Stack

Technology Purpose
Cloudflare Workers Edge deployment, global CDN
Plotly.js Interactive data visualization
Vanilla JavaScript Client-side calculations
TypeScript Development-time type safety
CSS Grid Responsive layout
ES6 Modules Code organization

πŸ“ Grading Models

Inclusive Model (Traditional)

// Linear interpolation between PPP→4.0 and MP→6.0
// Round to nearest half-grade (0.5, 1.0, 1.5, etc.)
roundingMode: "nearest"

Abrunden Model (Conservative)

// Same interpolation
// Round DOWN to lower half-grade (floor)
roundingMode: "floor"

Both models use the same linear interpolation formula but differ in final rounding behavior. See GRADING_MODELS.md for detailed explanation.

πŸŽ“ Use Cases

  • Teachers: Understand how grading policies affect student outcomes
  • Students: Visualize what points are needed for target grades
  • Administrators: Compare fairness of different grading approaches
  • Education Research: Analyze grading system properties

πŸ§ͺ Example Scenarios

Try these configurations to explore the models:

  1. Standard Test

    • MP: 23 points, PPP: 13 points, Granularity: 0.5
  2. Strict Grading

    • MP: 100 points, PPP: 60 points, Granularity: 0.5
  3. Fine Gradations

    • MP: 20 points, PPP: 12 points, Granularity: 0.25

🌍 Live Demo

Production URL: https://swissgrades.cheddar.workers.dev

Hosted on Cloudflare's global edge network with automatic HTTPS and caching.

🀝 Contributing

This project was developed through human-AI collaboration with GitHub Copilot. Contributions welcome!

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes with clear commits
  4. Test locally: npm run start
  5. Push to your fork: git push origin feature/amazing-feature
  6. Open a Pull Request

Code Style

  • ES6+ JavaScript with modern syntax
  • Clear function names and comments
  • Single responsibility principle
  • Responsive design first

πŸ“ License

This project is open source and available for educational purposes.

πŸ™ Acknowledgments

  • Swiss Education System: For the grading model specifications
  • Plotly.js: For excellent visualization capabilities
  • Cloudflare Workers: For edge computing infrastructure
  • GitHub Copilot: For AI-assisted development

πŸ“§ Contact

Questions or feedback? Open an issue on GitHub or visit the live demo.


Built with ❀️ and πŸ€– through human-AI collaboration

Last updated: November 1, 2025

About

πŸ‡¨πŸ‡­ Interactive Swiss grading system visualizer on Cloudflare Workers

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors