Add Elorasmus: pairwise Elo ranking of CTU exchange schools #1

Open
agent wants to merge 9 commits from feat/elorasmus-app into main
Member

What

Elorasmus is a self-hosted, phone-first web app for choosing a CTU FEL exchange school (2027/28,
Master). It shows two partner schools side by side, you pick one (or call it a tie), and each pick
updates an Elo rating. Over time this builds a personal ranking of all 170 schools in the catalogue.

Each school has researched data with sources and confidence levels:

  • AI/robotics research, hands-on value, and access to English courses
  • money from CTU, living costs, out-of-pocket total for the stay, travel from Prague, visa
  • language requirements vs your languages, and subject-area fit for Open Informatics (AI)
  • social life vs calm/solitude
  • climbing, hiking, ocean, skiing, and the climate during the semester
  • city safety and country stability (WGI, GPI, Czech MFA advisories)
  • term dates and host deadlines

Why it's built this way

  • Event log, not stored ratings. Picks are appended to events.jsonl and ratings are
    replayed from it. Phone and laptop can't overwrite each other, undo is just another event, and
    the history stays auditable.
  • Picks never get lost on mobile. Events go to a localStorage outbox first and sync in the
    background; the server deduplicates retries.
  • Fewer picks needed. Smart pairing shows rarely compared schools first, then close contests
    between similarly rated schools, plus 10% random pairs. K decays 48 → 16 over a school's first
    15 games.
  • Self-hosting. compose.yaml publishes to loopback by default, with a read-only root
    filesystem, all capabilities dropped and a non-root user. Every setting is an env var, documented
    in .env.example and the README. Login is optional via AUTH_PASSWORD, with signed HttpOnly
    SameSite=Strict cookies and per-IP backoff.
  • No npm dependencies. The server uses Node's standard library only. The front end is plain ES
    modules under a strict CSP, and all research text is HTML-escaped by default.

Data and research status

  • The catalogue is parsed from the saved CTU Mobility page: 186 agreements at 170 schools.
  • Research covers 146/170 schools so far. Agents are still working on the rest; schools without
    research appear as "research pending" and get filled in by follow-up commits.
  • Every research file passes scripts/validate_research.py against the contract in
    research/BRIEF.md.
  • Money from CTU uses the latest published rates: Erasmus+ 2026/27 Czech rates (2027/28 not out
    yet), and CTU's non-European stipend (15,000 or 13,000 CZK/month).
  • Key findings for the application:
    • One CTU source puts the 2027/28 round at 5 Nov – 4 Dec 2026, a day before the assumed 5 Dec.
    • FEL-only agreements (e.g. SKKU) may use a separate FEL form with earlier deadlines.

Tested

  • node --test test/: 41 tests pass, three runs. They cover Elo, pairing, metrics, and the HTTP
    API end to end: login, tampered cookies, CSRF, validation, import/export, restart persistence, a
    torn log line, path traversal, gzip/ETag.
  • podman compose up -d --build on the dev box:
    • The container is healthy and runs as node (uid 1000) on a read-only root fs.
    • The data volume is writable and state survives a restart.
    • The CSP and security headers are present.
  • Every view checked in headless Chromium at phone width (390 px).

Not tested

  • Docker itself (only Podman), real phones, and a real reverse proxy or HTTPS. BASE_PATH is
    covered by the API tests only.
  • Dark mode wasn't checked visually.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3

