wealth/docs/decisions
Amiram_se bbf84069c9 feat(island,apps): island asset plugin writes hashed fonts and icon sprite
Add withIslandAssets (island tools/asset-plugin) per ADR 0008. On next dev
and next build it builds the svgo sprite from src/icons and copies the
Yekan Bakh fonts into the app's public/ under content-hashed names, puts
their paths in env (NEXT_PUBLIC_ISLAND_*) and serves them with an
immutable Cache-Control. Files are written in headers(), which only Next
calls, because Nx's next plugin also evaluates the config from the
workspace root.

- island env (setEnv/getEnv); Icon reads the sprite path from it
- icon-sprite-plugin becomes icon-name-extraction (IconName type only);
  the committed sprite.svg is removed
- bull and bear register the plugin, validate the paths, pass them to
  island through their bootstraps, and add an optional CDN origin for fonts
- gitignore the generated files; Nx build outputs include them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 11:58:56 +04:00
..
0001-one-platform-shared-by-mobile-and-desktop.md chore: docs 2026-10-04 22:03:42 +04:00
0002-island-layout-and-element-over-native-tags.md chore: docs 2026-10-04 22:03:42 +04:00
0003-semantic-tokens-only-in-theme.md chore: docs 2026-10-04 22:03:42 +04:00
0004-self-hosted-yekan-bakh.md chore: docs 2026-10-04 22:03:42 +04:00
0005-island-components-take-text-as-props.md chore: docs 2026-10-04 22:03:42 +04:00
0006-pnpm-workspaces-and-package-exports.md chore: docs 2026-10-04 22:03:42 +04:00
0007-yekan-bakh-from-public-or-cdn.md feat(island,apps): island asset plugin writes hashed fonts and icon sprite 2026-10-05 11:58:56 +04:00
0008-island-asset-plugin.md feat(island,apps): island asset plugin writes hashed fonts and icon sprite 2026-10-05 11:58:56 +04:00
README.md chore: docs 2026-10-04 22:03:42 +04:00

README.md

Decisions

Design (DDR)

  • 0002 Render every tag through island Element, flex layouts through FlexBox, grid layouts through GridBox; never native JSX tags or flex/grid classes, island included.
  • 0007 Serve Yekan Bakh FaNum (font-sans, all UI text) and Yekan Bakh (font-latin, شبا and bank codes only) as hashed @font-face files from the app's public/fonts/ or our CDN, never next/font.

Architecture (ADR)

  • 0001 Share one platform, platforms/market, between apps/bull and apps/bear; tag all three scope:market.
  • 0008 Register island's asset plugin in each app's next.config; on dev and build it writes hashed fonts and the svgo sprite into public/; the sprite stays same-origin.

Proposed

  • 0003 design: Only semantic tokens, named as in the Lumina Design System, produce Tailwind utilities (@theme inline); primitives stay plain :root variables and Tailwind's defaults are removed.
  • 0005 design: Island holds Lumina's product components and status-to-tone map; they take every text as props (children or labels) and never import i18next or platform code.
  • 0006 architecture: Make every non-app project a pnpm workspace package @lumina/<name> with subpath exports; third-party dependencies stay in the root package.json.