Add HTTP server: event store, optional login, static files

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
This commit is contained in:
agent 2026-11-12 20:55:35 +00:00
parent 226e5f46f8
commit 67f9b199ec
7 changed files with 1033 additions and 0 deletions

12
package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "elorasmus",
"version": "1.0.0",
"private": true,
"description": "Pick-one-of-two Elo ranking of CTU FEL exchange partner schools, mobile-first.",
"type": "module",
"engines": { "node": ">=22.6" },
"scripts": {
"start": "node server/index.js",
"test": "node --test test/"
}
}