The image is built in CI (.gitea/workflows/docker-build.yml) from the
Dockerfile and pulled from registry.alwisp.com on Unraid. The Dockerfile
recompiles the client (vite build) inside the build and .dockerignore already
excludes these paths from the build context, so tracking them in git served no
purpose.
- Untrack client/dist (regenerated by the Docker build; logo + version stub
sources live in client/public).
- Gitignore client/dist/, data/ (local SQLite volume), and *.tar.gz / *.zip
(local `docker save` exports), alongside the already-ignored node_modules/.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
node_modules was vendored into the repo, which caused platform-specific
rollup/esbuild binary churn on every local install. Dependencies are
installed fresh during the Docker build, so there's no reason to track them.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Documentation:
- Consolidate 6 doc surfaces to 3. Merge Unraid guide into README and
fold durable mobile rules into AGENTS.md; remove README_UNRAID_INSTALL.md,
MOBILE_RESPONSIVE.md, and the misplaced "CPAS Violation Tracker.md" vault note.
- Fix drift across README/AGENTS/in-app guide: clean-cycle roll-off model
(not per-violation 90-day window), auth documented as shipped, dropped
active_cpas_scores view, correct table count (8 tables/0 views), auth
endpoints + ADMIN_PASSWORD in run commands, roadmap updated.
Fixes:
- Audit log / amendment timestamps: SQLite CURRENT_TIMESTAMP is UTC with no
zone marker; new Date() parsed the space-separated form as local time,
shifting entries +5h in Chicago/CDT. Pin the bare form to UTC before
formatting in AuditLog.jsx and AmendViolationModal.jsx.
- Absence - PTO Exhausted: fixed 5 pts -> sliding scale 1-5.
Rebuild client bundle to include the above.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- drop per-commit :sha tag (registry stays one tag per repo)
- remove the built image and prune dangling layers after push so CI builds
stop accumulating orphan images on the Unraid host
Adds a full CRUD system for user-defined violation types stored in a new
violation_types table. Custom types appear in the violation dropdown alongside
hardcoded types, grouped by category, with ✦ marker and a green Custom badge.
- db/database.js: auto-migration adds violation_types table on startup
- server.js: GET/POST/PUT/DELETE /api/violation-types; type_key auto-generated
as custom_<slug>; DELETE blocked if any violations reference the type
- ViolationTypeModal.jsx: create/edit modal with name, category (datalist
autocomplete from existing categories), handbook chapter reference,
description/reference text, fixed vs sliding point toggle, context field
checkboxes; delete with usage guard
- ViolationForm.jsx: fetches custom types on mount; merges into dropdown via
mergedGroups memo; resolveViolation() checks hardcoded then custom; '+ Add
Type' button above dropdown; 'Edit Type' button appears when a custom type is
selected; newly created type auto-selects; all audit calls flow through
existing audit() helper
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Establishes AI agent and developer guidelines covering data integrity rules
(immutable scoring fields, soft-delete contract, audit log append-only),
tier system canonical source, migration patterns, coding standards for both
backend and frontend, schema change checklist, PDF generation notes, and
forward-thinking development constraints.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>