Skip to content

Latest commit

 

History

History
112 lines (87 loc) · 4.93 KB

README.md

File metadata and controls

112 lines (87 loc) · 4.93 KB

Varve Website

Varve's marketing website — an Astro 7 static site for product pages, documentation, downloads, and community.

Architecture

  • Framework: Astro 7 with static output (astro build)
  • Content: src/pages/ (116 routes at the 2026-10-02 build), src/components/, src/data/
  • Search: build-time index + heading anchors via the varve-search-index integration (scripts/search-index.mjs); client-side ranking in src/lib/search/ with no runtime dependency
  • Deployment: GitHub Pages via .github/workflows/website-deploy.yml
  • Testing: Vitest unit tests (src/test/), Playwright E2E (tests/e2e/)
  • Lighthouse CI: apps/website/lighthouserc.cjs + .github/workflows/website-lighthouse.yml against the built dist; optional live report after deploy smoke. LHCI_BASE_URL retargets the same config at https://varve.studio.

Running

pnpm dev              # dev server at http://localhost:4321
pnpm build            # production build (astro check + astro build)

For the GitHub Pages build (with base path):

pnpm build:website:pages

Site search

Search and section anchors are produced by the build, not by a service:

  • Every astro build injects ids on h2/h3 inside <main> and writes search-index.json to the output root (scripts/search-index.mjs, registered in astro.config.mjs as astro:build:done). The build fails if fewer than five pages index.
  • src/lib/search/extract.ts and src/lib/search/rank.ts are pure and unit-tested; src/components/SearchDialog.astro owns the UI and the lazy index fetch.
  • / or Ctrl/Cmd+K opens search. The header control and the mobile-sheet row are hidden until the script marks the document ready, so a script failure cannot leave a dead control.
  • No third-party search service and no CSP relaxation. The rationale and the rejected alternatives are recorded in docs/audits/website-search-and-section-links-2026-09-14.md.

Search only exists in built output: astro dev does not run the astro:build:done hook, so use pnpm build + pnpm preview (or the E2E suite) when testing search or section anchors.

Testing

pnpm test:website           # Vitest unit tests
pnpm test:website:e2e       # Playwright E2E (build first)

The platform accessibility/responsiveness audit is tracked in docs/audits/platform-ux-accessibility-responsiveness-audit-2026-09-02.md. Website E2E covers axe-core, keyboard navigation, narrow-width overflow, and visual snapshots; mobile viewport runs are browser emulation and do not replace physical iOS/Android or screen-reader certification.

The homepage hero eyebrow keeps the caption type token, fits its text, and reflows inside mobile gutters when space or text enlargement requires it. Its public beta status stays together. The nine-width light/dark visual matrix and 200% text-size case are documented in the 2026-09-29 hero eyebrow review.

Button and CTA contract

Shared Astro actions use src/components/Button.astro and the semantic .btn-default, .btn-secondary, .btn-outline, .btn-ghost, .btn-link, and .btn-destructive classes. The names mirror the product action contract documented in docs/architecture/button-action-system.md; btn-pill and btn-pill-outline are reserved for explicit marketing treatments. Buttons default to type="button", and all action transitions honor reduced motion.

Structure

Path Purpose
src/pages/ Astro page components (70 routes, including generated sitemap/robots/security endpoints)
src/components/ Shared Astro components (header, footer, CTA, search dialog)
src/data/ Release manifest, structured data
src/lib/search/ Pure search index extraction and ranking
src/test/ Vitest unit tests
tests/e2e/ Playwright E2E specs (navigation, theme, visual, search)
scripts/ Theme audit (audit-theme.mjs), search index (search-index.mjs), color migration (migrate-colors.mjs), dist serving (serve-dist.mjs)
scripts/website/ (repo root) Post-deploy smoke tests (smoke-pages.mjs)

Key docs

  • docs/release/website.md — website architecture and launch plan
  • docs/release/website.md — website architecture, release-data flow, and deployment
  • docs/release/ — release engineering (the website publishes release data)

Release data and public claims

src/data/release-manifest.json and public/updates/{stable,beta}.json are generated release snapshots. Do not hand-edit them. To refresh the local fallback from a published GitHub release, run:

node scripts/release/fetch-website-release.mjs --repo K-Arthur/varve --tag v0.5.0

The deployment workflow performs the same fetch after verifying that the release is published and that its manifest, checksums, and SBOMs agree. The download page must never be updated with guessed version, size, checksum, or signing data.