You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Grab-bag of small, independently shippable Next.js hygiene fixes found during a best-practices review. None warrants its own issue.
1. map: internal <a> → next/link
apps/map/src/app/auth/error/error-component.tsx uses raw <a href> for internal navigation in 3 places (lines 24, 45, 61: /, /auth/signin ×2), forcing full page loads. Everywhere else the app correctly uses next/link. (The shared ESLint config disables @next/next/no-html-link-for-pages, which is why this slipped through.)
2. me: route env vars through the validated env schema
apps/me has a zod-validated src/env.ts (t3-oss, the repo standard) but reads process.env.F3_API_BASE_URL raw in ~7 files (src/app/profile/page.tsx, src/app/api/profile/route.ts, api/profile/{roles,avatar,positions}/route.ts, …) and process.env.NEXT_PUBLIC_SITE_URL raw in the auth route handlers. F3_API_BASE_URL is never validated at all — a missing value fails at request time instead of boot/build. Add both to the src/env.ts schema and import env (matches auth/admin/map/api).
3. @acme/auth: next/react/react-dom should be peerDependencies
packages/auth/package.json declares next, react, react-dom as direct catalog: dependencies, while @acme/api and @acme/shared correctly declare them as peers (next: ">=15.5.18 <17" etc.). Align to peers so the consuming app owns the framework instance.
4. layout metadata polish (auth, me)
viewport export (with themeColor) exists in homepage/admin/map layouts but is missing in apps/auth/src/app/layout.tsx and apps/me/src/app/layout.tsx.
metadataBase is set only in map; harmless for the auth-gated apps but worth adding wherever OG/absolute URLs get used.
Grab-bag of small, independently shippable Next.js hygiene fixes found during a best-practices review. None warrants its own issue.
1. map: internal
<a>→next/linkapps/map/src/app/auth/error/error-component.tsxuses raw<a href>for internal navigation in 3 places (lines 24, 45, 61:/,/auth/signin×2), forcing full page loads. Everywhere else the app correctly usesnext/link. (The shared ESLint config disables@next/next/no-html-link-for-pages, which is why this slipped through.)2. me: route env vars through the validated env schema
apps/mehas a zod-validatedsrc/env.ts(t3-oss, the repo standard) but readsprocess.env.F3_API_BASE_URLraw in ~7 files (src/app/profile/page.tsx,src/app/api/profile/route.ts,api/profile/{roles,avatar,positions}/route.ts, …) andprocess.env.NEXT_PUBLIC_SITE_URLraw in the auth route handlers.F3_API_BASE_URLis never validated at all — a missing value fails at request time instead of boot/build. Add both to thesrc/env.tsschema and importenv(matches auth/admin/map/api).3. @acme/auth: next/react/react-dom should be peerDependencies
packages/auth/package.jsondeclaresnext,react,react-domas directcatalog:dependencies, while@acme/apiand@acme/sharedcorrectly declare them as peers (next: ">=15.5.18 <17"etc.). Align to peers so the consuming app owns the framework instance.4. layout metadata polish (auth, me)
viewportexport (withthemeColor) exists in homepage/admin/map layouts but is missing inapps/auth/src/app/layout.tsxandapps/me/src/app/layout.tsx.metadataBaseis set only in map; harmless for the auth-gated apps but worth adding wherever OG/absolute URLs get used.apps/me/next.config.tsis the only Next app config without explicitreactStrictMode: true— consistency-only; defer the "what belongs in every config" decision to chore(repo): extract a shared next-config helper and settle the ignoreBuildErrors / build-time-env policy #618's shared helper.Verification
pnpm turbo build lint typecheck testgreen; map error page navigates client-side;mefails fast at boot whenF3_API_BASE_URLis unset.🤖 Filed by Claude Code - Fable 5 (Next.js best-practices review)