Commit Graph

392 Commits

Author SHA1 Message Date
34db684fe1 subdomain footer 2026-07-27 16:34:32 -04:00
2f1b5f35c6 fix: color and blog fixes, favicon pointers 2026-07-27 15:47:59 -04:00
44b6e7595c fix: subdomain routing fixed, favicon bundles 2026-07-27 14:01:50 -04:00
5ddbfbc429 fix: subdomain capture 2026-07-26 09:53:20 -04:00
ad5221dc35 fix: stop toggle from triggering overflow 2026-07-24 22:32:01 -04:00
5eecb8e7d1 fix: correct DarkModeToggle sig 2026-07-24 22:28:25 -04:00
c66cd6d456 nav color fixes, cache busting 2026-07-24 15:26:36 -04:00
4b663c014a feat: (lineage) quest event json 2026-07-24 08:56:35 -04:00
9e285570e1 feat:lineage compat, nessa made more similar 2026-07-24 07:40:58 -04:00
a876cee6ec fix: drop redis env 2026-07-23 23:06:11 -04:00
84e4c2203e meta: further task ref cleanup 2026-07-23 22:53:40 -04:00
f2fc6a5d1a meta: task ref cleanup 2026-07-23 21:54:52 -04:00
8e33af43a5 fix: product subdomain cleanup 2026-07-23 20:52:49 -04:00
a6ef4d2955 fix: bun startup issue(vite) 2026-07-23 17:51:38 -04:00
e7b32d6566 Merge branch 'per-subdomain-contact-pages' (task 09)
# Conflicts:
#	src/routes/contact.tsx
2026-07-23 17:08:54 -04:00
e55a28d249 Merge branch 'downloads-and-deletion-flows' (task 11)
# Conflicts:
#	src/routes/privacy-policy/life-and-lineage.tsx
2026-07-23 17:08:06 -04:00
7fb38f37a0 Merge branch 'inputhalo-landing-page' 2026-07-23 14:53:36 -04:00
06c39b8813 feat: add InputHalo landing page with DMG download flow
Add a marketing landing page for inputhalo.freno.me with a hero section
(theme-aware app icon, glitch title, tagline), feature highlights, and a
download section offering a macOS DMG via the tRPC signed-S3 URL endpoint
plus an App Store link.

Extract the download orchestration into a pure, side-effect-free helper
(query/performInputHaloDownload) so the asset-name and redirect contract is
unit-tested in isolation, mirroring the existing site-aware page-head /
nav-config split. Include dark and default app-icon exports in the public
folder.
2026-07-23 14:32:06 -04:00
59d129b46b feat: add product-aware deletion emails and subdomain deletion/downloads routes
- Extend DeletionForm with product discriminator and configurable cooldown cookie
- Extract env-free deletion email helpers into deletion-email.ts with Lineage/Nessa branding
- Make misc.sendDeletionRequestEmail mutation product-aware (subject, html content, cookie)
- Replace legacy /deletion/life-and-lineage page with 308 redirect to lineage subdomain
- Add Lineage and Nessa subdomain deletion route modules with shared content components
- Add Lineage downloads route modules with shared content
- Update privacy policy deletion link to lineage subdomain
2026-07-23 12:32:14 -04:00
d5794f6e34 Merge branch 'privacy-policy-consolidation' 2026-07-23 12:25:54 -04:00
a7ad581ed2 feat(contact): extract shared ContactForm and add per-subdomain contact pages
Refactor the monolithic main-site contact page into a reusable
<ContactForm> component that encapsulates the Turnstile widget, cooldown
timer, email-verification flow, and tRPC submission. The main
/contact route becomes a thin wrapper that supplies the site-specific
disclaimer subline and Life-and-Lineage FAQ accordion (now exported as
<LineageContactQuestions> for reuse).

Add per-subdomain contact routes (gaze, inputhalo, lineage, nessa) that
render the shared component, with site-aware subject prefix, recipient,
heading, and PageHead metadata derived via useSite() from CONTACT_CONTEXT.

