README.md
Decisions
Design (DDR)
- 0002 Render every tag through island
Element, flex layouts throughFlexBox, grid layouts throughGridBox; never native JSX tags orflex/gridclasses, island included. - 0011 Serve Yekan Bakh FaNum (
font-sans, all UI text) and Yekan Bakh (font-latin, شبا and bank codes only) frompublic/fonts/under fixed names declared in islandfonts.css; no version, never hashed, nevernext/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, betweenapps/bullandapps/bear; tag all threescope:market. - 0012 Wrap each app's
next.configin island'swithIconSpriteandwithFontCopy; they writesymbol-defs.svgand the fonts intopublic/unhashed, served immutable; link the sprite as?v=<ICON_SPRITE_VERSION>. - 0013 Render every
(auth)page's steps only in the browser behindGuestGuard: the server sends the frame, a same-size skeleton andnoindex; 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 bynext.config.tstoAPI_INTERNAL_ORIGIN; media URLs use the same path, and the server render calls the gateway directly.
Proposed
- 0003 design: Only semantic tokens, named as in the Lumina Design System, produce Tailwind utilities (
@theme inline); primitives stay plain:rootvariables 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 (
childrenorlabels) and never import i18next or platform code. - 0006 architecture: Make every non-app project a pnpm workspace package
@lumina/<name>with subpathexports; third-party dependencies stay in the root package.json. - 0014 architecture: Serve registration step 5 under
(onboarding)behindAuthGuard; a creator's profile autosaves as a server draft (PATCH) and completes only throughPOST …/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, withOnboardingGuardin those routes' layouts andGuestGuard. - 0017 architecture: Give every auth and onboarding route its own
loading.tsxmatching its frame; an index route with nested steps sits in its own route group. - 0020 architecture: Server-rendered platform organisms take their text as
labelsbuilt by the app's template from its server i18n; client organisms useuseTranslation. - 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
@modalintercept of /compose/post; slots are emptied by explicit null pages, never a catch-all, and a hard load gets the full page. - 0024 architecture:
/(خانه) is the investor's feed, read only in the browser with the session behind a same-size skeleton; a guest goes to login with a return to/, a creator to their own channel. - 0025 architecture: The investor's داشبورد is a tabbed section, one route per tab in
dashboard/(investor), whose layout holds the top bar or heading andDashboardTabs; each tab has its own loading.