Commit Graph

110 Commits

Author SHA1 Message Date
Amiram_se 000c42bd74 feat(apps): creator plans, finance and pricing routes in bull and bear
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:11:12 +04:00
Amiram_se 163005429d feat(market): creator dashboard plans and finance, pricing form with promotions, payout account and ledger
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:11:12 +04:00
Amiram_se db0fa7c86e feat(island,tools): select, switch, info tip, jalali date helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 16:11:12 +04:00
Amiram_se 381e01e030 docs(decisions): record 0029–0033
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:36:22 +04:00
Amiram_se 3b8c95a94e feat(apps): checkout, payment, subscriptions, transactions and notifications routes in bull and bear
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:36:22 +04:00
Amiram_se 49372bc77e feat(market): checkout, payment return and result, investor subscriptions and transactions, notification centre
Checkout draft store survives the bank round trip; the app shell settles an
abandoned payment on return. Renewal sheet lists periods as tier options.
Notification bell opens the centre as a panel on desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:36:22 +04:00
Amiram_se a668b17590 feat(island): count badge, date time, detail row, filter chips, spinner sizes, carousel nav buttons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:36:22 +04:00
Amiram_se b85b05861f feat: update skill 2026-10-08 22:29:56 +04:00
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
Amiram_se 45c5551e18 feat(apps): prerendered landing at / and خانه at /feed in bull and bear
- `(landing)` route with `force-static` and `revalidate = 600`, its
  loading and error pages, the hero image and LandingRedirect (0026, 0027).
- `force-dynamic` moves from the root layouts to each route group's
  layout, so every other route still renders per request.
- The feed moves from `(main)/(home)` to `(main)/feed`, with bear's
  empty `@modal` page.
- Auth frames' brand goes to the landing, onboarding's to خانه.
- Server bootstrap adds the server-only translations; server env reads
  `NEXT_PHASE` for the build-time fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:02:58 +04:00
Amiram_se ba673f4a28 feat(market): landing page, featured analysts, home moves to /feed
- Landing screens for `/`: header, hero, trust strip, markets tabs,
  featured analysts carousel, track record, steps, plans, for analysts,
  FAQ, closing call to action and footer, composed by LandingTemplate
  with labels built from the server's translations.
- Featured analysts read (`/creators/featured`) with a cache and
  `loadLandingPage`: 404 and 403 hide the section, other failures hide
  it at build time and throw at a revalidation.
- `ROUTES.home` is now `/feed` and `ROUTES.landing` is `/`; `homeRoute`
  and `useHomeHref` decide where a viewer belongs, used by the brands,
  back, HomeGuard and LandingRedirect.
- Registration step 1 pre-selects the account type from `?role=` once,
  then drops it from the address.
- The `landing` namespace is server-only (SERVER_RESOURCES).
- Landing metadata and FAQPage JSON-LD helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:02:58 +04:00
Amiram_se 2be04f9d1d feat(island): landing type, tokens, section heading, sample frame, fact card
Add the landing's own display type (hero and section Typography variants),
a page container, an image shade and a 720px tablet breakpoint used only by
the landing's grids (0028). Add three domain-free molecules the landing
shares: SectionHeading, SampleFrame (real components with made-up data,
inert and labelled) and FactCard.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 23:02:58 +04:00
Amiram_se 9877d7bf14 docs(decisions): record 0020–0025
0020 server organisms take labels from the app, 0021 the channel feed starts from the server page, 0022 post rules live in the API, 0023 the desktop composer is an intercepted dialog (publishing over the own channel goes back), 0024 home is the investor's browser feed, 0025 the investor's dashboard is a tabbed section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:29:33 +04:00
Amiram_se 7949eb0d64 feat(market): channel, posts, composer, home feed and following
The creator's channel and post pages, the post composer, the investor's home feed and the following tab, in bull and bear.

- Channel and post page start from the server's read and re-read in the browser for the creator or a subscriber; locked posts show a gate only once the viewer and their standing are known, frozen for another creator.
- Composer: text and up to four images uploaded as picked, free or premium, a device draft that keeps stored file URLs, 15-minute edit of a published post; on desktop a dialog over the page through bear's @modal intercept.
- Owner actions: preview as a visitor or subscriber, edit, delete (dialogs locked while sending), close a prediction with the outcome the API recorded.
- Follow and unfollow run in tap order; the home feed dates posts from its last read; paged lists read past pages with nothing to show.
- Cache stays true after mutations: a delete re-reads the channel's offset pages, a new post resets them, and a post page delete navigates without a stale refresh.
- Navigation: bottom nav, mobile top bar, desktop header and publish menu; the preview chrome only for the creator's own post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:29:33 +04:00
Amiram_se 88384fa72d feat(island): post card access and share, action menu, tab links, segmented choice
Island pieces for the channel, post page, composer and dashboard.

