Configure and verify apps/internal-docs against an explicit local generaltranslation/company checkout with development-only hot reload. Use when starting internal docs locally, setting COMPANY_DOCS_PATH, debugging stale Markdown or sidebar metadata, checking the development content-version poller, or confirming production remains immutable and statically generated.
generaltranslation/company checkout. Require the canonical Markdown corpus, including README.md and standards/document-metadata.md; do not clone, pull, or modify a checkout unless the user requested it.apps/internal-docs/.env.local:dotenv COMPANY_DOCS_PATH="/absolute/path/to/company"
.env.local or expose OAuth credentials.INTERNAL_DOCS_AUTH_URL. An origin mismatch causes Better Auth to reject Google sign-in before OAuth starts.Run the app from apps/internal-docs using the port encoded in INTERNAL_DOCS_AUTH_URL. For a local auth URL on port 3000:
pnpm exec next dev --turbopack --port 3000Live content mode activates only when both conditions hold:
NODE_ENV is development.COMPANY_DOCS_PATH is explicitly set.The open page polls /api/dev/company-content-version and refreshes when the canonical Markdown corpus changes. The compatibility index is derived again from source in this mode. Production keeps the immutable checkout snapshot, cached derived index, and statically generated docs pages.
bash npm run docs:generate
This refreshes generated collection README contents. Navigation and metadata derive directly from the Markdown sources.
COMPANY_DOCS_PATH itself because the resolved checkout root is cached per process./docs/... page and confirm the local checkout's content renders./api/dev/company-content-version?documentPath=<encoded-path.md> return 200.bash pnpm test pnpm typecheck
next dev before running the production build because both use .next. Confirm the build reports ● /docs/[[...slug]] as SSG, then restart development.Invalid origin: align the browser port and INTERNAL_DOCS_AUTH_URL, then restart.README.md and standards/document-metadata.md.