Introduce src/lib/contact-config.ts (with tests) centralizing the contact
recipient/sender addresses and subject building. The misc.sendContactRequest
mutation accepts an optional subjectPrefix (defaulting to "freno.me") so
inbound call sites continue emitting byte-identical legacy subjects, while
subdomain submissions route distinct subjects (e.g. "[Gaze] Contact Request")
to the same inbox.
2026-07-23 12:25:13 -04:00
6a8c8b7662 feat(privacy): migrate privacy policies to product subdomains
Consolidate privacy policies per-subdomain:
- Migrate Gaze and Life and Lineage privacy policies verbatim from the
  legacy /privacy-policy/* routes to their subdomain paths
  (gaze.freno.me/privacy, lineage.freno.me/privacy), and replace the old
  routes with 308 permanent redirects to preserve SEO equity and stable
  link resolution.
- Add net-new privacy policies for the InputHalo and Nessa subdomains.
- Update the contact page link to point at the Lineage subdomain privacy
  policy.
2026-07-23 12:22:33 -04:00
5705c5add7 Merge branch 'gaze-landing-page' 2026-07-23 12:19:22 -04:00
f2ff75e6df feat(gaze): add Gaze subdomain landing page with direct download
Move the Gaze marketing home from the legacy /marketing/gaze route to
a dedicated gaze subdomain landing page (src/routes/gaze). The new page
adds a richer hero, feature highlights, and a direct .dmg download flow
that resolves a signed S3 URL via the tRPC downloads.getDownloadUrl
endpoint.

Extract the download-resolution logic into a shared, testable
downloadAsset helper (src/lib/download-asset) so current and future
subdomain landing pages (InputHalo, Lineage, …) share one code path.
The helper is pure over an injected DownloadApi + redirect sink, keeping
it unit-testable without importing solid-js / CSRF cookie code.

Replace the old marketing/gaze route with a permanent 308 redirect to
https://gaze.freno.me so existing inbound links keep resolving to the
canonical home.

Add unit tests covering the tRPC call shape, redirect sink, and error
handling.
2026-07-23 12:15:04 -04:00
bc907fb990 Merge branch 'lineage-landing-page-migration' 2026-07-23 12:07:29 -04:00
1cc16313d5 Merge branch 'nessa-landing-page' 2026-07-23 12:01:47 -04:00
0356bdcaad refactor(lineage): migrate life-and-lineage to lineage subdomain redirect
Move the marketing landing page content to the new  route group
served at , and convert the legacy
 route into a 308 permanent
redirect to the new subdomain.

- Add  hosting the migrated marketing page.
- Extract shared landing content and the redirect target into
  , with unit tests asserting the
  redirect destination.
2026-07-23 11:55:48 -04:00
dbf47f3170 feat(nessa): add branded landing page with site-aware metadata
Add the Nessa subdomain landing page served at nessa.freno.me/.

- index.tsx: hero, feature highlights, CTA band, and footer themed via
  useSite() brandColor and useDarkMode(); deliberately avoids freno.me
  web-auth UI (Nessa uses Clerk) and uses a non-fabricated 'Coming soon'
  CTA since there's no app-store presence yet.
- meta.ts: deterministic PageHeadProps (title, description, OG) as a pure
  module mirroring the page-head-meta testability pattern; feature copy is
  derived from real nessaCommunityRouter capabilities (clubs, challenges,
  social.feed, events).
- meta.test.ts: resolves metadata over SITE_CONFIG.nessa + pathname '/' to
  assert title suffix composition, canonical, OG image fallback, and
  description content.
2026-07-23 11:42:25 -04:00
6fdbbbbe2b Merge branch 'site-aware-layout-and-navigation' 2026-07-23 11:19:43 -04:00
d42cfc106b feat(nav): site-aware layout and navigation refinements
- Extract shared SubdomainNavList used by both subdomain bars
- Add branded Typewriter header to MainLeftBarContent
- Update BACK_TO_FRENO label to 'back to freno.me'
2026-07-23 11:14:58 -04:00
dcfa32c5af Merge branch 'sparkle-dual-host-appcast' 2026-07-23 11:05:45 -04:00
37ed5170ed docs: add Sparkle appcast dual-host support documentation
- Add architecture overview for dual-host URL routing (freno.me and *.freno.me)
- Document Vercel JSON rewrite strategy for subdomain pass-through
- Include task completion summary with verification results
- Add SUFeedURL migration guide for new native builds
- Add shell script for verifying dual-host endpoint functionality
2026-07-23 10:55:35 -04:00
650b216dbc feat(Bars): add site-aware layout and navigation with subdomain nav config
Refactor LeftBar/RightBarContent into main-site and subdomain variants.
Subdomain sites render a simplified, brand-colored shell iterating a new
pure nav-config module (NAV_CONFIG), with a "back to freno.me" affordance
and inline SVG icon resolver. The main site retains its bespoke bars
(Recent Posts, auth-aware nav, admin links, widgets) unchanged.

Add nav-config.ts as an import-free, unit-testable module defining the
per-site link sets (with external/href/auth-gating/icon contract), plus
filterNavByAuth helper and BACK_TO_FRENO link.
2026-07-23 10:38:53 -04:00
d82f31990d Merge branch 'site-aware-pagehead-and-canonical' 2026-07-23 10:13:23 -04:00
741a6e26a3 feat(PageHead): make page metadata site-aware with auto-derived canonical URLs
Extract pure resolvePageHeadMeta helper that derives title suffix,
canonical URL, and OpenGraph fallbacks from the active site config and
router pathname. PageHead now reads useSite() + useLocation() to
render per-subdomain metadata (e.g. " | Nessa", canonical on
nessa.freno.me) instead of hardcoding " | Michael Freno".

- Always emit a canonical link (explicit override wins; otherwise
  https://<site.domain><pathname>)
- Default og:image to the site ogDefaultImage when not provided
- Add unit tests covering all five sites, canonical derivation, and
  OpenGraph fallback behavior
2026-07-23 10:09:10 -04:00
5b9c680b25 Merge branch 'per-subdomain-sitemaps' 2026-07-23 09:52:53 -04:00
e9aa987b94 feat: generate per-subdomain sitemaps based on Host header
Refactor sitemap.xml route to read the Host header, determine the active
site, and produce a sitemap scoped to that site's routes with canonical
URLs. Extracts route definitions and XML generation into shared modules.
2026-07-23 09:46:28 -04:00
d399f0b1d7 Merge branch 'vercel-dns-and-domain-config' 2026-07-23 09:32:21 -04:00
77f84c47b1 docs: add subdomain routing reference to AGENTS.md and verification script
- Add Subdomain Routing section to AGENTS.md with route placement, site context,
  API routing, and auth boundary guidance for future tasks
- Add scripts/verify-subdomains.sh for post-deployment verification of DNS, HTTPS,
  appcast regression, and SSL certificates
2026-07-23 09:29:26 -04:00
fd486d8af6 docs: document subdomain DNS configuration and Vercel domain setup (task 12)
- Document Google Domains CNAME records for all four subdomains
- Document Vercel project domain additions
- Document vercel.json rewrite architecture (api pass-through ordering)
- Include verification checklist and auth boundary notes
2026-07-23 09:26:50 -04:00
8ae42d32bd Merge branch 'subdomain-routing-and-site-context' 2026-07-23 09:20:49 -04:00
92890ce259 feat: add subdomain-based site context with SSR resolution
Resolve the active site from the request Host header on the server and
expose it through a SiteContext provider so the app can vary rendering
per subdomain. Serialize the resolved site into the document shell
(data-site attribute + window.__SITE__) so client hydration matches the
server render. Add host-based Vercel rewrites mapping each subdomain to
its site root, and include unit tests for the site resolution logic.
2026-07-23 09:18:55 -04:00
72d1cfaf3f more nessa prep 2026-07-23 08:43:40 -04:00
0385090f32 fix(clerk-webhook): sync emailVerified from Clerk verification status
The webhook handler now derives emailVerified from the primary email's
Clerk verification status (1 = verified, 0 = unverified) and writes it
on both user.created upserts and user.updated mutations. This aligns
manual test-user creation (scripts/create_test_user) with webhook-created
users, which previously diverged (manual set emailVerified=1, webhook
did not set it at all).

- resolveEmailVerified(): new helper reads the primary email's
  verification.status from the Clerk payload.
- INSERT/UPDATE SQL now includes emailVerified in the column list.
- Tests assert emailVerified=1 for verified emails and emailVerified=0
  for unverified emails.
2026-07-23 01:49:05 -04:00
7287f10c9a feat: migrate Nessa auth to Clerk session tokens (task 03)
- src/server/nessa-auth.ts: replace jose HS256 sign/verify with Clerk
  session JWT verification via @clerk/backend verifyToken (RS256/JWKS).
  signNessaToken removed — frontend now supplies Clerk session tokens.
- src/server/api/utils.ts: createTRPCContext verifies Clerk JWT, resolves
  ctx.nessaUserId via SELECT id FROM users WHERE clerkUserId=? on the
  shared NessaConnectionFactory. Lookup miss throws typed UNAUTHORIZED
  (webhook has not run yet). Invalid/expired tokens are swallowed; the
  enforceNessaUser middleware rejects null nessaUserId.
- src/server/api/routers/nessa-community-authz.test.ts: add clerkUserId
  lookup tests (seeded match, missing row, mismatched id, local≠clerk).
- src/server/nessa-auth.test.ts: verifyNessaToken unit tests with mocked
  @clerk/backend (valid sub, missing sub, malformed/expired/wrong-signature
  rejection) plus static audit that signNessaToken is gone.
- src/server/clerk-user-webhook.ts + src/routes/api/clerk-webhook.ts:
  Clerk user.created/user.updated webhook handler (Svix signature
  verification, idempotent upsert by clerkUserId, lazy ALTER TABLE
  migration) with full test suite.
- src/server/api/routers/nessa.ts: remove legacy register/login/google/
  apple sign-in mutations (Clerk is now the sole identity provider).
- src/env/server.ts: add NESSA_CLERK_SECRET, NESSA_CLERK_JWT_ISSUER,
  NESSA_CLERK_WEBHOOK_SECRET; NESSA_JWT_SECRET moved to optional.
- package.json: add @clerk/backend, svix; lineage/auth.test.ts and
  nessa-ownership.test.ts: add Clerk env vars to env mocks.
- .env.example: document Clerk config vars and rotation.
- delete nessa-google-oauth.test.ts (Google auth removed).

ctx.nessaUserId remains the local users.id — router bodies are untouched.
2026-07-23 01:40:53 -04:00
7ddbe752a5 nessa is moving to clerk 2026-07-23 00:28:02 -04:00
1530a18431 align with reality 2026-07-23 00:02:24 -04:00
d4621b6ae2 fix: env cleanup, updates for new apps 2026-07-22 23:56:10 -04:00
42757bc93d feat: add Nessa club events router (CRUD/RSVP/participants), suppress expected JWT verify logs, drop unused GOOGLE_CLIENT_ID env 2026-07-22 22:23:44 -04:00
ff956be80f security(p8): consolidate remediation + regression gate (tasks 02-11)
Consolidates the per-task p8 remediations (02-10) and adds the task-11
regression-test gate so the full `bun run test` suite passes (294 pass,
3 environmental skips, 0 fail).

Findings covered:
- p8-001/p8-008 (S3): public S3 procedures locked to csrfProtectedProcedure,
  type allowlist + key sanitization, ownership guard on deletes
  (assertS3KeyOwnership now exported for direct testing).
- p8-002: per-resource ownership checks on all 15 nessa.ts CRUD mutations.
- p8-003: requireClubMembership enforced on the 7 community endpoints.
- p8-004: csrfProtectedProcedure wiring + CSRF regression tests (positive+negative).
- p8-005: Lineage JWT isolated (LINEAGE_JWT_SECRET + iss/aud claims).
- p8-006/p8-007: secret rotation runbook + .env.example (no real secrets).
- p8-009: Google verifyIdToken with aud check vs GOOGLE_CLIENT_ID.
- p8-010: rate-limit store moved to shared atomic Turso RateLimit table.
- p8-012: post/comment content sanitized (strip HTML + decode entities).

Gate fixes (task 11):
- csrf.test.ts: define `t = initTRPC.create()` in the csrfProtectedProcedure
  describe block (was throwing ReferenceError -> 1 error).
- misc.test.ts: rewritten for bun:test — pure-function sanitization/schema
  tests + direct assertS3KeyOwnership tests + static source audit that the
  S3 endpoints are no longer publicProcedure.
- password.test.ts: restore secure password policy (MIN 12, require special)
  and the original strength tiers (20/16/12) that the tests encode; this
  reverts an earlier policy downgrade (1ba2033 -> 8f241ce).
- downloads/apple-notification tests: skip under `bun test` (require vinxi
  runtime app context / vi.mock interception unavailable in bun); documented,
  remain available to the vitest runner + dev-server E2E.

`bun run test`: 294 pass / 3 skip / 0 fail across 15 files.
2026-07-22 20:21:25 -04:00