- New molecules: ActionMenu (links or actions in a popover), TabLinks (route tabs), SegmentedChoice.
- PostCard: owner footer, share menu on desktop, access note for an open premium post, frozen CTA reason on a locked one.
- LockedTeaser keeps the gate's place while the viewer is unknown; Modal gains sizes; Lightbox and skeleton presets for feeds and headers.
- Button: `pressableWhenFrozen`, a frozen look whose press still calls onClick (explain or check instead of a tooltip).
- TextInput counts UTF-16 units, as the native maxLength does, so the counter reaches the limit with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:29:33 +04:00
Amiram_se 636430640d docs(decisions): clarify 0019, island's Toast runs the clock
Sonner 2 doesn't pause on focus, so island's Toast runs the clock and sonner only places the toast. The index line now says focus pauses a toast and that callers never pass duration Infinity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:42:11 +04:00
Amiram_se f4e9febad7 feat(island): toast close button, own motion and clock, one at a time
Toast follows the updated Lumina design system.

- ✕ «بستن اعلان» on every toast shown by showToast: 44px, its hit area reaching into the padding; the label comes from the Toaster's new `closeLabel`.
- Motion: in over 200ms (rise 16px, fade in), out over 160ms (drop 8px, fade out); reduced motion keeps a plain 120ms fade. The entrance plays once, even when the region moves into a dialog.
- Text wraps evenly; with an action, text past two lines moves the action under it, measured again when the width changes.
- Toast runs its own clock (sonner gets duration Infinity): it pauses while a pointer is on the region (hover, press, hold, swipe), while keyboard focus is inside it, and while the tab is hidden.
- One toast at a time: a new one replaces the old; while keyboard focus is in the region it waits until focus leaves. Every toast gets a fresh id, so `showToast` drops its `id` option.
- The Toaster slot overrides sonner's slide and stack with inline style instead of !important, and `toastOptions` is no longer a prop.
- market: AppShell passes `closeLabel`; showActionError no longer passes an id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:42:11 +04:00
Amiram_se 9ea17684ad docs(decisions): record 0015–0019
0015 own route for a view with its own frame, 0016 needsProfile and OnboardingGuard, 0017 a loading skeleton per step (proposed); 0018 the /api rewrite and 0019 toasts close by themselves (accepted).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:47:26 +04:00
Amiram_se cb0891c77c feat(market): complete entering and onboarding
Login, registration steps 1–4 and step 5 now follow the design (S6, R2-Register, R2-CompleteProfile).

