Skip to content
PT
All projects
Web platformLive · school sign-in2026 – present

CS Portal

A learning management system for my own classes, graded on the server.

Sign-in uses a school Google account.

Subjects
5, 60+ students
Roles
Admin · teacher · student
Question types
5 (essays by hand)
Delivery
GitHub Actions to VPS

I teach at First Asia Institute of Technology and Humanities. CS Portal began as the course site for Computer System Architecture (CSAR) and grew into a multi-subject LMS: it now also hosts Human-Computer Interaction, Discrete Structures 2, Object-Oriented Programming in Python and a workshop space, for more than 60 students.

Everything a class needs is in one place: lessons, activities, labs, quizzes, exams and a gradebook. Nothing is visible to students until I publish it, and optionally not before an "available from" date.

CS Portal admin dashboard in a dark theme. Five subject cards: CSAR, CSDF101, CSDS102, CSHCI and WORKSHOP, each with a student count and badges such as '3 to grade' or '3 join requests'.
The admin dashboard: every subject with its enrollment and what is waiting for me to grade or approve.
CS Portal sign-in card: 'Sign in to continue' with a Continue with Google button.
The public sign-in page. The lessons and simulators sit behind it.
From content file to graded answer

Authoring

  1. Lessons as code

    content/<subject>/

  2. Tests

    keys, diagrams, parity

  3. CI and deploy

    GitHub Actions

  4. Sync on release

    flask sync-content

Student

  1. Google sign-in

    school domain

  2. Admin approval

    pending until verified

  3. Quiz or lab

    timed, shuffled

  4. Server grading

    key never leaves server

What it does

The parts worth talking about

Accounts and approval

Google sign-in limited to the school domain. New accounts stay pending until an admin confirms a real student from their name, number and program. Students join a subject with a code and the teacher approves them.

An assessment engine

Multiple choice, multiple answer, numeric with tolerance, short answer and manually graded essays, with time limits and auto-submit, attempt limits, per-student shuffling and a setting for when answers are revealed. Answer keys never reach the browser.

Interactive boards

Browser simulators embedded in lessons: binary converter and addition, logic gates and truth tables, a register file, a five-stage pipeline, SIMD lanes, a CPU performance calculator and graph algorithms (Dijkstra, Kruskal, Prim).

Content as code

Course material lives in the repository and is synced on each deploy. Tests fail if a generated diagram is stale, and every answer key is checked against a reference solution. The graph algorithms exist in Python and JavaScript with a parity test between them.

Gradebook

Category weights, best-attempt scoring, missing work counted as zero after the due date, late flags, feedback and CSV export.

Secure by default

CSRF protection on every form, uploads checked against a file-type allowlist and served only to the owner and the subject's teachers, secure cookies behind HTTPS, and a production boot that refuses to start without a secret key or with the dev login enabled.

Stack

Built with

  • Python
  • Flask
  • SQLAlchemy
  • Alembic
  • SQLite
  • Authlib (Google OAuth)
  • Jinja
  • JavaScript
  • pytest
  • GitHub Actions
  • gunicorn
  • PM2