1.5 KiB
1.5 KiB
0027 خانه lives at /feed; the landing sends signed-in people on in the browser
Status: Accepted · Area: architecture · Date: 2026-10-07 · Decided by: user · Supersedes: 0024
Context
The design moved the investor's feed from / to /feed when / became the guest landing, and asks for signed-in visitors to be redirected in middleware from the session cookie. The server render never depends on auth here, and the Next.js proxy was removed for that reason.
Decision
- خانه, the investor's feed, is
/feed(ROUTES.home); the landing is/(ROUTES.landing). The feed keeps 0024's rules: read only in the browser behind a same-size skeleton,HomeGuardsends a guest to login and a creator to their channel. - On
/,LandingRedirectwaits for the browser's session and thenrouter.replaces a member tohomeRoute: step 5 whileneedsProfile, a creator's own channel, or/feed. Guests and expired sessions stay. No proxy, no cookie read on the server. - A guest's brand link (top bars, desktop header, auth frames) goes to
/.
Alternatives
- Proxy (
proxy.ts) redirect on the session cookie, as the design asks: rejected by the user; it brings back the proxy, can't tell a creator from an investor, and misses sessions whose 15-minute access cookie expired.
Consequences
- A signed-in person who opens
/sees the landing briefly before the redirect. - «بازگشت به خانه» buttons still lead to
/feed, so a guest there lands on login. - After «خروج», the account page (not built yet) should send the person to
/.