Under the Hood

How Kriterion Works

From assignment creation to final grades - here's every step, plus the architecture powering it.

The Workflow

STEP 01

Professor Creates Assignment

Define rubrics, upload test cases, set deadlines, and choose allowed languages. Starter code and attachments are stored on S3.

STEP 02

Student Writes Code

An in-browser VS Code-like editor with syntax highlighting, file explorer, and multi-file support. Or just upload files directly.

STEP 03

Submission & Compilation

Code is sent to a Celery worker, compiled inside a sandboxed Docker container. Instant feedback: compiled successfully or full error output.

STEP 04

Test Case Execution

Each test case runs against the student's code with time limits. Outputs are compared line-by-line. Partial credit is calculated automatically.

STEP 05

Plagiarism Detection

JPlag's Greedy String Tiling algorithm runs across all submissions. Matching code regions are identified with line numbers and similarity scores.

STEP 06

Review & Final Grade

Faculty review auto-grades, run student code interactively, override scores, and publish final grades - all from one unified grading interface.

Architecture

How Everything Connects

A multi-tier architecture with async task processing, sandboxed execution, and cloud storage.

Browser
Next.js App
FastAPI
REST API
Auth
JWT + RBAC
Celery
Task Queue
PostgreSQL
Primary DB
AWS S3
File Storage
Docker Sandbox
Code Execution
JPlag Engine
Plagiarism Detection
1

Submit → Queue

Student submits code via the API. FastAPI dispatches a Celery task with submission metadata.

2

Queue → Sandbox

Celery worker pulls code from S3, writes it to a temp directory, and runs it inside a Docker container.

3

Sandbox → Grade

Test results are captured, scores calculated, plagiarism checked, and the submission record is updated in PostgreSQL.

Tech Stack

Tools & Technologies

Every layer of Kriterion is built with production-grade open-source tools.

Frontend

Next.js 14
React framework with App Router, SSR, and file-based routing
TypeScript
Type safety across all components and API calls
Tailwind CSS
Utility-first CSS with shadcn/ui component library
React Query
Server-state management, caching, and automatic refetching

Backend

FastAPI
Async Python framework with OpenAPI docs and dependency injection
SQLAlchemy
ORM with relationship loading, migrations, and PostgreSQL support
Pydantic v2
Data validation and serialization for all request/response models
Celery + Redis
Distributed task queue for async grading and plagiarism jobs

Infrastructure

Docker
Containerized services and sandboxed student code execution
PostgreSQL
Primary database for courses, assignments, submissions, and grades
AWS S3
Object storage for starter code, solution files, and submission artifacts
JPlag
Java-based plagiarism engine using Greedy String Tiling (CLI subprocess)

See it for yourself.

Create an account and set up your first assignment in under five minutes.

Get Started