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 17:33:07 +00:00
|
|
|
# Copy to .env.local. Public variables are inlined into the browser bundle: never put a secret in one.
|
|
|
|
|
# The API's public origin; routes live under /v1, uploads under /files.
|
|
|
|
|
NEXT_PUBLIC_API_ORIGIN=http://localhost:3000
|
|
|
|
|
NEXT_PUBLIC_SITE_URL=http://localhost:3002
|
|
|
|
|
NEXT_PUBLIC_BALE_HANDLE=lumina_support
|
|
|
|
|
NEXT_PUBLIC_TELEGRAM_HANDLE=lumina_support
|
|
|
|
|
NEXT_PUBLIC_SUPPORT_HOURS=شنبه تا پنجشنبه، ۹ تا ۱۸
|
|
|
|
|
|
2026-10-05 07:58:56 +00:00
|
|
|
# Optional: the CDN origin, without a trailing slash, that serves public/fonts/ under the same paths.
|
|
|
|
|
# It must send Access-Control-Allow-Origin. The icon sprite always loads from the app's own origin.
|
|
|
|
|
NEXT_PUBLIC_CDN_ORIGIN=
|
|
|
|
|
|
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 17:33:07 +00:00
|
|
|
# Server only: the API origin from inside the deployment network.
|
|
|
|
|
API_INTERNAL_ORIGIN=http://localhost:3000
|
|
|
|
|
|
|
|
|
|
# Only for steps that run without the real env (lint, type-check, image build).
|
|
|
|
|
SKIP_ENV_VALIDATION=false
|