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.
- Plan with the reasoning: https://claude.ai/artifact/QHMRdF7vrpbv9G2SjvFiKZ
- Design canvas (Home A, Home C, game page, accessibility page, phone): https://claude.ai/artifact/VJv5vPojUKkkyTAz6k2QTR
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 whileweb/uses 7: Astro’s type checker (@astrojs/check,npm run typecheck) accepts only TypeScript 5 or 6, and a TypeScript 7 bump breaksnpm ci(#122)..github/dependabot.ymlignores TypeScript majors in/site. When@astrojs/checklists TypeScript 7 as a peer, bumpsite/package.jsonto^7, drop that ignore, and runbin/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-themeto also writesite/src/theme.generated.cssfromdesign/tokens.json, with the same custom-property names asweb/src/theme.generated.css. Never hard-code a colour insite/; use the properties. - Cards are drawn in CSS and SVG as
web/src/CardViews.tsxdoes (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(defaulthttps://play.homefelt.io; each Play button opens its game there,playGameUrl("canasta")=/canasta),PUBLIC_APP_STORE_URLandPUBLIC_GOOGLE_PLAY_URL(unset = that store button is not rendered). - Hosting. Two Vercel projects from this repo:
site/at the main domain,web/atplay.. The game host must keep answering/online,/join/*and/table/*withindex.html(web/README.md). Set-up and checks: docs/deploy.md. - Security headers (#251).
vercel.jsonsends HSTS,nosniff, a referrer policy, a permissions policy,X-Frame-Options: DENYand a Content Security Policy, for now asContent-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 invercel.jsonmust change too:e2e/security.spec.tsfails until it does, and loads every page with the policy enforced. HSTS carriesincludeSubDomains: every subdomain is served over TLS,play.anddocs.by Vercel andapi.by Fly.io. It is not preloaded. Enforcing the policy waits for #270. bin/testgains asitetarget:npm ci && npm run typecheck && npm run build && npm run e2e, plus a link check overdist/. 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 usescolor.dark, chosen byprefers-color-scheme. The felt stays green in both. - Primary button:
brassbackground,onBrasstext, radius 12 to 14px, at least 48px tall. Secondary on felt: 2pxonFeltoutline. - 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-pressedand 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 witharia-pressed, insiderole="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
- Header (feltDeep): wordmark “Homefelt”; nav Games, How to play, Accessibility, About; brass “Play Canasta”.
- 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. - 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”.
- 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. - The games: a felt card for Canasta (Web, iPhone, Android chips; “Play Canasta”) and a dashed “More on the way” card.
- Founder note (surface, 760px): “Built for one family first”, signed “Eduardo, founder”, link to the build diary.
- 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.astrosets<html lang>, ahreflanglink foren,esandx-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’strailingSlash: "always"withbuild.format: "directory", andvercel.json’strailingSlash: true, which redirects/canastathere. Canonical andhreflangURLs use it;e2e/urls.spec.tschecks it. - The site also serves the apps’ update and sunset feed,
public/app-status/v1.json, athttps://homefelt.io/app-status/v1.json(docs/plans/app-messaging.md). Vercel’strailingSlashleaves paths with a file extension alone.vercel.jsongives/app-status/its JSON type, a 60-second cache,Access-Control-Allow-Origin: *andnosniff;bin/test sitechecks the file againstspec/app-status/, ande2e/app-status.spec.tschecks 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.tschecks that every page has its twin, thelang, thehreflanglinks, 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
h1per 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-motionrespected; 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,SoftwareApplicationdata on/canasta,FAQPagedata on/help.
Checkpoints
Open one GitHub issue per item; each is one small PR.
Checkpoint 1: a site that exists
- Scaffold
site/(Astro, strict TS), self-hosted font,bin/gen-themewrites the site theme. Done whennpm run buildpasses and a blank page uses the tokens in light and dark. Base.astrowith header, footer and skip link;lib/site.ts. Done when axe passes on the empty layout.Card,SuitIconandDisplaySwitches, with persistence. Done when the switches change every card on the page, survive a reload and work by keyboard.- Home page as specified. Done when it matches “Home page, top to bottom” at 1280px and 390px.
/canastawith screenshots fromdesign/screens. Store buttons hidden while their URLs are unset./accessibilityand/privacy.sitetarget inbin/testand CI; Playwright axe over all routes.- Deploy:
site/to the main domain,web/toplay..
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, withhomefelt.coredirecting 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).