SEO
- New Settings > SEO admin page (seo_settings in app_config): indexing switch,
Google/Bing verification, X handle, JSON-LD identity (Person/Organization,
sameAs), per-locale keywords, readiness checklist and open links for
sitemap.xml / robots.txt / manifest.
- robots.txt is now dynamic: disallows admin, api, success and coming-soon
paths; blocks everything while indexing is off or maintenance is on.
- sitemap.xml carries hreflang alternates per URL, lists only categories with
published projects, and is empty while hidden.
- Metadata: robots + verification meta, og:locale in de_DE/en_US/ar_AR form,
alternateLocale, twitter site/creator, project cover as OG image with
article type, noindex on /success and /coming-soon.
- JSON-LD: WebSite + publisher graph on all public pages, CreativeWork per
project (view-mode independent).
Security
- Maintenance bypass now requires a correctly signed admin cookie; the
middleware previously only checked the cookie existed. Token helpers moved
to lib/admin-session-token.ts (shared by proxy.ts and lib/admin-auth.ts).
- Media uploads: magic-byte validation against the declared type, SVG
sanitization (script/handlers/foreignObject/javascript: rejected), upload
folder sanitized, kind inferred from the real file.
- Media route: fixed prefix-based path check that accepted sibling
directories, unknown extensions return 404, nosniff header, CSP sandbox on
SVG, gif content type added.
- External media URLs: protocol-relative (//host) URLs rejected.
Portfolio
- Project and category slugs share /portfolio/[slug]; saving now rejects a
slug already used on the other side instead of silently shadowing it.
Tooling/docs
- Lint: ignore scripts/legacy-prisma-seed.cjs, drop unused import.
- New docs/SEO.md; FEATURES, ARCHITECTURE (Drizzle instead of Prisma), admin
spec and CLAUDE.md updated.
- Tests for all of the above (unit + integration); suite green.
Add a prepare script that runs 'git config core.hooksPath .githooks' on every
npm install, so the commit-msg style gate and pre-push test gate turn on
automatically per clone with nothing to remember. Guarded with '|| true' so
installs never fail where git is absent (e.g. tarball deploys). Document that
the deploy server never needs it since it only pulls.
Add a commit-msg git hook that rejects any subject not matching
"VERB - Description" (ALL-CAPS verb + " - " + description), letting
merge/revert/fixup commits through. Document the mandatory style and the
no-attribution rule in CLAUDE.md, and note that .githooks is activated per
clone with core.hooksPath. Prevents the prefix-less commits agents kept
producing.
- Replace stale Prisma commands/paths in CLAUDE.md with Drizzle (db:generate/migrate/push/studio, lib/db/index.ts, lib/db/schema.ts)
- Fix Docker/Makefile command block to match actual make targets
- Correct middleware.ts references to proxy.ts (Next.js 16 entry point)
- Rename ' AGENTS.md' (leading space) to AGENTS.md so agent tooling can find it
- Remove stray characters from the AGENTS.md documentation-updates list
- Move admin login lockout from client cookie to AppConfig (DB), keyed
by hashed client IP — clearing browser cookies no longer bypasses it
- Replace rate-limit $transaction (TOCTOU) with atomic SQL
INSERT...ON CONFLICT...RETURNING; add stale-entry cleanup on each
submission to prevent table bloat
- Add 5 s module-level cache for middleware runtime state fetch, reducing
per-request DB roundtrips
- Rename middleware.ts → proxy.ts to resolve Next.js 16 deprecation
warning; update test import accordingly
- Require ADMIN_PASSWORD, ADMIN_AUTH_SECRET, ADMIN_BASIC_AUTH_USER, and
ADMIN_BASIC_AUTH_PASS in docker-compose.yml (:? syntax) — startup
fails loudly instead of using placeholder defaults
- Add set -e and informative echo lines to Dockerfile CMD for clearer
startup failure attribution
- Export requireAdminAuth() from lib/admin-auth for centralised use in
admin pages
- Add CLAUDE.md with architecture notes and working rules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>