Skip to content

callumalpass/study-program

Repository files navigation

stu.p Brick Mascot Pondering

stu.p is a study program: a computer science oriented self-study platform with readings, exercises, quizzes, and exams.

What This Is

A structured learning environment covering computer science and mathematics. Each subject contains reading material, exercises, quizzes, and exams. The curriculum follows prerequisite chains—you can study in any order, but the platform indicates when prerequisites are incomplete. Progress stays in your browser or syncs to your own GitHub Gist.

The content is written by AI. The prompts and quality standards used to generate it are in docs/. You can also use AI (via your own Gemini API key) to get feedback on written exercises and projects.

Content Structure

Each subject is divided into 7 topics. Topics are further divided into subtopics (separate markdown pages of ~1000 words each). This allows incremental reading rather than scrolling through monolithic documents.

Subjects include:

  • Quizzes (multiple choice, true/false, code output prediction, fill-in-blank)
  • Coding exercises with automated test case validation
  • Written exercises for math and theory subjects
  • Longer projects with rubrics
  • Practice exams (midterm and final)

How Exercises Work

Coding exercises: Python code runs directly in the browser using Pyodide. C exercises use JSCPP for interpretation. When you submit code, it runs against visible and hidden test cases. The expected output is generated by running the reference solution against each test case.

Written exercises: For math proofs and theoretical questions, there's no automated validation. If you configure a Gemini API key in settings, you can request AI evaluation. The AI compares your answer to a reference solution and provides a score and feedback. This is optional.

Projects: Larger assignments with multiple requirements and a grading rubric. You can self-assess or request AI evaluation if you have a Gemini API key configured.

Progress Storage

Progress saves to localStorage under the key study_program_progress. This includes quiz attempts, exercise completions, project submissions, and topic view history.

GitHub Gist Sync

You can optionally sync progress to a private GitHub Gist. This requires a GitHub personal access token with gist scope. The sync is manual (push/pull buttons in settings), not automatic. Settings (API keys, tokens) are never synced—only learning progress data.

This allows you to continue on another device or browser, or keep a backup.

Study Timeline

The timeline feature lets you create a study plan with a start date and pace:

  • Standard: ~4 years (2 weeks per topic)
  • Accelerated: ~2 years (1 week per topic)
  • Intensive: ~1 year (2 topics per week)

The timeline displays as a Gantt chart showing scheduled, in-progress, and completed subjects. It respects prerequisite dependencies when scheduling. You can drag subjects to reschedule them.

Running Locally

npm install
npm run dev

Opens at http://localhost:5173

Building

npm run build

Output goes to dist/. The project deploys to GitHub Pages via .github/workflows/deploy.yml.

Project Structure

src/
├── components/     # UI components (sidebar, code editor, quiz renderer)
├── content/        # Markdown lesson files organized by subject
├── core/           # Types, router, storage, progress calculations
├── data/           # Subject definitions (topics, quizzes, exercises, exams)
├── pages/          # Page renderers
├── services/       # GitHub sync, PDF export
└── utils/          # Gemini AI evaluation, helpers

docs/
├── prompts/        # Prompts for content generation/upgrade
├── reviews/        # Subject content reviews
└── standards/      # Content quality standards

Dependencies

  • Vite (build tool)
  • TypeScript
  • Monaco Editor (code editing)
  • Pyodide (Python in browser)
  • JSCPP (C/C++ interpretation)
  • KaTeX (math rendering)
  • Marked (markdown parsing)
  • Prism.js (syntax highlighting)
  • jsPDF (PDF export)

API Keys

Two optional API keys can be configured in settings:

  • GitHub token: For gist sync (requires gist scope)
  • Gemini API key: For AI evaluation of written exercises and projects

Both are stored in localStorage only and never leave the browser except when making API calls.