wealth/docs/decisions
Amiram_se 495f800f1f docs(decisions): record 0026–0028, supersede 0024
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:02:58 +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 docs(decisions): fixed-name fonts and sprite versioned in its link 2026-10-05 19:00:46 +04:00
0008-island-asset-plugin.md docs(decisions): fixed-name fonts and sprite versioned in its link 2026-10-05 19:00:46 +04:00
0009-versioned-yekan-bakh-never-hashed.md docs(decisions): fixed-name fonts and sprite versioned in its link 2026-10-05 19:00:46 +04:00
0010-island-sprite-and-font-plugins.md docs(decisions): fixed-name fonts and sprite versioned in its link 2026-10-05 19:00:46 +04:00
0011-yekan-bakh-under-fixed-names.md docs(decisions): fixed-name fonts and sprite versioned in its link 2026-10-05 19:00:46 +04:00
0012-sprite-version-in-link.md docs(decisions): fixed-name fonts and sprite versioned in its link 2026-10-05 19:00:46 +04:00
0013-auth-pages-render-in-the-browser.md docs(decisions): auth pages render in the browser 2026-10-05 20:06:42 +04:00
0014-registration-step-5-on-the-session.md docs(decisions): propose 0014, registration step 5 on the session 2026-10-05 22:33:00 +04:00
0015-a-view-with-its-own-frame-gets-its-own-route.md docs(decisions): record 0015–0019 2026-10-06 21:47:26 +04:00
0016-unfinished-creators-stay-on-step-5.md docs(decisions): record 0015–0019 2026-10-06 21:47:26 +04:00
0017-each-step-owns-its-loading-skeleton.md docs(decisions): record 0015–0019 2026-10-06 21:47:26 +04:00
0018-browser-calls-the-api-through-a-next-rewrite.md docs(decisions): record 0015–0019 2026-10-06 21:47:26 +04:00
0019-every-toast-closes-by-itself.md docs(decisions): clarify 0019, island's Toast runs the clock 2026-10-06 22:42:11 +04:00
0020-server-organisms-take-labels-from-the-app.md docs(decisions): record 0020–0025 2026-10-07 20:29:33 +04:00
0021-channel-feed-starts-from-the-server-page.md docs(decisions): record 0020–0025 2026-10-07 20:29:33 +04:00
0022-post-rules-live-in-the-api.md docs(decisions): record 0020–0025 2026-10-07 20:29:33 +04:00
0023-desktop-composer-is-an-intercepted-dialog.md docs(decisions): record 0020–0025 2026-10-07 20:29:33 +04:00
0024-home-is-the-investors-browser-feed.md docs(decisions): record 0026–0028, supersede 0024 2026-10-07 23:02:58 +04:00
0025-investor-dashboard-is-a-tabbed-section.md docs(decisions): record 0020–0025 2026-10-07 20:29:33 +04:00
0026-landing-is-prerendered.md docs(decisions): record 0026–0028, supersede 0024 2026-10-07 23:02:58 +04:00
0027-feed-at-feed-landing-redirects-in-browser.md docs(decisions): record 0026–0028, supersede 0024 2026-10-07 23:02:58 +04:00
0028-landing-only-tokens.md docs(decisions): record 0026–0028, supersede 0024 2026-10-07 23:02:58 +04:00
README.md docs(decisions): record 0026–0028, supersede 0024 2026-10-07 23:02:58 +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.
  • 0011 Serve Yekan Bakh FaNum (font-sans, all UI text) and Yekan Bakh (font-latin, شبا and bank codes only) from public/fonts/ under fixed names declared in island fonts.css; no version, never hashed, never next/font; a changed font gets a new name.
  • 0019 Close every toast by itself: success and info after 4 s (6 with an action), errors after 8 s (10 with an action); hovering, focus or a hidden tab pauses it; callers never pass duration: Infinity.

Architecture (ADR)

  • 0001 Share one platform, platforms/market, between apps/bull and apps/bear; tag all three scope:market.
  • 0012 Wrap each app's next.config in island's withIconSprite and withFontCopy; they write symbol-defs.svg and the fonts into public/ unhashed, served immutable; link the sprite as ?v=<ICON_SPRITE_VERSION>.
  • 0013 Render every (auth) page's steps only in the browser behind GuestGuard: the server sends the frame, a same-size skeleton and noindex; flow state stays in memory, never in the URL or storage.
  • 0018 Call the API from the browser only on the app's own origin under /api, rewritten by next.config.ts to API_INTERNAL_ORIGIN; media URLs use the same path, and the server render calls the gateway directly.
  • 0026 Prerender the landing (/) with force-static and revalidate = 600; every other route keeps force-dynamic in its route group's layout, never the root's.
  • 0027 Serve خانه at /feed and the landing at /; send a signed-in visitor of / to homeRoute in the browser with LandingRedirect, never in a proxy.

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.
  • 0014 architecture: Serve registration step 5 under (onboarding) behind AuthGuard; a creator's profile autosaves as a server draft (PATCH) and completes only through POST …/profile/complete.
  • 0015 architecture: Serve a login or onboarding view whose frame differs from its step on its own route (/auth/login/suspended, /onboarding/creator-profile/done); browser-only data stays in memory.
  • 0016 architecture: Keep a creator who hasn't finished step 5 out of publishing and pricing through the session's needsProfile, with OnboardingGuard in those routes' layouts and GuestGuard.
  • 0017 architecture: Give every auth and onboarding route its own loading.tsx matching its frame; an index route with nested steps sits in its own route group.
  • 0020 architecture: Server-rendered platform organisms take their text as labels built by the app's template from its server i18n; client organisms use useTranslation.
  • 0021 architecture: A channel's feed and post page start from the server's read as query initialData, re-read in the browser for the creator or a subscriber, and update in place after mutations.
  • 0022 architecture: The API enforces post rules (2000 characters, four JPG/PNG/WebP images of 5 MB, 15-minute edit window, approved creators only); the composer mirrors them in POST_LIMITS.
  • 0023 architecture: On desktop «پست جدید» is a dialog over the page through bear's @modal intercept of /compose/post; slots are emptied by explicit null pages, never a catch-all, and a hard load gets the full page.
  • 0025 architecture: The investor's داشبورد is a tabbed section, one route per tab in dashboard/(investor), whose layout holds the top bar or heading and DashboardTabs; each tab has its own loading.
  • 0028 design: Landing-only island tokens: tablet (720px, the landing's grids only), hero and section type, container-page and image-shade.