Go to file
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
.claude feat: update skill 2026-10-04 21:53:48 +04:00
apps refactor(market,apps): drop the session proxy and restore auth in the browser 2026-10-04 22:28:05 +04:00
docs/decisions chore: docs 2026-10-04 22:03:42 +04:00
packages feat(libs,island): carry API error details and let fallbacks focus their heading 2026-10-04 21:33:07 +04:00
platforms/market refactor(market,apps): drop the session proxy and restore auth in the browser 2026-10-04 22:28:05 +04:00
tools/generators feat: scaffold 2026-10-02 18:19:11 +04:00
.gitignore feat: libs, tools 2026-10-02 19:42:11 +04:00
.ignore feat: scaffold 2026-10-02 18:19:11 +04:00
.oxlintrc.json feat: scaffold 2026-10-02 18:19:11 +04:00
.prettierignore feat: scaffold 2026-10-02 18:19:11 +04:00
.prettierrc feat: scaffold 2026-10-02 18:19:11 +04:00
CLAUDE.md chore: nx init 2026-10-02 17:46:30 +04:00
README.md first commit 2026-10-02 17:41:59 +04:00
eslint.config.mjs feat: scaffold 2026-10-02 18:19:11 +04:00
nx.json feat: scaffold 2026-10-02 18:19:11 +04:00
package.json chore(deps): upgrade Next.js to 16.3 and add the front-end stack packages 2026-10-04 21:33:07 +04:00
pnpm-lock.yaml chore(deps): upgrade Next.js to 16.3 and add the front-end stack packages 2026-10-04 21:33:07 +04:00
pnpm-workspace.yaml feat: scaffold 2026-10-02 18:19:11 +04:00
tsconfig.base.json feat: scaffold 2026-10-02 18:19:11 +04:00
tsconfig.json feat: scaffold 2026-10-02 18:19:11 +04:00

README.md