The platform

THINQ Site — Product Feature Ledger

The platform-wide statement, written to be checked: every claim names the code that makes it true.

What this is. A running inventory of what every THINQ Site ships with, built in core and inherited by every client site. It is the source for the public-facing docs/features area of the site, and it follows the same rule as security-posture.md: every claim here is verifiable in the codebase. Each entry names the file(s) that implement it, so nothing is marketing that isn't also true. Individually these are small; together they are why a THINQ Site is more polished than a template.

Legend: Built: points at the implementing code.


1. Performance & Core Web Vitals

  • Pages render per request, from local files. There is no database and no network hop: content is JSON on the server's own disk, so a render is a file read and a React pass — measured at ~15ms warm. Sitemap, RSS, robots and OpenGraph images stay statically generated.

    Pages were prerendered at build time until 2026-08-28. That was abandoned on purpose: the build container cannot see MYPRESS_CONTENT_ROOT (the persistent volume), so a prerendered page baked whatever the repository happened to contain and kept serving it after deploy — silently dropping operator-configured analytics until something revalidated. Correct-on-every-request is the right default for a CMS whose owner can change anything at any moment. Built: Next App Router, output: "standalone" (next.config.ts); content in src/lib/content.ts; export const dynamic in src/app/layout.tsx.

  • Upload image pipeline. Every uploaded image is auto-oriented from EXIF, capped at 2400px on the long edge, re-encoded to WebP, and stripped of metadata (smaller files, and GPS coordinates never get published by accident). SVGs, animation, and non-images pass through untouched. Built: src/lib/image-pipeline.ts, src/app/api/admin/media/route.ts.

  • Responsive, on-demand image serving. /img/<name>?w=<width> resizes any image — including ones placed at build time — to a WebP at the requested width, cached on the persistent volume (so it survives deploys) with a closed width allowlist. SiteImage emits a matching srcset, so a phone downloads a ~640px image where it would otherwise pull the full-size source (e.g. a 231 KB hero → 49 KB on mobile). Built: src/app/img/[name]/route.ts, src/lib/image-variants.ts, src/lib/responsive-widths.ts, src/components/SiteImage.tsx.

  • Correct lazy-loading and LCP hints. Off-screen images load lazily with async decoding; above-the-fold images (header logo, hero) load eagerly at high fetch priority. Built: src/components/SiteImage.tsx.

  • Long-lived media caching. /media/* is served with a one-day cache plus a week of stale-while-revalidate, instead of revalidating on every page view. Built: MEDIA_CACHE_CONTROL in src/lib/security-headers.ts, next.config.ts.

2. SEO & AI-SEO

  • Complete sitemap. Pages, every published blog post, and category archives — not just top-level pages. Respects per-item seo.sitemap.include and excludes robots.index: false items so a noindex URL is never advertised. Custom canonical paths are honored. Built: src/app/sitemap.ts, src/features/content-sitemap.ts, src/features/posts/sitemap.ts.
  • IndexNow, built in, no setup. Search engines are told within minutes when a public URL is added, changed or removed, instead of waiting days for a recrawl — one submission reaches Bing (and the AI answers built on it, ChatGPT search and Copilot), Yandex, Seznam, Naver and Yep. Each site's key is derived from its own secret and served at /indexnow-key.txt; only changed URLs are sent, read from the site's own sitemap. It stays silent on demo sites (visibility off), on staging addresses (*.onrender.com), and until the key answers at the real domain — so a site is quiet before its DNS cutover. Status and "Notify search engines now" sit under the visibility setting in Settings. Built: src/lib/indexnow.ts, src/app/indexnow-key.txt/route.ts, src/app/api/admin/indexnow/route.ts.
  • Structured data. BlogPosting JSON-LD on every post (headline, dates, author, publisher, section, image); site-level ProfessionalService; per-page graphs from the SEO panel. Built: src/features/posts/seo.ts, src/lib/seo.ts.
  • Per-page/-post metadata done right. Self-canonical URLs, OpenGraph and Twitter cards, article OG with published/modified times on posts, robots directives. Built: src/lib/seo.ts, src/features/posts/seo.ts.
  • Config-derived social card. The OpenGraph image is generated from the site's own name, tagline, brand color, and domain — no per-site work, and no risk of one brand's card leaking onto another's shares. Built: src/app/opengraph-image.tsx.
  • Crawlable blog. Server-rendered pagination on real paths (/blog/page/N) with a page-1 redirect and out-of-range 404s; indexable category archives; filtered/search views correctly noindex, follow. Every post is reachable by a crawler. Built: src/features/posts/blog-data.ts, src/app/blog/**.
  • Internal link graph. Every post links to its nearest topical neighbours ("Keep reading"), scored from shared category, title terms, and recency — with an optional per-site entity vocabulary — so the archive reads as connected clusters rather than orphans. Built: src/features/posts/related.ts, RelatedPosts.tsx.
  • Breadcrumb structured data. BreadcrumbList JSON-LD on posts and category archives (Home › Blog › Category › Post), so results show a breadcrumb trail instead of a raw URL. Built: src/lib/breadcrumbs.ts, wired in src/app/blog/**.
  • RSS feed + autodiscovery. A standards-compliant RSS 2.0 feed at /feed.xml, linked from every page's <head> so readers, aggregators, and crawlers find it. Built: src/app/feed.xml/route.ts, src/app/layout.tsx.
  • llms.txt brief for answer engines. A content-derived /llms.txt that states what the site is and points at its highest-value pages, so an AI citation is accurate rather than reconstructed. Built: src/app/llms.txt/route.ts.
  • Branded, real 404. A styled, on-brand not-found page that still returns a true HTTP 404 — self-contained inline styles so it renders correctly even in Next's stylesheet-dropping error shell, with logo, nav, and a route home. Built: src/app/not-found.tsx.
  • robots.txt derived from site visibility settings. Built: src/app/robots.ts.
  • Redirect manager. Old address → new page, 301 or 302, from Redirects in the admin with no deploy: add/edit/disable rules, notes, and paste a whole migration list at once. Matching is exact and single-hop (case, trailing slash and percent-encoding folded; the query string carried over), with no wildcards, so one bad rule cannot capture the site. Each rule shows its hits and last-used date, so dead rules can be pruned with confidence. Built: src/lib/redirects.ts, src/lib/redirect-stats.ts, src/proxy.ts, src/components/admin/RedirectsEditor.tsx.
  • 404 log with one-click redirect. The Redirects screen lists addresses visitors asked for that don't exist — most frequent first, with last-seen date and the referring site — each with Redirect… (a new rule prefilled with that address) and Dismiss. Fixed paths drop off when their redirect is saved. Privacy-first: path only (no query string) and the referrer's host only; no IP, user agent or full referrer, at most 500 paths, scanner probes (/wp-login.php, /.env, …) ignored. Reported by the 404 page from the visitor's browser, so crawlers that don't run scripts aren't counted (Search Console covers those). Built: src/lib/not-found-log.ts, src/components/NotFoundBeacon.tsx, src/app/api/not-found/route.ts.
  • Change URL without breaking links. Admins can change a page's or post's address from its editor. Revision history moves with it, menu links follow, and for a published item the old address gets a 301 in the same step — rules that pointed at the old address are retargeted (no chains) and any rule from the new address is removed. Drafts get no redirect (their URL was never public). Built: src/lib/content-rename.ts, src/components/admin/ChangeUrlButton.tsx.

3. Security & accounts

(Full reviewer-facing detail in security-posture.md.)

  • Role-based access: owner / admin / editor, enforced server-side. Built: src/lib/users.ts, src/lib/admin-auth.ts.
  • Two-factor authentication (TOTP), enforced deployment-wide via MYPRESS_REQUIRE_MFA — on by default for sites provisioned since 2026-10-24 (scripts/provision.mjs), optional on older ones. When required it covers the admin screens, the admin API, backups and AI-connector approval; scripts enrol with scripts/admin-mfa.mjs. Built: src/lib/totp.ts, src/lib/users.ts, src/lib/mfa-enrollment.ts.
  • Account audit log — every user create/change/delete recorded append-only. Built: src/lib/audit-log.ts (see users manager).
  • Self-service account recovery via authenticator or recovery code — no email dependency — plus a break-glass CLI. Built: src/app/admin/recover/**, src/lib/recover-challenge.ts, scripts/reset-password.mjs.
  • Hardened HTTP headers: strict CSP, HSTS (2y, preload), nosniff, frame and base-uri lockdown, and upgrade-insecure-requests (scoped off only for local previews, fail-secure). Built: src/lib/security-headers.ts.
  • Rate limiting on sensitive endpoints. Built: src/lib/rate-limit.ts.
  • Uploaded-media sandboxing — a locked-down CSP + nosniff so an uploaded SVG or HTML can't execute script if opened directly. Built: MEDIA_CSP in src/lib/security-headers.ts, src/app/media/[name]/route.ts.

4. Content, forms & authoring

  • Block-based pages with a typed, validated schema; a feature-module system that adds blocks/admin/routes without editing core. Built: src/framework/**, src/features/index.ts.
  • Editable entrance animations on every block: fade, fade-up/down, zoom, slide, with delay, duration, stagger and separately animated parts. Set in the page builder (or by THINQ Connect). They play once on scroll, never on the first screen, and show nothing moving for reduced-motion visitors. Content stays visible without JS. Built: src/lib/motion.ts, src/lib/motion-runtime.ts, docs/motion.md.
  • Blog / posts with categories, search, and the full SEO surface above. Built: src/features/posts/**.
  • Forms with layered spam defense: honeypot, minimum submit time, Cloudflare Turnstile, Akismet, and quarantine — plus notification emails with merge-tag recipients (e.g. reply to the submitter). An auto-reply to a visitor-supplied address is capped per form per day, and repeats back only the typed answers the owner ticks (cleaned of links, 60 characters) and, if turned on, a copy of the visitor's answers with links removed — so a form cannot be used to mail spam to strangers. Built: src/features/forms/**.
  • Revision history with one-click restore. Every page and post keeps its last 20 versions, saved automatically before any change or delete, whoever made it: a person in the admin, a script, or the site owner's AI assistant (THINQ Connect). The editor's History tab shows each version with when, who and how it was replaced, previews it (pages also render it), and restores it after a confirmation; the restore itself can be undone. Deleted pages and posts come back from Recently deleted. Over THINQ Connect, "undo what you just did" works in the conversation (list_page_revisions, restore_page_revision, and the post equivalents). Restores respect roles (a version with an embed block needs an admin) and are audited. Built: src/lib/content-history.ts, src/lib/content-restore.ts, withRevisionHistory in src/lib/content-write.ts, src/components/admin/HistoryPanel.tsx, src/components/admin/RecentlyDeleted.tsx, src/lib/revision-routes.ts, src/lib/mcp/server.ts. Verify: scripts/revisions-e2e.mjs.
  • Media library with in-admin upload/replace/delete (now auto-optimizing on upload). Built: src/components/admin/MediaLibrary.tsx, MediaPicker.tsx.
  • Menus, appearance, and theming managed from the admin. Built: src/app/admin/(dashboard)/appearance/**, src/themes/**.

5. Email & notifications

  • Three-tier email: a clean neutral template, automatic config-branding from the site's name/logo/brand color, or a bespoke per-site template via the email slot — all with a plain-text sibling for deliverability. Built: src/lib/email/notification-email.ts, src/framework/feature-module.ts (email slot).
  • Download tables in email. A notification body of [Label](url) lines renders as a branded, zebra-striped download table rather than raw URLs. Built: messageToHtml in src/lib/email/notification-email.ts.

6. Integrations & branding

  • Native Google Tag Manager — paste a container ID in Site settings and the loader

    • <noscript> inject site-wide; no code, no redeploy to change it. Built: src/lib/gtm.ts, src/lib/schemas.ts (gtmContainerId), src/app/layout.tsx.
  • Custom head/body code for one-off tags (e.g. Metricool), scoped by an env-level script-host allowlist so a compromised admin can't point the site at an attacker's script host. Built: customCode in src/lib/schemas.ts, MYPRESS_SCRIPT_HOSTS in src/lib/security-headers.ts.

  • Maps, two tiers. The Map block uses Google's keyless Embed API: one address, free, unlimited, no Google account. The Map — Branded block is premium — up to 25 locations on one map, tinted to the site's brand colour, branded pins, and a clickable location list. It runs on the paid Maps JavaScript API, so it needs a Google Cloud project with billing, an enabled API and a referrer-restricted key (NEXT_PUBLIC_GOOGLE_MAPS_KEY); Google gives 10,000 loads/month free and meters after that. Optional cloud styling via NEXT_PUBLIC_GOOGLE_MAPS_MAP_ID. With no key the block degrades to the free embed rather than erroring on a live page, and the setup requirement is shown in the block catalogue before anyone picks it. Built: src/components/blocks/MapProBlock.tsx, src/lib/map-style.ts, setupNote in src/framework/feature-module.ts. Setup: docs/branded-map-setup.md.

  • Client-branded admin — the sign-in and account-recovery screens show the client's own logo, not the CMS product name. Built: src/components/admin/LoginForm.tsx, RecoverForm.tsx.

  • An admin menu trimmed to the build. Each site chooses which sidebar sections it shows (Settings → Admin menu), so a build that only uses part of the CMS — a scheduling app with no public pages, say — isn't cluttered with the rest. It is navigation only: hidden screens still open by URL, keep their role gates, and nothing behind them is deleted; the dashboard's stats and quick links follow the same list. Dashboard, Settings and Your account can never be hidden, so no one can lock themselves out. Stored as adminHiddenSections in site.json, so it rides the volume and changes without a deploy. Built: visibleAdminSections / ALWAYS_SHOWN_ADMIN_SECTIONS in src/lib/admin-sections.tsx, src/components/admin/AdminMenuEditor.tsx, src/components/admin/AdminSidebar.tsx, adminHiddenSections in src/lib/schemas.ts; tests in src/lib/admin-sections.test.ts.

  • Built-in analytics, no third party. Admin → Analytics shows page views and visitors with the change against the previous period, a daily chart, top pages, top sources (Google, Bing, LinkedIn, Facebook, Instagram, X, YouTube, ChatGPT, Perplexity, Claude, direct, else the referring site; utm_source wins) and devices, over 7, 30 or 90 days. Counted on the site's own server from a tiny beacon: no cookies, nothing shared with a third party, and nothing about a visitor kept — only daily totals (IP addresses, user agents and visitor hashes are never written; "visitors" are approximate daily uniques from a salt that rotates every day). Bots, prefetches, the site's own admins, /admin, /api, previews, browsers sending Global Privacy Control / Do Not Track, and the private pages a site lists under Settings → Analytics are never counted. Retained 400 days. Counting starts at the deploy that ships it — there is no history from before. Works beside GA / Tag Manager, not instead of them. Built: src/lib/analytics/, src/components/PageViewTracker.tsx (mounted in src/app/layout.tsx — a site with its own layout mounts it there), src/components/admin/AnalyticsDashboard.tsx, analytics in src/lib/schemas.ts; tests in src/lib/analytics/*.test.ts. Set MYPRESS_ANALYTICS_DEBUG=1 to log why a beacon was not counted (reason only).

7. Platform & operations

  • One hardened core, every site. Client sites derive from core; a security or quality fix lands in core and propagates. Built: the derivation model in THINQ-SITE-PLATFORM.md.
  • Enforced no-drift. A manifest declares which files must stay byte-identical across sites; a drift check fails the build if any diverge, so sites can't silently fall behind core. Built: cascade.manifest.json, scripts/cascade-check.mjs.
  • File-based content, no database. Content is JSON validated by Zod on a persistent disk — simpler to back up, migrate, and reason about, and it removes a whole class of database vulnerabilities. Built: src/lib/content*.ts, src/lib/schemas.ts.
  • Portable by design. No proprietary hosting lock-in, no external image-optimizer or database service required to run a site. Built: self-contained next.config.ts / Dockerfile.

What we don't do yet (honest gaps)

  • No image optimizer beyond the on-demand /img route (no AVID/AVIF negotiation, no automatic art-direction).
  • No content-hashed media filenames, so media caching is a bounded window rather than immutable.
  • SEO has no on-page scoring. Redirects are exact-match only (no wildcard or pattern rules, by design), and the 404 log only sees visits from browsers that run scripts.
  • Revision history covers pages and posts only (last 20 each); site settings, menus, theme, forms and media rely on the whole-site backup. No side-by-side diff between versions yet.
  • Built-in analytics is deliberately simple: no time-on-page, bounce rate, funnels or per-page visitors; "visitors" are approximate (a server restart mid-day starts a new daily salt, and range totals add up daily uniques). Counts live in one server process's memory for up to ~30s before they are written, so a hard crash can lose that window, and a multi-replica deploy would need a shared store.
  • See security-posture.md §6 for the security limitations, and ../thinq-ops/context/THINKPRESS.md for the honest platform-maturity read.

Verify any claim

Each entry names its file(s). To confirm a control end-to-end, the fastest checks: curl -sI https://<site>/ (headers), curl -s https://<site>/sitemap.xml (SEO coverage), a ?w=640 request to /img/<any-image> (responsive resize), and the boot log line [image-pipeline] sharp ready (upload optimization active).

This text is maintained in thinq-site-core at docs/product-features.md (commit e72488e) and published here unchanged.