mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-16 07:26:35 +00:00
- Restructure use cases into by-scenario and by-configuration folders - Reorganize images to match new doc structure (concepts, by-scenario, by-resource-type) - Add screenshots for site-to-site guides (home, office, cloud) - Add policy screenshots for networks use cases - Update site-to-site docs to use two separate policies instead of bidirectional - Fix Access Control Groups to use correct destination groups - Move "Self-Hosted vs Cloud" page to about section - Update navigation and add redirects for moved pages - Add CLAUDE.md for Claude Code guidance
2.7 KiB
2.7 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is the documentation website for NetBird, an open-source WireGuard-based Zero Trust Networking platform. The site is built with Next.js 14 and MDX support.
Common Commands
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Run linting
npm run lint
# Regenerate API documentation from OpenAPI spec
npm run gen
# Regenerate LLM-friendly markdown docs (runs automatically with dev/build)
npm run gen:llm
Architecture
Content Structure
- Documentation pages are MDX files in
src/pages/organized by topic:about-netbird/- Conceptual docsget-started/- Installation and quickstart guidesmanage/- Feature documentation (peers, networks, DNS, access control, etc.)selfhosted/- Self-hosting deployment guidesipa/- API documentation (mapped to/apiroute via rewrite)use-cases/- Tutorials and examplesclient/- Client configurationhelp/- Troubleshooting
Navigation
src/components/NavigationDocs.jsx- ContainsdocsNavigationarray that defines the sidebar structure. Update this when adding new pages.
MDX Components
Custom components available in MDX files (import from @/components/mdx or their respective files):
<Note>- Orange info box for important notes<Warning>- Red warning box<Success>- Green success message<Tiles>- Grid of clickable cards for related links<YouTube videoId="...">- Embedded YouTube videos<Button>- Styled buttons/links<Row>and<Col>- Two-column layouts<Properties>and<Property>- API property documentation<CodeGroup>- Tabbed code blocks for multiple languages
API Documentation Generator
generator/- TypeScript-based generator that creates MDX pages from the NetBird OpenAPI specgenerator/templates/ApiTemplate.ts- Template for generated API pages- Generated pages go to
src/pages/ipa/resources/
MDX Processing Pipeline
mdx/remark.mjs- Remark pluginsmdx/rehype.mjs- Rehype plugins (syntax highlighting via Shiki)mdx/recma.mjs- Recma plugins
LLM Documentation
scripts/generate-llm-docs.mjs- Generates clean markdown versions of all pages- Output goes to
public/llms/with index atpublic/llms.txt - Runs automatically on
npm run devandnpm run build
URL Routing
- Root
/rewrites to/introduction /api/*rewrites to/ipa/*(API docs)- Many legacy
/docs/*and/how-to/*paths redirect to new locations (seenext.config.mjs)