feat: auth by default, theme toggle, CoderPad startup, review fixes

- Require a session on every route; public routes opt out with @allow_anonymous
- Split password hashing and pepper loading into passwords.py
- Add a system/light/dark theme toggle backed by light-dark() colors
- Ignore stale 401s from an earlier session, PATCH only changed book fields,
  and block overlapping journal-entry saves
- Add bin/start and CoderPad Vite server settings for the pad's start/restart
- Rewrite README as a mise onboarding guide; expand .gitignore
- Include review-round fixes and tests
This commit is contained in:
2026-10-02 16:49:14 -05:00
parent 9d7b0e805c
commit 7f5d034a1f
46 changed files with 1797 additions and 497 deletions
+25 -2
View File
@@ -3,6 +3,11 @@ python = "3.14"
node = "24"
ruff = "0.16.10"
biome = "2.5.15"
uv = "0.12.21"
[tasks.lock]
description = "Re-resolve backend/requirements.in into the pinned, hashed backend/requirements.txt"
run = "uv pip compile --quiet --universal --generate-hashes backend/requirements.in -o backend/requirements.txt"
[tasks.setup]
description = "Create the venv and install backend and frontend dependencies"
@@ -46,8 +51,12 @@ description = "Format and auto-fix Python and TypeScript"
depends = ["format:py", "format:ts"]
[tasks."lint:py"]
description = "Lint the backend and verify formatting (no writes)"
run = ["ruff check backend", "ruff format --check backend"]
description = "Lint, type-check and verify formatting of the backend (no writes)"
run = [
"ruff check backend",
"ruff format --check backend",
"uvx --quiet --with-requirements backend/requirements.txt --with types-psycopg2==2.9.21.20260911 [email protected] --strict backend --exclude backend/tests",
]
[tasks."lint:ts"]
description = "Lint the frontend and verify formatting (no writes)"
@@ -56,3 +65,17 @@ run = "biome check src vite.config.ts"
[tasks.lint]
description = "Lint and format-check Python and TypeScript (CI-safe, no writes)"
depends = ["lint:py", "lint:ts"]
[tasks."test:py"]
description = "Backend integration tests against real Postgres (books_test)"
depends = ["setup", "db"]
run = ".venv/bin/python -W error -m unittest discover -s backend/tests -t backend"
[tasks."test:ts"]
description = "Frontend component tests and typecheck"
depends = ["setup"]
run = ["npm test", "npm run typecheck"]
[tasks.test]
description = "Run backend and frontend tests"
depends = ["test:py", "test:ts"]