## What Elorasmus is a self-hosted, phone-first web app for choosing a CTU FEL exchange school (2027/28, Master). It shows two partner schools side by side, you pick one (or call it a tie), and each pick updates an Elo rating. Over time this builds a personal ranking of all 170 schools in the catalogue. Each school has researched data with sources and confidence levels: - AI/robotics research, hands-on value, and access to English courses - money from CTU, living costs, out-of-pocket total for the stay, travel from Prague, visa - language requirements vs your languages, and subject-area fit for Open Informatics (AI) - social life vs calm/solitude - climbing, hiking, ocean, skiing, and the climate during the semester - city safety and country stability (WGI, GPI, Czech MFA advisories) - term dates and host deadlines ## Why it's built this way - **Event log, not stored ratings.** Picks are appended to `events.jsonl` and ratings are replayed from it. Phone and laptop can't overwrite each other, undo is just another event, and the history stays auditable. - **Picks never get lost on mobile.** Events go to a localStorage outbox first and sync in the background; the server deduplicates retries. - **Fewer picks needed.** Smart pairing shows rarely compared schools first, then close contests between similarly rated schools, plus 10% random pairs. K decays 48 → 16 over a school's first 15 games. - **Self-hosting.** `compose.yaml` publishes to loopback by default, with a read-only root filesystem, all capabilities dropped and a non-root user. Every setting is an env var, documented in `.env.example` and the README. Login is optional via `AUTH_PASSWORD`, with signed HttpOnly SameSite=Strict cookies and per-IP backoff. - **No npm dependencies.** The server uses Node's standard library only. The front end is plain ES modules under a strict CSP, and all research text is HTML-escaped by default. ## Data and research status - The catalogue is parsed from the saved CTU Mobility page: 186 agreements at 170 schools. - Research covers **146/170 schools** so far. Agents are still working on the rest; schools without research appear as "research pending" and get filled in by follow-up commits. - Every research file passes `scripts/validate_research.py` against the contract in `research/BRIEF.md`. - Money from CTU uses the latest published rates: Erasmus+ 2026/27 Czech rates (2027/28 not out yet), and CTU's non-European stipend (15,000 or 13,000 CZK/month). - Key findings for the application: - One CTU source puts the 2027/28 round at **5 Nov – 4 Dec 2026**, a day before the assumed 5 Dec. - FEL-only agreements (e.g. SKKU) may use a separate FEL form with earlier deadlines. ## Tested - `node --test test/`: 41 tests pass, three runs. They cover Elo, pairing, metrics, and the HTTP API end to end: login, tampered cookies, CSRF, validation, import/export, restart persistence, a torn log line, path traversal, gzip/ETag. - `podman compose up -d --build` on the dev box: - The container is healthy and runs as `node` (uid 1000) on a read-only root fs. - The data volume is writable and state survives a restart. - The CSP and security headers are present. - Every view checked in headless Chromium at phone width (390 px). ## Not tested - Docker itself (only Podman), real phones, and a real reverse proxy or HTTPS. `BASE_PATH` is covered by the API tests only. - Dark mode wasn't checked visually. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
agent added 8 commits 2026-11-12 21:56:07 +01:00
parse_catalog.py turns a saved copy of the CTU Mobility catalogue (FEL, Master,
2027/28) into data/catalog.json: 186 agreements merged into 170 schools.
research/BRIEF.md is the contract for per-school research (JSON shape, scoring
anchors, source rules); validate_research.py enforces its structure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
Per-school files follow research/BRIEF.md and all pass validate_research.py.
countries.json: WGI/GPI stability, Czech MFA advisories, visas, health cover.
funding.json: Erasmus+ rates (latest published, 2026/27), CTU non-European
stipend, Swiss situation, CNB exchange rate, 2027/28 selection round.
Research for the remaining schools is still in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
Ratings are replayed from an event log (undo = skip the target event). K decays
48 -> 16 over a school's first 15 games. Smart pairing favours rarely compared
schools, then close ratings, with 10% exploration and random sides. metrics.js
derives grant, out-of-pocket cost, language and subject fit and the duel rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
Standard library only. Config from env vars, validated at startup. State is an
append-only events.jsonl (idempotent appends, torn-line tolerant) plus notes and
settings written atomically. Optional AUTH_PASSWORD login with signed HttpOnly
SameSite=Strict cookies and per-IP backoff. CSRF: JSON-only writes plus an
Origin check. Strict CSP, ETag + gzip, BASE_PATH support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
Compare (duel with row-by-row comparison and thumb-reach pick bar), Ranking,
Triage (keep/drop pass, problem schools first), school detail with sources and
notes, Settings. Picks go to a localStorage outbox first and sync in the
background, so nothing is lost on a flaky connection. Light/dark themes,
installable to the home screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
build_data.py merges catalog, research, countries and funding into
public/data/schools.json, skipping research files that fail validation and
assigning each school its CTU money scheme (Erasmus+ group, Swiss, CTU stipend,
housing swap for UTEP/UVM).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
Dockerfile (pinned node:26.13.0-alpine3.24, non-root, no npm install) and
compose.yaml (loopback by default, read-only root fs, dropped capabilities,
healthcheck, named volume). Every setting is an env var, documented in
.env.example and README.md. AGENTS.md records project conventions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
agent added 1 commit 2026-11-12 21:57:03 +01:00
build_data.py no longer writes __pycache__. README/AGENTS: podman-compose needs
--force-recreate to replace a running container after a rebuild.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gXkMmmRRKLSnY6vQN3
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/elorasmus-app:feat/elorasmus-app
git checkout feat/elorasmus-app

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff feat/elorasmus-app
git checkout feat/elorasmus-app
git rebase main
git checkout main
git merge --ff-only feat/elorasmus-app
git checkout feat/elorasmus-app
git rebase main
git checkout main
git merge --no-ff feat/elorasmus-app
git checkout main
git merge --squash feat/elorasmus-app
git checkout main
git merge --ff-only feat/elorasmus-app
git checkout main
git merge feat/elorasmus-app
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: reudy-net/elorasmus#1
No description provided.