Goldmine V2 is a web app for managing university lecture materials (exercise sheets, solutions, and related metadata). It is primarily designed as an internal tool for course staff to keep materials organized and consistent across semesters.
Goldmine V2 has not been battle-tested in a production setting and is currently maintained as a private/internal project. If you want to deploy it or get involved in development, please reach out and/or open a PR.
- Lecture catalog with semesters and series (exercise sheets)
- PDF/TeX/solution uploads plus bulk import helpers
- HTML rendering of TeX via background render jobs
- Full-text search across lectures, series, and exercises
- Comments on exercises
- Role-based access (staff / professor / assistant) and course memberships
- Soft delete + trash restore with audit metadata
- Issue dashboard for missing/failed assets
- Internal knowledge base for teaching staff
- Coordinated management of lecture materials across semesters
- Course staff and administrators
- Teaching assistants
- Professors
- Ops/DevOps teams hosting the service
Goldmine V2 could be extended to be student-facing, but that requires additional features and stricter access controls:
- Read-only student role: students should never edit content and should only access semesters they've been explicitly granted.
- Release scheduling: enforce timed release of series and solutions when uploading exercise sheets.
- Interactive assignments/quizzes: a next-level extension for interactive teaching tools and/or homework workflows.
- Frontend: Next.js (App Router), React, Tailwind CSS, SWR
- Backend: Django + django-ninja (+
django-rqworkers) - Datastores: Postgres (primary), Redis (jobs/queue)
- Rendering: LaTeXML/TeXLive + MathJax (client-side)
- Containerized with Docker; Caddy reverse proxy for production
From the repo root:
# Recommended: use the helper script (starts db+redis+migrate+backend+worker+frontend)
./scripts/gm.sh dev up
# Or run Docker Compose directly
docker compose up -d --build- Frontend: http://localhost:3000
- Backend (direct): http://localhost:8000 (API:
/api, Django admin:/admin)
The frontend proxies /api, /admin, /static, and /media to the backend (single-origin cookies/CSRF), so for most workflows you can just use http://localhost:3000.
Helper script (recommended) for common dev flows:
./scripts/gm.sh dev down # stop services (keeps volumes)
./scripts/gm.sh dev reset # stop + delete volumes
./scripts/gm.sh dev empty # fresh empty DB
./scripts/gm.sh dev demo # fresh DB + demo seedCreate an admin user:
# Interactive (prompts for credentials; requires the stack running)
./scripts/gm.sh dev ensure-admin
# Or non-interactive
DJANGO_SUPERUSER_USERNAME=admin DJANGO_SUPERUSER_PASSWORD=change_me ./scripts/gm.sh dev ensure-adminTo auto-create the admin user after ./scripts/gm.sh dev up, set these env vars before running it.
Alternatively, use Django’s interactive command:
docker compose exec backend python manage.py createsuperuserSeed demo data (optional):
./scripts/gm.sh dev seed-demoThe example TeX lives in backend/examples/demo_upload and is imported using the same upload detection flow as real data; placeholder PDFs are generated at seed time. A ready-to-upload demo archive is generated by python scripts/build_demo_zip.py and written to backend/examples/demo_upload.zip. Upload commits also create Exercise rows by scanning TeX headings/markers (best-effort) and automatically queue an HTML render job (see the “HTML Render” page). Set SEED_DEV_RENDER=0 to skip LaTeXML rendering.
See DEPLOYMENT.md for Docker + Caddy deployment and backup guidance.
This repo also ships a lightweight Render Blueprint in render.yaml for “one-click” demo deployments (not intended as a full production setup).
- Deploys Postgres + Redis + backend + frontend
- Frontend proxies
/api,/admin,/static, and/mediato the backend so auth cookies/CSRF work on a single origin - If you don’t have shell access (e.g. Render free tier), set
DJANGO_SUPERUSER_USERNAME+DJANGO_SUPERUSER_PASSWORD(optionalDJANGO_SUPERUSER_EMAIL) on the backend service and redeploy/restart
- Example backend env file:
backend/.env.example(for local, non-Docker usage) - Production uses a root
.envconsumed bydocker-compose.prod.yml - Do not commit real secrets; use environment variables or secret managers
backend/Django app + APIfrontend/Next.js appdocker-compose.ymllocal dev stackdocker-compose.prod.ymlproduction stackCaddyfilereverse proxy configrender.yamlRender.com demo blueprintscripts/deploy and backup helpers
This is a full bottom-up reimagined implementation of a similar system we had at ITP at ETH Zurich during the time I was a PhD student there.
Dr. Tobias Wolf - tobiaswolf.net
AGPL-3.0-only. See LICENSE.