Skip to content

Marketing site spec: Homefelt

Spec for building the marketing site with Claude Code. Written 2026-11-21. Read AGENTS.md first; its workflow rules (one checkpoint = one issue = one small PR, commits authored as EdSancha with a Co-Authored-By: Claude trailer, Eduardo merges) apply here too.

Decisions

Decision Choice
Suite name Homefelt, decided 2026-11-22: the suite, the platform and the company-facing brand; Canasta stays the first game’s name. Store names and trademark checks are still open
Domain homefelt.io, decided 2026-11-22: the site at homefelt.io, the game at play.homefelt.io, the game server later at api.homefelt.io. homefelt.co and both www. names redirect to https://homefelt.io
Design direction Home A (“The table”) combined with Home C (“Evening table”); see “Home page”
Business model TODO(ads): probably free with ads and a subscription that removes them. Not decided (see “TODO: ads and pricing”)
Headline pitch “Your rules”, not AI strength
Analytics None at launch. The marketing site itself has no ads, no third-party scripts and no cookies
Language English only at launch (assumed)

What we are building

A static marketing site for a suite of card and board games. Canasta is the first and, today, only game. The main call to action on almost every page is “Play in your browser”, which opens the existing web game.

flowchart LR
  subgraph repo[homefelt repo]
    tokens[design/tokens.json]
    rules[spec/rulesets/*.json]
    shots[design/screens/*.png]
    site[site/ - new, Astro static]
    web[web/ - exists, Vite + React game]
  end
  tokens -->|bin/gen-theme| site
  tokens -->|bin/gen-theme| web
  rules --> site
  rules --> web
  shots --> site
  site --> apex[homefelt.io - marketing]
  web --> play[play.homefelt.io - game and invite links]
  apex -->|Play button| play

Non-goals: no CMS, no accounts on the marketing site, no changes to the rules cores, no changes to the game’s routes.

Stack and layout

  • Astro, static output, TypeScript strict, content in Markdown/MDX collections. Pages ship as HTML; the only client script is the display switches (below). No UI framework runtime.
  • TypeScript 6, for now. site/ stays on TypeScript 6 while web/ uses 7: Astro’s type checker (@astrojs/check, npm run typecheck) accepts only TypeScript 5 or 6, and a TypeScript 7 bump breaks npm ci (#122). .github/dependabot.yml ignores TypeScript majors in /site. When @astrojs/check lists TypeScript 7 as a peer, bump site/package.json to ^7, drop that ignore, and run bin/test site.
  • New top-level folder site/:
site/
astro.config.mjs package.json tsconfig.json
src/
theme.generated.css written by bin/gen-theme, never edited by hand
layouts/Base.astro header, footer, skip link, <head> meta
components/ Card.astro, SuitIcon.astro, DisplaySwitches.astro, PlayButton.astro,
StoreButtons.astro, RuleDiffTable.astro, Screenshot.astro
lib/rulesets.ts reads ../spec/rulesets/*.json at build time
lib/site.ts name, play URL, store URLs, contact email (one place)
lib/i18n.ts the languages, the layout's words in each, localePath
content/blog/*.md build diary
content/help/*.md FAQ entries
pages/ see "Pages"
public/fonts/ Atkinson Hyperlegible Next, self-hosted (woff2)
e2e/a11y.spec.ts Playwright + axe, modelled on web/e2e/a11y.spec.ts
  • Tokens. Extend bin/gen-theme to also write site/src/theme.generated.css from design/tokens.json, with the same custom-property names as web/src/theme.generated.css. Never hard-code a colour in site/; use the properties.
  • Cards are drawn in CSS and SVG as web/src/CardViews.tsx does (rank over suit in the corner, one large pip, brass band on wild cards). Reuse the four suit paths from that file. No card image files.
  • Config. PUBLIC_PLAY_URL (default https://play.homefelt.io; each Play button opens its game there, playGameUrl("canasta") = /canasta), PUBLIC_APP_STORE_URL and PUBLIC_GOOGLE_PLAY_URL (unset = that store button is not rendered).
  • Hosting. Two Vercel projects from this repo: site/ at the main domain, web/ at play.. The game host must keep answering /online, /join/* and /table/* with index.html (web/README.md). Set-up and checks: docs/deploy.md.
  • Security headers (#251). vercel.json sends HSTS, nosniff, a referrer policy, a permissions policy, X-Frame-Options: DENY and a Content Security Policy, for now as Content-Security-Policy-Report-Only. The policy allows each inline script by its SHA-256 hash, and Astro writes every stylesheet as a file (inlineStylesheets: "never"), so it needs no 'unsafe-inline'. Change an inline script and its hash in vercel.json must change too: e2e/security.spec.ts fails until it does, and loads every page with the policy enforced. HSTS carries includeSubDomains: every subdomain is served over TLS, play. and docs. by Vercel and api. by Fly.io. It is not preloaded. Enforcing the policy waits for #270.
  • bin/test gains a site target: npm ci && npm run typecheck && npm run build && npm run e2e, plus a link check over dist/. CI runs it on every PR.

Design

Combination of Home A and Home C from the canvas.

  • From A: the page structure, the green felt header and hero, brass primary buttons, the four proof points, the games section, the founder note, the dark footer.
  • From C: the working “Text size” and “Deck” switches with a hand of cards in the hero, the three accessibility promises, and the dark palette as the site’s dark theme.

Rules:

  • Font: Atkinson Hyperlegible Next, weights 400, 600, 800. Body 18px minimum, 20px on long-form pages. Headings 800.
  • Light theme uses color.light, dark theme uses color.dark, chosen by prefers-color-scheme. The felt stays green in both.
  • Primary button: brass background, onBrass text, radius 12 to 14px, at least 48px tall. Secondary on felt: 2px onFelt outline.
  • Content width 1120px; long-form text 760px. Layout is fluid: at phone width the nav wraps, grids become one column, the hero stacks text above the switches panel.
  • Meaning never rests on colour alone: selected switches also set aria-pressed and differ in fill, teams pair a shape with a colour, suits pair a shape with a colour.
  • No gradients, no emoji, no stock photos. Icons are inline stroke SVG.

Display switches (the one interactive piece)

DisplaySwitches.astro: two button groups, as in the game’s web/src/DisplaySettings.tsx.

Group Options Effect
Text size Standard, Large Sets data-text="large" on <html>; large scales body and headings about 1.25x and uses the card.large sizes
Deck Four colours, Red and black (default) Sets data-deck="fourColour" or "classic" on <html>; every drawn card on the site switches suit colours
  • Real <button type="button"> elements with aria-pressed, inside role="group" with a label.
  • A short line under the cards explains the current deck (“Red and black: the classic deck, for players who prefer it.” or “Four colours: diamonds are blue and clubs are green, so suits are easy to tell apart at a glance.”).
  • The choice persists in localStorage (wrapped in try/catch) and applies on every page. A tiny inline script in <head> applies it before first paint. With scripting off, the page renders Standard and Red and black (the defaults, as in the game) and hides the switches. A stored choice, Four colours included, is kept.

Home page, top to bottom

  1. Header (feltDeep): wordmark “Homefelt”; nav Games, How to play, Accessibility, About; brass “Play Canasta”.
  2. Hero (felt). Left: eyebrow “Card and board games, starting with Canasta”; h1 “Your family’s rules. Everyone at the table.”; paragraph “Homefelt Canasta plays by your house rules or the official ones, so family and friends can play together from different houses.”; brass “Play in your browser”; outlined “How to play”; small line “No account needed to play the computer.” Right: the switches panel with a five-card hand (A spades, K hearts, Q diamonds, J clubs, 7 diamonds) on feltDeep.
  3. Four proof points (surface): Your rules / One table, any device / Made for older eyes / a fourth point that is TODO(ads). Until it is decided, ship three proof points. Copy in “Copy deck”.
  4. Easy on the eyes (chrome): C’s three promises: Never colour alone / A hand that wraps, never shrinks / A typeface made for low vision. Link to /accessibility.
  5. The games: a felt card for Canasta (Web, iPhone, Android chips; “Play Canasta”) and a dashed “More on the way” card.
  6. Founder note (surface, 760px): “Built for one family first”, signed “Eduardo, founder”, link to the build diary.
  7. Footer (ink): Accessibility, Privacy, Help, Contact, on every page.

Pages

Route Content Source
/ Home, as above hand-written
/canasta Game page: hero with iPhone screenshot, three ways to play, large-text section, short FAQ, store buttons, subscription line design/screens, canvas “Game page”
/canasta/how-to-play Illustrated tutorial for a lapsed player: the aim, a turn, melds, canastas, the pile, going out, scoring. Drawn cards, no screenshots hand-written
/canasta/rules Official rules, every setting rendered in words spec/rulesets/official.json
/canasta/family-rules “What’s different in Family rules”: one row per setting that differs diff of family.json against official.json
/accessibility Statement, as on the canvas hand-written
/privacy What is stored for online play, what is not collected, how to delete an account, “this site sets no cookies” docs/server.md
/pricing TODO(ads): not built until the model and price are decided blocked on “TODO: ads and pricing”
/about Founder story Eduardo
/blog, /blog/[slug] Build diary, one entry per day docs/diary/
/help FAQ from content/help hand-written
/games Suite list; one game today hand-written
404 Friendly, with Play and Help links hand-written

Languages

English is at / and Spain’s Spanish under /es/ (Astro i18n routing, prefixDefaultLocale: false). Each page has a file per language (src/pages/es/canasta.astro beside canasta.astro), with the same markup and components. The words of the layout and the components (navigation, skip link, display switches, store buttons, card names) are in src/lib/i18n.ts, with the same keys in both languages. The few it shares with the game are copied from design/strings/es.json.

  • Base.astro sets <html lang>, a hreflang link for en, es and x-default (English), and in the header a link to the same page in the other language, named in that language with a globe (“Español”, “English”).
  • No redirect by browser language. Instead, English pages offer a bar in Spanish (“¿Prefieres español? Ver esta página en español”, “No, gracias”) when the browser’s first language that the site has is Spanish. Following any language link, or “No, gracias”, records the choice in homefelt.site.language, and the bar stops showing (Eduardo, 2026-11-24). Without scripting it stays hidden.
  • On a Spanish page, a Play button opens the game with ?lang=es. The game saves that as its Language setting and drops it from the address (docs/i18n.md, “The locale”). English pages add nothing, so the game follows the player’s own choice or browser. The game’s links back here (its home’s site link, “How it plays”) go to /es/ while it speaks Spanish.
  • Every page has one URL, ending in “/” (/canasta/, /es/canasta/): Astro’s trailingSlash: "always" with build.format: "directory", and vercel.json’s trailingSlash: true, which redirects /canasta there. Canonical and hreflang URLs use it; e2e/urls.spec.ts checks it.
  • The site also serves the apps’ update and sunset feed, public/app-status/v1.json, at https://homefelt.io/app-status/v1.json (docs/plans/app-messaging.md). Vercel’s trailingSlash leaves paths with a file extension alone. vercel.json gives /app-status/ its JSON type, a 60-second cache, Access-Control-Allow-Origin: * and nosniff; bin/test site checks the file against spec/app-status/, and e2e/app-status.spec.ts checks it is served. Only Eduardo approves changes to it (.github/CODEOWNERS).
  • Internal links go through localePath(path, locale), which adds the trailing slash. e2e/languages.spec.ts checks that every page has its twin, the lang, the hreflang links, the header link and the Play links’ lang.
  • A new page needs both files and its words in Spanish from the glossary (docs/glossary-es.md). The privacy page gets a native-speaker or professional review before launch.

Rules pages are generated

lib/rulesets.ts loads both rule sets at build time. Each setting gets one sentence template keyed by its path (for example discardPile.alwaysFrozen). The build fails if a rule set contains a path with no template, so a new house rule cannot ship undocumented. The settings that differ today:

Path Official Family Wording for the table
discardPile.alwaysFrozen false true The discard pile: frozen at times / always frozen
discardPile.takeByAddingToMeld true false Taking the pile by adding its top card to a meld: allowed / not allowed
discardPile.takeWithNaturalAndWild true false Taking the pile with one natural and one wild: allowed / not allowed
wildCanastas.allowed, .bonus false, 0 true, 2000 Canastas of wild cards: not allowed / allowed, 2,000 points
wildCanastas.exactBonuses none 4 jokers + 3 twos: 2,500; 7 twos: 3,000 Special wild canastas
melds.wildsOnNaturalCanasta true false Adding wild cards to a natural canasta: allowed / not allowed
deal.hiddenCardsUnderUpcard 0 4 Cards under the first upcard: none / 4, face down
blackThrees.minToMeld 3 4 Melding black threes: 3 or more / 4 or more

Check each wording against the scenarios in spec/scenarios before publishing; the spec decides.

Copy deck

Use these lines as written unless a fact changes.

  • Tagline: “Card and board games by your family’s rules.”
  • Your rules: “Pick Family or Official rules before the deal. Every difference is listed in plain words.”
  • One table, any device: “The same table on the web, iPhone and Android. Invite family with a link or a short code.”
  • Made for older eyes: “Large text, a four-colour deck and big buttons. Nothing depends on colour alone.”
  • Fourth proof point: TODO(ads). No copy yet. Draft to revisit: “Free to play with ads. Subscribe and they are gone, on every device.”
  • Never colour alone: “Teams have shapes as well as colours. A frozen pile shows an icon and a word. A refused move gets a sentence that names the rule.”
  • A hand that wraps: “A long hand wraps onto a second row. Every card keeps its full corner, so you can always read it.”
  • Typeface: “The game and this site are set in Atkinson Hyperlegible Next, drawn so that similar letters and numbers stay distinct.”
  • Three ways to play: “On your own” (computer players at Easy or Normal, no account) / “With family, online” (send the link or read out the six-character code; sign in with Apple or Google) / “Around one screen” (share one browser and take turns).
  • Founder note: “I built this Canasta game so my family could keep playing by our own house rules from different houses.” The rest is Eduardo’s to write.

Do not claim

Do not write Because Write instead
“Friends join without signing up” Online tables sign players in with Apple or Google “Play the computer with no account. Invite family with a link or a code.”
“Expert AI”, “strong opponents” Computer players are Easy and Normal (spec/bots.md) “Computer players fill the empty seats”
Voice or video chat Only in the phase 2 mockups nothing, until it ships
“Available on the App Store / Google Play” Listings not confirmed Store buttons render only when their URL is set
Any price Not decided /pricing stays unlinked until it is
“No ads”, “no tracking” about the game Non-subscribers will probably see ads, and most ad networks track “Subscribe to remove ads”; a privacy line only once the ad setup is chosen

Accessibility and quality bar

  • WCAG 2.2 AA. Text contrast 4.5:1 (3:1 at 24px and up). Visible focus on everything.
  • Skip link, one h1 per page, landmarks, lang="en", real links and buttons only.
  • Every drawn card or screenshot has a text alternative; decorative SVG is aria-hidden.
  • Works at 200% zoom and at 320px width without horizontal scrolling (rule tables scroll inside their own box).
  • prefers-reduced-motion respected; there is no motion by default anyway.
  • axe run in Playwright on every route, in light and dark, with Large text on and off: zero violations.
  • Performance budget: under 50 KB of JavaScript per page, largest contentful paint under 2s on a mid-range phone, images sized and lazy-loaded.
  • SEO: unique title and description per page, canonical URLs, sitemap.xml, Open Graph images, SoftwareApplication data on /canasta, FAQPage data on /help.

Checkpoints

Open one GitHub issue per item; each is one small PR.

Checkpoint 1: a site that exists

  1. Scaffold site/ (Astro, strict TS), self-hosted font, bin/gen-theme writes the site theme. Done when npm run build passes and a blank page uses the tokens in light and dark.
  2. Base.astro with header, footer and skip link; lib/site.ts. Done when axe passes on the empty layout.
  3. Card, SuitIcon and DisplaySwitches, with persistence. Done when the switches change every card on the page, survive a reload and work by keyboard.
  4. Home page as specified. Done when it matches “Home page, top to bottom” at 1280px and 390px.
  5. /canasta with screenshots from design/screens. Store buttons hidden while their URLs are unset.
  6. /accessibility and /privacy.
  7. site target in bin/test and CI; Playwright axe over all routes.
  8. Deploy: site/ to the main domain, web/ to play..

Checkpoint 2: content that earns search traffic 9. lib/rulesets.ts, /canasta/rules, /canasta/family-rules, with the failing-build guard. 10. /canasta/how-to-play. 11. /help and /about. 12. /blog rendering the build diary in docs/diary/ (its README says how).

Checkpoint 3: launch polish 13. Sitemap, Open Graph images, structured data, 404. 14. Store buttons switched on per store; /pricing once the model is settled. 15. Manual pass with VoiceOver, TalkBack and 200% zoom; fill the bracketed parts of /accessibility and date it.

Checkpoint 4: the suite 16. /games hub and a reusable game-page template; rule rendering moved behind a per-game folder.

Open questions (Eduardo)

  • Domain for Homefelt: homefelt.io, with homefelt.co redirecting to it (decided 2026-11-22).
  • The App Store, Google Play and trademark checks (the name itself is decided). Store listing name: “Homefelt Canasta”, set in App Store Connect and the Play Console; the home-screen name stays “Canasta”.
  • Where the Day 1 and Day 2 posts live: docs/diary/, with the later days (decided 2026-11-22).
  • Contact email for the footer and the accessibility page.
  • The second game, for the “More on the way” card (or leave it unnamed).

TODO: ads and pricing

Nothing about ads, subscriptions or price goes on the site until these are closed. In code and content, mark every affected spot with TODO(ads) so grep -rn "TODO(ads)" site/ finds them all.

Decisions:

  • Confirm the model: free with ads, and a subscription that removes them.
  • Price and billing period.
  • What the subscription includes besides removing ads, if anything.
  • Personalised or non-personalised (contextual) ads. Personalised ads end any “no tracking” claim about the game and change the App Store privacy label.
  • Where ads appear: never during a hand? Only between hands or games?

Copy that waits on them:

  • Fourth proof point on the home page (three ship without it).
  • The privacy line about the game on / and /privacy. The marketing site itself has no ads, scripts or cookies, and may say so now.
  • /pricing, the subscription line on /canasta, and the pricing entries in /help.
  • The “No tracking” proof point on the design canvas (Home A, Home B, phone).