another step
This commit is contained in:
+6
-5
@@ -72,9 +72,9 @@ src/
|
||||
├── hooks/ Custom hooks (auth, layout/mobile, events, window size)
|
||||
├── i18n/ next-intl routing + request config
|
||||
├── layout/ PublicLayout / PrivateLayout + TopBar, SideBar, BottomBar
|
||||
├── lib/ api (client/server fetch), cookies, query (TanStack), toast
|
||||
├── lib/ api (client/server fetch), auth (JWT/session helpers), cookies, query, toast
|
||||
├── services/ Domain services: {domain}/{types,keys,apis,hooks}
|
||||
├── store/ AppStore (React context + reducer) for client state
|
||||
├── context/ React context providers — auth/ is AuthContext (server-seeded session state)
|
||||
├── theme/ ThemeProvider, palettes, tokens.css, typography, direction
|
||||
└── utils/ Helpers (storage, navigation, env, text, types)
|
||||
```
|
||||
@@ -89,6 +89,7 @@ Translation files live in [`messages/`](messages) (`en.json` / `fa.json`) and mu
|
||||
- This is a server-rendered Next.js app (App Router + middleware + server-side cookies) — **not** a
|
||||
static export.
|
||||
- Internationalization is locale-prefixed (`/fa`, `/en`); `fa` is the default and is RTL.
|
||||
- Authentication is cookie-based (`access_token` / `refresh_token`), managed through
|
||||
`src/lib/cookies/` and the `src/services/auth/` hooks. The API base URL comes from
|
||||
`NEXT_PUBLIC_API_URL`.
|
||||
- Authentication is cookie-based (`access_token` / `refresh_token`). Session state lives in
|
||||
`AuthContext` (`src/context/auth/`), seeded on the server from the request cookie so the first
|
||||
render reflects the real session; cookies are managed through `src/lib/cookies/` and the
|
||||
`src/services/auth/` hooks. The API base URL comes from `NEXT_PUBLIC_API_URL`.
|
||||
|
||||
Reference in New Issue
Block a user