type: decision
status: active
timestamp: 2026-06-21
tags: [architecture, chrome, components, config, design, legal, pnpm, workspace]

Chrome contract — @chirag127/astro-chrome v0.1

4 per-site config files drive generic components, 3-level contract \ sidebar (Section \u2192 Group \u2192 Leaf); shared Datasheet Dark tokens across\ \ every site (no per-site accent); Iosevka wordmark stamp (slug-only, no ORIZ prefix);\ \ 24 auto-generated legal pages; pnpm workspace at the workspace umbrella root."

Chrome contract — @chirag127/astro-chrome v0.1

Decision

The shared visual chrome (Header, Sidebar, BottomBar, Footer, Stamp, SEO, Auth, Analytics, Consent, 24 legal pages) lives in @chirag127/astro-chrome. Every site shares the SAME components. Per-site differences come from 4 config files in src/config/. Zero component duplication across the family.

Component model — GENERIC + CONFIG-driven

Components in astro-chrome/src/components/:

Components read everything from import { site, nav, sidebar, footer } from '~/config'. Every site has identical chrome at the component level. Differences are content, not code.

3-level sidebar shape

SECTION (uppercase eyebrow label, non-clickable)
  GROUP (clickable title ? /<group>/ overview page; chevron ? collapse)
    LEAF (link to sub-page)

4 per-site config files

Each site has 4 small config files in src/config/:

FileExportsPurpose
site.tssiteName, siteRole, subdomain, brand, jurisdictionIdentity, used by Stamp + legal pages
nav.tsheaderActions[]Header right-side actions (search, auth)
sidebar.tssidebarTree: SidebarNode[]3-level sidebar tree
footer.tscolumns[], familyDirectory[]Footer two-column content
index.tsbarrel re-exportOne-import for components

Total per-site config: ~40 lines. New site = clone starter + edit config + run pnpm build.

Shared theme — Datasheet Dark family-wide

Tokens locked in @chirag127/astro-chrome/src/tokens.css. NO per-site accent. Every site uses the same --ink-*, --paper-*, --stamp values. Family identity comes from the shared visual language; per-site identity comes from CONTENT (wordmark text, sidebar tree, footer columns). See design/datasheet-dark.md.

Auth UX

Analytics defaults

ALL 5 tools ON in production: CFWA + Sentry + PostHog + Clarity + GA4. ALL 5 OFF in pnpm dev (devmode). Kill-switch per-tool via ENABLE_<TOOL>=false env var. CFWA always-on regardless (it’s cookieless + GDPR-safe).

Error handling

JS-disabled fallback

Motion budget

Microcopy voice

Per the frontend-design skill’s writing section. Authored copy is design material, not decoration.

Accessibility floor — WCAG 2.2 AA

Performance budget

No fixed bundle-size budget (per latest user direction). Lighthouse Performance score = 80 in CI is the floor. Sites that need more JS budget for heavy WASM (pdf-tools, image-tools, video-tools, audio-tools) are not blocked by an absolute KB cap.

Search — hybrid Algolia + Pagefind + MultiSearch

Two surfaces in the search popover: “this site” (Pagefind/Algolia) and “the web” (MultiSearch).

All 24 ship in astro-chrome/src/legal/ as Astro components with {site.brand} / {site.subdomain} / {site.jurisdiction} placeholders. Hand-written templates (NOT paid Termly/iubenda). Text references analytics + auth + monetization SDKs auto-fetched from <site>/package.json.

Slugs: privacy, terms, cookies, imprint, refund, sub-processors, dpa, gdpr-rights, ccpa-rights, dpdp-rights, accessibility, security, vulnerability, dmca, trademark, attribution, community, takedown, age-gating, affiliate-disclosure, ad-disclosure, sponsored, changelog, status.

Privacy text auto-updates when site package.json deps change. Updates require a chrome version bump + family-wide pnpm update --recursive.

Shared package consumption — pnpm workspace

pnpm-workspace.yaml lives at the existing chirag127/workspace umbrella root. Workspace members:

pnpm install from workspace root installs everything with hoisted deps. Edit a shared package ? changes hot-reload in every consumer site. Published to npm on tag.

Cross-refs


Edit on GitHub · Back to index