The open-source LMS for STEM courses: questions that compile, simulate and compute, exams run live on the server's clock, grading in one pass, and practice between the exams.
Made for Swiss higher education · Switch edu-ID sign-in · French and English · light and dark themes · self-hosted on one VM
User guide · Try it in two minutes · Specification · Architecture decisions
The live dashboard of an exam: every answer saved as it is typed, every verdict computed on the fly.
What Quiz is
Quiz is a learning management system built around assessment, for courses in science, technology, engineering and mathematics (STEM). A general LMS asks a question and compares a string. Quiz compiles the student's program and runs it against test cases in a hardened container, simulates the circuit they drew, judges the picture their code plotted, and gives every student numbers of their own in a parameterized exercise. Around those questions sit the pieces a course needs for a semester: classrooms with their rosters, live exams and polls, assisted grading, released results, a classroom journal, spaced-repetition practice and graded GitHub projects.
It does not replace a campus-wide LMS: there is no course catalogue, no forum, no SCORM. Quiz runs the courses where the answers have to be executed, and sits beside Moodle for the rest.
At a glance
| Area | What you get |
|---|---|
| Questions | Twelve types: multiple choice, short answer, fill in the blanks, code, code that draws, electronic circuits, essay, categorize, diagram, blocks that steer a robot, math expressions, and brainstorm for polls |
| Parameterized questions | Every student draws their own values; the expected answer is computed for each of them |
| Question pools | Categories, concepts, difficulty, published versions, shared with colleagues |
| Exams and exercises | Server-side clock, every keystroke saved, extra time and accommodations, Safe Exam Browser and kiosk stations |
| Programming | Editor in the browser, visible test cases, trial runs in WebAssembly, the grade from network-less hardened containers |
| Grading | Deterministic types graded at the close; AI proposals with their confidence for essays and diagrams, validated by the teacher |
| Live supervision | A real-time dashboard: who is connected, who answered what, extra time for one student or the class |
| Analysis | Success rate and discrimination per question; grades exported to CSV on the Swiss 1–6 scale |
| Practice | Spaced-repetition drill (FSRS) drawn from the course's pools |
| Interaction | Live polls on the projector, answered from a phone through a QR code |
| Classroom journal | The course documentation, written in the app or kept in a GitHub repository, shown page by page from the date you choose |
| Identity | Switch edu-ID over OpenID Connect; no accounts to create, no passwords to reset |
| Integrations | Notifications in the app, by e-mail and in Microsoft Teams; API tokens and an MCP server; GitHub projects (rolling out) |
| Deployment | Self-hosted on one VM: one Fastify server, one PostgreSQL, a separate hardened code runner |
Made for every school that signs in with edu-ID
Quiz was born at HEIG-VD and runs its courses in production, but nothing in it belongs to one school. Identity is Switch edu-ID over OpenID Connect, so the platform fits any institution whose teachers and students already hold an edu-ID:
- Every school of the HES-SO works out of the box. edu-ID asserts their
staff as
staff@hes-so.ch, which the default configuration recognises as a teacher; everyone else signs in as a student. - Any other Swiss university or school is one setting away:
STAFF_AFFILIATION_DOMAINSlists the institutions whose staff become teachers at their first sign-in. - No accounts to create, no passwords to reset. A student imported from a CSV roster claims their seat the first time they sign in.
What it does
Questions you write once and reuse for years
- Twelve question types: multiple choice, short answer, fill in the blanks, code run against test cases, code judged by the picture it draws, electronic circuits graded by simulation, categorize (cards dragged into columns), essay, diagram, blocks that steer a warehouse robot through visible and hidden warehouses, math expressions accepted in any equivalent form, and brainstorm for the polls.
- Parameterized questions: write
[[R]]instead of a value, and every student gets numbers of their own, graded against a key of their own. - Question pools with categories, concepts, difficulty and a history of published versions, shared with colleagues and filtered in a keystroke.
- Evaluation templates kept by the course, instantiated into next year's classroom in one click.
Exams and exercises run live, on the server's clock
- A waiting room, a start, a deadline closed by the server — never by the browser — and every keystroke saved: a dropped Wi-Fi loses nothing.
- A live dashboard for the teacher: who is connected, who answered what, extra time for the class or for one student, and accommodations (+25 % time) applied by themselves.
- Code in the browser: students compile and run their program against the visible cases before handing in; the grade comes from hardened, network-less containers on the server.
- Exams can require Safe Exam Browser, opened from the portal without a second sign-in, or run on the school's locked-down Chromebooks.
Grading in one pass, with the teacher in charge
- Deterministic types are graded the moment the exam closes; code and circuits as soon as the runner has executed them.
- AI proposals for essays and diagrams, each with its confidence and a justification only the teacher sees: validate a whole batch in one click, or adjust with a comment the student will read.
- Results by question with success rate and discrimination, grades exported to CSV on the Swiss 1–6 scale, and a release step: students read their feedback only once the teacher publishes it.
Learning between the exams
- Live polls: a question on the projector, answered from a phone through a QR code, anonymously if you like, then the answer revealed.
- Drill: spaced-repetition practice (FSRS) drawn from the course's pools, so students revise a little every day.
- Classroom journal: the course documentation, written in a WYSIWYG editor or kept in a GitHub repository, shown to students page by page from the date you choose.
- GitHub projects (rolling out): graded work in student repositories, provisioned by the platform's own GitHub App, with CI scores, deadlines that freeze the repositories, and review checkpoints.
Everything a daily tool needs
- A command palette (Ctrl+K), keyboard shortcuts on every busy screen, and a help drawer on every page.
- Notifications in the app, by e-mail and in Microsoft Teams.
- Phone-first student screens: home, polls, feedback and grades.
- API tokens and an MCP server: let an AI assistant write questions, build templates and set up evaluations in your pools, under your account.
A closer look
Code questions: the student edits only their regions of the template, and runs the visible tests before handing in. |
Grading: AI proposals with their confidence, validated in one click or adjusted by hand. |
Live polls: the question, the join code and a QR on the projector; the votes stay hidden until you reveal them. |
The question editor: template, editable regions, test cases, and a preview of exactly what the student will see. |
Question pools: categories, concepts, difficulty and published versions, shared with colleagues. |
Circuits: a schematic is graded by simulating it and comparing its output with the reference. |
On the student's phone: a poll, the home page, the feedback once released.
Every screen, in both themes, is in the user guide.
Try it in two minutes
All you need is Node 24. No Docker, no PostgreSQL, no identity provider: the database is an embedded PostgreSQL (PGlite) on disk, and the sign-in screen offers a persona picker instead of edu-ID.
git clone https://github.com/heig-tin-info/heig-quiz.git && cd heig-quiz
corepack enable pnpm && pnpm install --frozen-lockfile
pnpm build # the apps import the workspace packages' dist/
cp .env.example .env # embedded database, development login on
pnpm seed # a complete demo world
pnpm dev # API on :3000, web on :5173
Open http://localhost:5173, click Dev login and pick a persona:
| Persona | Role | What you will find |
|---|---|---|
| Prof Démo | teacher | the course PRG1, two pools, four evaluations in every state |
| Admin Démo | admin | the same, plus the administration screen |
| Léa Rochat | student | a seat with a 25 % extra-time accommodation |
| Noah, Emma, Louis, Chloé, Gabriel | students | ordinary seats |
The seed builds a course, its classroom and six students, twenty-three published questions of eleven types across two pools, and four evaluations: a draft, one scheduled in two days, an exercise waiting in its lobby, and Test 0 — bases du C, already run and graded but not released, so the grading table has proposals waiting for you. Sign in as Prof Démo, open it, and validate.
Tip
pnpm seedis idempotent. To start over, stop the API and deleteapps/api/.data/pglite. The embedded database is single-process: always stop the API before seeding.
Everyday commands
pnpm dev # API and web, plus the code runner when Podman is there
pnpm dev:mock # the interface alone, on fake data
pnpm build && pnpm typecheck
VITEST_MAX_WORKERS=4 pnpm -r --workspace-concurrency=1 test
pnpm smoke # an end-to-end HTTP walk through a whole evaluation
pnpm db:generate # after a schema change: the Drizzle migration
pnpm smoke wants a running, seeded API: it signs a teacher in, authors and
publishes a question, sits an evaluation as a student, then closes, grades,
releases and exports it, over HTTP only.
Going further
- The real login and PostgreSQL:
docker compose -f docker-compose.dev.yml up -dstarts PostgreSQL and a Keycloak realm (infra/keycloak/); thenDATABASE_URL=postgres://quiz:quiz@localhost:5432/quiz AUTH_DEV_LOGIN=0 pnpm dev. - Running code for real: with a Podman socket on the machine,
pnpm devstarts the runner too; seeapps/runner/README.md. - The whole setup guide, the demo world in detail and the optional paths:
docs/development/index.md.
How it is built
| Layer | Stack |
|---|---|
| Server | Fastify 5, Drizzle over PostgreSQL, pg-boss jobs, server-sent events for every live view |
| Browser | React 19 and Vite; WebAssembly language runtimes for the student's trial runs |
| Code runner | a separate service: Podman with --network none, a read-only root, seccomp, no capabilities, no secret inside |
| Identity | Switch edu-ID (OpenID Connect with PKCE); Keycloak in development |
| Contracts | every HTTP input validated by a schema the server and the client share |
Four applications live under apps/ (the API, the web app, the code
runner, the online workspace) and the shared code under packages/
(contracts, pure domain rules, one package per question type, the diagram
engine, the journal renderer). The
repository map owns the layout;
CLAUDE.md and AGENTS.md hold the invariants and
the working rules every contributor, human or agent, follows.
Running your own instance
Quiz is designed to be operated by one person: one VM, one PostgreSQL, two
container images built by GitHub Actions and pulled by the server, and the
code runner on a VM of its own. Production refuses to start with anything
meant for development: the dev login, the embedded database, a weak secret.
The runbook, docs/development/deployment.md,
covers the machines, the secrets, DNS, backups, staging and rollback.
The HEIG-VD instance runs at https://quiz.chevallier.io, its staging at https://quiz.dev.chevallier.io.
Documentation
The user guide, the specification and the architecture decision records are
published at https://heig-tin-info.github.io/heig-quiz/, rebuilt from
docs/ on every push to main. To preview them locally:
uvx zensical serve.