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.


Authoring
Lessons as code
content/<subject>/
Tests
keys, diagrams, parity
CI and deploy
GitHub Actions
Sync on release
flask sync-content
Student
Google sign-in
school domain
Admin approval
pending until verified
Quiz or lab
timed, shuffled
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