27 Commits

Author SHA1 Message Date
6ca42d10e6 fix: resolve unit test failures caused by rate limiting and fix mod.rs router passing
Some checks failed
Release / release (push) Failing after 2m10s
2026-05-02 21:04:31 +02:00
31f8ef74fe chore: remediate code audit findings and fix CI pipeline failures
- Security: Add Secure flag to checkin identity cookie, implement rate limiting on login, and harden Helm security context.
- Security: Add cargo-audit to CI and Release pipelines for dependency vulnerability scanning.
- Backend: Enable SQLite WAL mode and fix AppState initialization in tests.
- Frontend: Fully type the API client, fix importStudents FormData handling, and pin dependency versions.
- Frontend: Add auto-logout on 401 and resolve authentication initialization race conditions.
- CI/CD: Pin pnpm version in release workflow and include lint/audit quality gates.
2026-05-02 20:40:05 +02:00
6cb5968b7b fix: resolve Docker build failure and E2E authentication race conditions
- Dockerfile: Update binary name from attendance to tutortool to fix the release build pipeline failure.
- Backend: Expose test_mode in AppState to conditionally disable the secure flag on auth cookies during local E2E testing over HTTP.
- Backend: Enable tower-http trace feature and attach TraceLayer for improved request logging.
- Frontend: Refactor auth.svelte.ts to a plain reactive object to resolve initialization race conditions during tests.
- Frontend: Append cache-busting timestamp to /api/auth/me to prevent stale session states.
- Frontend: Update Playwright locator in superadmin.spec.ts for greater resilience.
- Makefile: Inject required environment variables (STATIC_DIR, JWT_SECRET) into the test-up target.
2026-05-02 05:25:04 +02:00
ff5ad26cfc feat: harden security with httpOnly cookies and modernize frontend with Svelte 5 runes
- Switched to secure httpOnly, SameSite=Strict cookies for JWT authentication.
- Refactored backend to use AppState for shared secrets and database pool caching.
- Modernized frontend with Svelte 5 runes ($state) and removed localStorage reliance.
- Gated destructive test endpoints behind debug_assertions and fixed unsafe test patterns.
- Enhanced CI pipeline with cargo clippy, cargo fmt, and pinned pnpm version.
- Updated documentation and implementation plans to match the hardened architecture.
2026-05-02 03:16:33 +02:00
b42ded93f6 feat: add DEMO env var to seed demo data on startup
Some checks failed
Release / release (push) Failing after 7m24s
2026-04-29 23:05:05 +02:00
Claude
e01f7808a0 Overhaul build pipeline: pnpm, non-root image, Helm chart, CI+release workflows
Some checks failed
CI / test (push) Failing after 1m35s
CI / test (pull_request) Failing after 1m34s
- db.rs: fix fresh-PVC startup crash by using SqliteConnectOptions with
  create_if_missing(true) and foreign_keys(true); drops after_connect
- Dockerfile: switch to Node 22 + pnpm (corepack), run pnpm check before
  build, copy backend/demo/ for TT_TEST_MODE support, non-root app user,
  add HEALTHCHECK, remove baked-in JWT_SECRET
- .dockerignore: exclude node_modules, build artifacts, data/, logs
- deploy/: new Helm chart replacing k8s/ — Deployment, Service, HTTPRoute
  (Gateway API), PVC (hcloud-volumes), CronJob backup, ServiceAccount, VPA;
  JWT_SECRET sourced from pre-provisioned K8s Secret
- k8s/: removed (superseded by deploy/)
- ci.yml: replaces test.yml — Node 20->22, same test steps, adds no-push
  Docker build; triggers on non-main pushes and PRs
- release.yml: new tag-driven workflow (v*.*.*) — runs tests, pushes image
  to registry.itsh.dev/s0wlz/tutortool, deploys via helm upgrade

https://claude.ai/code/session_01N1kWaQJkz1fC7mUippdQR5
2026-04-29 19:11:29 +00:00
205c871d31 feat(tests): add /__test__/reset endpoint and /health route (gated on TT_TEST_MODE) 2026-04-29 04:08:31 +02:00
8a45f6a06e feat: implement superadmin CRUD for courses and tutors 2026-04-29 02:42:33 +02:00
4aea0f4427 chore: clean up repo state and improve dev tooling
- Add IF NOT EXISTS to all migration DDL for idempotency
- Support PORT env var in backend (for compose flexibility)
- Support HOST_PORT env var in docker-compose
- Improve seed-demo to apply migrations before seeding
- Gitignore .claude/ session cache
2026-04-29 01:39:00 +02:00
943463fff4 feat(backend): complete attendance, notes, and export APIs 2026-04-28 05:11:33 +02:00
e3561b731d fix(attendance): propagate cookie header errors, guard missing room in checkin 2026-04-28 03:55:54 +02:00
116de5aead fix(attendance): reject seat_id on room-less slots 2026-04-28 03:49:30 +02:00
3629cc3769 feat(attendance): student check-in API with FCFS seat locking 2026-04-28 03:43:56 +02:00
e75a2bccb8 fix(attendance): correct course_id column in slot queries, add patch_json helper 2026-04-28 03:29:13 +02:00
797ccacbb2 feat(attendance): sessions/slots CRUD with atomic code generation 2026-04-28 03:24:36 +02:00
fcf2787bcc fix(attendance): add empty layout/label validation and put_json test helper 2026-04-28 03:18:56 +02:00
84f5788363 test(attendance): add negative geometry validation test for rooms layout 2026-04-28 03:11:10 +02:00
5743808265 feat: rooms CRUD with layout validation 2026-04-28 03:07:40 +02:00
4aef2f70df fix: per-course auth guard, filter courses by tutor, CSV fixes, cascade check 2026-04-28 03:05:49 +02:00
abf0ebcce2 feat: courses and students CRUD endpoints 2026-04-28 01:42:22 +02:00
a351c442d3 fix: secret() error propagation, exp as u64, bcrypt cost 4 in tests, skip empty auth header 2026-04-28 01:36:22 +02:00
83b25b1693 feat: JWT auth, login endpoint, and test helpers 2026-04-28 01:33:14 +02:00
0da5dc5674 feat: add data models and request types 2026-04-28 01:20:44 +02:00
24acc54ceb fix: NOT NULL on tutor_courses FKs, status CHECK, time format CHECK, add indexes 2026-04-28 01:19:59 +02:00
d6f9d593ed feat: SQLite migrations and db pool with FK pragma 2026-04-28 01:14:20 +02:00
fbd697759d fix: bump thiserror to v2, rand to v0.9, improve error logging 2026-04-28 01:06:55 +02:00
42465839d0 feat: scaffold Rust/Axum backend 2026-04-28 00:55:36 +02:00