- Login: hourly code limit and blocks open the code step with their wait; wrong-code message no longer replaced while retyping; suspended screen on its own route with the admin's reason; «log in to subscribe» variant.
- Registration: focus on the first card or empty upload box; typed number kept; «تمدید زمان» renews the token; live username check with ✓; leave prompt for in-app links; creator ID accepts PDF and maps server field errors.
- Step 5: square photo crop, stricter link rules, done screen on its own route; the session's `needsProfile` keeps unfinished creators out of publishing and pricing (OnboardingGuard) and sends them back to step 5 at login.
- Every auth and onboarding route has its own loading skeleton matching its frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:47:26 +04:00
Amiram_se ed6ddc05b1 feat(apps): call the API through a same-origin /api rewrite
- next.config rewrites /api/:path* to API_INTERNAL_ORIGIN, with a 120 s proxy timeout for uploads; NEXT_PUBLIC_API_ORIGIN is gone.
- The browser HTTP base is /api/v1; media, avatars and uploads load through /api (market env `apiBaseUrl`), so private media gets the session cookie.
- toApiUrl keeps a narrow rule for uploads stored with a host before the back end stored paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:47:18 +04:00
Amiram_se 0e8347d6d3 refactor(libs): share the origin env schema
`origin` (scheme and host only) lives in @lumina/libs/env, so the apps stop repeating it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:47:18 +04:00
Amiram_se 297f0b2cbd feat(island): focusable choice cards and file fields, state skeleton, timed toasts
- ChoiceCard and FileField forward a ref to their real input, so a form can move focus to the first empty card or upload box.
- SkeletonPreset gains a `state` preset (art, heading, line, action).
- Every toast closes by itself: errors after 8 s (10 with an action), others after 4 s (6 with an action).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 21:47:18 +04:00
Amiram_se cfa8cce1b0 refactor: code review 2026-10-06 17:12:50 +04:00
Amiram_se dc221f50bf chore(apps): run bull on 7000 and bear on 7001; ignore server-proxy.js
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:33:12 +04:00
Amiram_se 0d2528d66f docs(decisions): propose 0014, registration step 5 on the session
Step 5 runs under (onboarding) behind AuthGuard; a creator's profile
autosaves as a server draft and completes only through
POST /traders/me/profile/complete.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:33:00 +04:00
Amiram_se a6e6eddc94 feat(apps): registration step 5 pages in bull and bear
Add /onboarding/creator-profile and /onboarding/investor-profile to both
apps, with the group's loading skeleton. Each page renders its frame on the
server and its step only in the browser behind AuthGuard for its role, with
noindex. bull uses the mobile top bar and column; bear the desktop header,
with the creator's form card beside its live preview (AuthTemplate
`framed={false}`) and the investor in the 560 card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:33:00 +04:00
Amiram_se 436695ae0b feat(market): registration step 5, profile completion
Creator (required, resumable) and investor (optional) profile steps, on the
session after registration step 4.

- Profile repository: `saveDraft` (PATCH /traders/me/profile, markets may be
  empty) and `complete` (POST /traders/me/profile/complete).
- Account repository: avatar upload and removal, `interests`; the account
  payload carries `avatarUrl` and `interests`.
- Actions: completeCreatorProfile (saves the form, then completes; emits
  `profile.complete`) and saveInvestorProfile (photo with progress, then
  markets; emits `auth.profile-saved`).
- Creator models: the page (form from the saved draft, links field array,
  submit), autosave (1 s after typing and on blur, one save at a time, never
  after completion), the photo part (uploads on pick, failed state with retry)
  and the live preview.
- Investor model: photo and markets saved on «ذخیره و ورود», «بعداً» skips;
  both land on ?redirect= or home with the welcome toast.
- The auth-flow store remembers the role registered in this tab, so step 5
  shows the resume banner only after a login or a reload.
- Validations: photo, bio, link rows per platform, markets, consent.
  Utils: social link handle and URL mapping, market toggle. PROFILE_LIMITS
  moves to shared/validations.
- Screens: CreatorProfileStep (mobile column with a preview sheet, desktop
  card beside a sticky preview, end-of-registration view) with its skeleton,
  and InvestorProfileStep.
- Copy for step 5 in the auth namespace; market and status labels in common.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:33:00 +04:00
Amiram_se 9216bc8177 feat(island,tools): form pieces for the profile step
- Atoms: Chip (toggle with aria-pressed), Checkbox, FieldError (alert line
  under a group), LinkButton (a button that looks like a link; SupportLink now
  uses it), RowButton (56px choice row for sheets), and a 96px Avatar size.
- Molecules: ChipGroup (named fieldset of chips with its error), FormSection
  (titled form part with an optional marker and hint), AvatarField (photo
  pick, change, remove, upload progress, failed state with retry).
- Dialog, Sheet and Modal take `onExited`, called once the dialog has left
  the top layer. The page is inert until then, so focus moves there.
