Task
A small online school needed to sell exam preparation without letting teacher hours scale with student count. Everything repeatable had to be automated: grading answers, picking tasks for weak spots, scheduling reviews, sending weekly reports to parents, and taking payments. The teacher only steps in for open-ended answers and 1-on-1 feedback.
Solution
Public pages are rendered by Django templates, while the student dashboard is a Vue 3 and TypeScript SPA communicating with DRF over session auth. Courses live in version-controlled repository code (courses/content) rather than the database admin: lesson notes and task generators have commit history, review and rollbacks, deployed with a single load_course command. Student code execution is isolated in a separate runner network with no internet access.
What was done
- Designed a component system from Figma mockups and built the responsive Vue 3 and TypeScript dashboard
- Built 5 answer verification modes: number, choice, text, code sandbox, and .odt grading by exam rubric
- Isolated student code execution (Python, Pascal, C++) in a dedicated runner container with no network
- Created an adaptive drill with spaced repetition that marks a task mastered after 5 consecutive answers
- Calculated weak spots weighted by exam points and predicted the exam score as a confidence range
- Eliminated teacher review race conditions: row locking inside a transaction protects plan limits
- Integrated CloudPayments course checkout with HMAC webhook signature verification
- Configured a Docker background scheduler service for Monday weekly reports to parents
Result
The school runs two complete courses (Computer Science and Mathematics): 26 modules, 97 lessons, 235 homework assignments, 8,840 drill tasks, and 4 timed mock exams. The platform operates autonomously: the machine handles routine grading and adaptive repetition, while teachers step in only on demand. Covered by 359 tests with 95% coverage, open-source on GitHub.
Developer's note
What was hard
Handling the race condition on teacher review limits: concurrent requests could double-spend the last remaining review slot. Fixed with row-level locking via select_for_update(). Also had to isolate untrusted student code execution, solved with a dedicated lightweight runner container inside an internal Docker network with no outbound gateway.
What came easy
The 'courses-as-code' architecture: storing module structures, lessons, and task generators in Git instead of database rows eliminated staging and production desync. Content deployments run deterministically with a single CLI command.
Technologies
PythonDjangoDRFVue 3TypeScriptPostgreSQLDocker