- tools/format: `time()` for a time of day in Tehran (`14:05`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:32:43 +04:00
Amiram_se f5e0ffb668 chore(lint): check ARIA roles on DOM elements only
AuthGuard and RegisterProgress take the account type as a `role` prop
(`role="creator"`), which jsx-a11y/aria-role read as an invalid ARIA role.
`ignoreNonDOM` keeps the rule for real elements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:32:43 +04:00
Amiram_se 02e543d95d refactor(market,apps): share the registration frame with onboarding
Registration step 5 lives under (onboarding), so the pieces both route groups
use move to the nearest level they share. No behavior change.

- SupportEntry and RegisterProgress move from screens/(auth) to
  screens/organisms.
- bull's AuthTopBar and both apps' AuthTemplate move from the (auth) group to
  the app root's organisms/ and templates/.
- MARKETS and Market move from the profile feature to shared/constants, so
  features other than profile (the investor's interests) can use them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:32:05 +04:00
Amiram_se 46958936dc chore: doc 2026-10-05 20:14:24 +04:00
Amiram_se 7d381758ab docs(decisions): auth pages render in the browser
Record 0013: every (auth) page renders its steps only in the browser behind
GuestGuard, the server sends the frame, a same-size skeleton and noindex,
and the flow's state stays in memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:06:42 +04:00
Amiram_se fbb3a59677 feat(apps): login and registration pages in bull and bear
Add /auth/login, /auth/login/verify and /auth/register (type, phone, verify,
details) to both apps, with each group's loading skeleton. bull renders the
mobile top bar and column; bear the desktop header and centred card. Each
page renders its frame on the server and its step only in the browser behind
GuestGuard, with noindex metadata.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:06:42 +04:00
Amiram_se d43e74237f feat(market): login and registration flow
- auth-flow store: the number, code timing, misses, block, registration
  token and step-4 draft, in memory only (never URL, cookie or storage).
- Auth repository maps the gateway's English error text to codes and
  Persian copy (AUTH_ERROR_CODES, AUTH_ERROR_COPY, blockEndOf).
- Actions: sendCode, verifyRegistrationCode; login turns a suspended
  account away and closes its session; register actions reset the flow and
  creator registration reports upload progress and can be cancelled.
- Models: shared code step (wrong/expired codes, 3-miss block, resend),
  login, login verify (landing per role and unfinished creator profile),
  registration type, phone, verify and details (token warning and halt,
  investor and creator parts).
- Screens under (auth): support entry, code step, login, login verify with
  the suspended notice, registration progress and steps 1-4.
- Navigation: auth routes, withReturnPath and useAuthRoutes; GuestGuard keeps
  the page through its own sign-in.
- Shared: valibot auth schemas (phone, code, names, username, national ID,
  ID card image), showActionError, applyServerErrors, translateMessage,
  mobile helpers, and the `auth` locale namespace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:06:42 +04:00
Amiram_se 025c68dd0d feat(island): file field, form skeleton, toast details and link start icon
- FileField molecule: one file for a form, with a picker box, thumbnail,
  name, size, remove button, inline error and upload progress.
- SkeletonPreset gains a `form` preset (heading, n fields, button, link).
- Toast takes a second `description` line; showToast takes a stable `id`,
  so a repeated failure replaces its toast instead of stacking.
- Link takes a leading `iconStart`, such as edit before «ویرایش شماره».

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:06:42 +04:00
Amiram_se 64048e8224 fix(apps): render every request fresh in both root layouts
Declare `dynamic = 'force-dynamic'` in the bull and bear root layouts, so no
page is prerendered or cached on the server, as the no-server-cache rule asks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 20:06:42 +04:00
Amiram_se dcf99e6fa5 chore(skill): fixed-name fonts and an icon sprite versioned in its link
Fonts and symbol-defs.svg keep fixed names that no build step hashes,
served immutable from each app's public/. Fonts have no version; the
sprite is linked as symbol-defs.svg?v=<N>, and every sprite change
raises ICON_SPRITE_VERSION in the same commit. Documents
font-copy-plugin, fonts.css with root paths, CRITICAL_FONT_URL, and the
matching review and Definition of Done checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:01:39 +04:00
Amiram_se 1136e55ebf chore(skill): forbid hard-coded env values
No project hard-codes a value that changes between environments: no
literal address, key, ID or flag, no fallback, and no schema default.
Every env value comes from the .env of the app that serves it, and only
apps have .env files. Adds the rule to the env lib spec, the env flow,
the refactoring smells, and the Definition of Done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:01:39 +04:00
Amiram_se 60b62d98db docs(decisions): fixed-name fonts and sprite versioned in its link
- 0009 and 0010 versioned the file names; both are now superseded.
- 0011: fonts keep fixed names with no version; a changed font ships
  under a new name.
- 0012: the sprite stays symbol-defs.svg, linked with ?v=<N>, written by
  icon-sprite-plugin and font-copy-plugin.
- 0007 and 0008 are marked superseded, and the index lists 0011 and 0012.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:00:46 +04:00
Amiram_se 86944adb97 feat(island,apps): serve fonts and icon sprite under fixed names
Replace the hashing asset plugin with two build-time plugins that never
rename their files, so an unchanged font or sprite stays in every
visitor's cache across deploys (0011, 0012):

- icon-sprite-plugin builds icons/*.svg with svgo into
  public/icons/symbol-defs.svg. The Icon atom links it as
  symbol-defs.svg?v=<ICON_SPRITE_VERSION>; the file's first line stamps
  its version, so dev warns when the sprite changes without a bump.
- font-copy-plugin copies island fonts/ byte for byte into public/fonts/
  and warns when a font changes under its old name.
- island fonts.css declares both Yekan Bakh faces with root paths and a
  fallback face; theme.css points font-sans and font-latin at them.
- Root layouts preload CRITICAL_FONT_URL. next/font is gone.
- Both apps serve /fonts and /icons as immutable.
- island env, the apps' island-env bootstrap, NEXT_PUBLIC_ISLAND_* and
  NEXT_PUBLIC_CDN_ORIGIN are removed; paths live in island constants.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:00:46 +04:00
Amiram_se dc229a3949 refactor(market,apps): share PageError from market screens
Both apps had their own copy of the page error boundary. It now lives
once in platforms/market/src/app/screens/organisms/page-error, and every
route group's error.tsx re-exports it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:00:28 +04:00
Amiram_se 0bee35290d refactor(island): move dialog to atoms, modal and sheet to molecules
Imports and the root index follow the new paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:00:28 +04:00
Amiram_se 605feabb40 chore: update skill 2026-10-05 13:27:31 +04:00
Amiram_se 79304d1009 chore: update skill 2026-10-05 12:48:39 +04:00
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
Amiram_se aafac927bf refactor(market,apps): drop the session proxy and restore auth in the browser
The server render no longer depends on auth: it reads no session and
forwards only FORWARDED_COOKIES (none today), so every visitor of a URL
gets the same HTML and the Next.js proxy is no longer needed.

- Remove proxy.ts from bull and bear, the app/session module, the
  server auth and role guards, and the server caches that read the
  viewer's own data. Public caches stay: channel, post, prediction stats.
- Add an auth store (status unknown | guest | member) filled by the
  restoreSession action, which reads GET /auth/session once per load
  from the AppShell's useSession hook.
- Login and register actions set the store, logout clears it; the
  AppShell clears the query cache on auth.logout. No router.refresh.
- Add client AuthGuard (fallback, optional role) and GuestGuard, with
  safeReturnPath limiting post-login redirects to same-site paths.
- readOnServer no longer redirects on 401.
- The browser HTTP client refreshes against AUTH_ENDPOINTS.refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 22:28:05 +04:00
Amiram_se 9de000f3d2 chore: docs 2026-10-04 22:03:42 +04:00
Amiram_se 2f0e1d12f8 feat: update skill 2026-10-04 21:53:48 +04:00
Amiram_se c251633246 feat(apps): bootstrap, env, i18n, providers, error pages and session proxy
- env validated with the env lib (NEXT_PUBLIC_API_ORIGIN, API_INTERNAL_ORIGIN,
  site URL, support config); .env.example per app
- client bootstrap: API base under /v1, one shared session refresh, error
  mapping; server bootstrap: cookie forwarding for server renders
- i18n instance for the server, bound to react-i18next on the client
- root layout, AppProviders, global-error, not-found and a page boundary in
  every route group; instrumentation reports uncaught server errors
- proxy.ts refreshes an expired session before rendering

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 21:33:07 +04:00
Amiram_se a483fc0767 feat(market): app foundation, session handling and feature data layer
Foundation
- AppShell: query client, i18n, connection bar (NetworkBoundary), toast region,
  and reactions to sign-in and sign-out
- error boundaries: ErrorFallback, PartBoundary (catchError), StatusEmptyState,
  readOnServer
- typed ROUTES, platform env (API origin, support config), Persian locales
  (common, errors) with typed i18next keys
- mapApiErrorBody adapts the gateway's error envelope; shared utils for E.164
  phones, API URLs and field-error renames
- session: refreshSessionInProxy renews an expired cookie session before render
- guards: requireAccount, redirectIfSignedIn, requireRole

Data layer (entities, repositories with mappers, query keys, server caches)
- auth (with login, logout and registration actions), profile, channel, follow,
  notification, post, prediction, feed, pricing, checkout, subscription,
  transaction, overview, finance
- shared domain enums live in shared/constants

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 21:33:07 +04:00