Reorganize network routes and networks documentation structure
- 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
79
CLAUDE.md
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
# 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](https://netbird.io), an open-source WireGuard-based Zero Trust Networking platform. The site is built with Next.js 14 and MDX support.
|
||||||
|
|
||||||
|
## Common Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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 docs
|
||||||
|
- `get-started/` - Installation and quickstart guides
|
||||||
|
- `manage/` - Feature documentation (peers, networks, DNS, access control, etc.)
|
||||||
|
- `selfhosted/` - Self-hosting deployment guides
|
||||||
|
- `ipa/` - API documentation (mapped to `/api` route via rewrite)
|
||||||
|
- `use-cases/` - Tutorials and examples
|
||||||
|
- `client/` - Client configuration
|
||||||
|
- `help/` - Troubleshooting
|
||||||
|
|
||||||
|
### Navigation
|
||||||
|
- `src/components/NavigationDocs.jsx` - Contains `docsNavigation` array 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 spec
|
||||||
|
- `generator/templates/ApiTemplate.ts` - Template for generated API pages
|
||||||
|
- Generated pages go to `src/pages/ipa/resources/`
|
||||||
|
|
||||||
|
### MDX Processing Pipeline
|
||||||
|
- `mdx/remark.mjs` - Remark plugins
|
||||||
|
- `mdx/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 at `public/llms.txt`
|
||||||
|
- Runs automatically on `npm run dev` and `npm 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 (see `next.config.mjs`)
|
||||||
@@ -58,7 +58,7 @@ const nextConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
source: '/docs/how-to-guides/network-routes',
|
source: '/docs/how-to-guides/network-routes',
|
||||||
destination: '/manage/network-routes/routing-traffic-to-private-networks',
|
destination: '/manage/network-routes',
|
||||||
permanent: true,
|
permanent: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -96,6 +96,12 @@ const nextConfig = {
|
|||||||
destination: '/api/:path*',
|
destination: '/api/:path*',
|
||||||
permanent: true
|
permanent: true
|
||||||
},
|
},
|
||||||
|
// documentation redirects for about
|
||||||
|
{
|
||||||
|
source: '/selfhosted/self-hosted-vs-cloud-netbird',
|
||||||
|
destination: '/about-netbird/self-hosted-vs-cloud',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
// documentation redirects for access control
|
// documentation redirects for access control
|
||||||
{
|
{
|
||||||
source: '/how-to/manage-network-access',
|
source: '/how-to/manage-network-access',
|
||||||
@@ -304,7 +310,7 @@ const nextConfig = {
|
|||||||
// documentation redirects for network-routes
|
// documentation redirects for network-routes
|
||||||
{
|
{
|
||||||
source: '/how-to/routing-traffic-to-private-networks',
|
source: '/how-to/routing-traffic-to-private-networks',
|
||||||
destination: '/manage/network-routes/routing-traffic-to-private-networks',
|
destination: '/manage/network-routes',
|
||||||
permanent: true,
|
permanent: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -526,6 +532,48 @@ const nextConfig = {
|
|||||||
destination: '/manage/networks/use-cases/access-home-devices',
|
destination: '/manage/networks/use-cases/access-home-devices',
|
||||||
permanent: true,
|
permanent: true,
|
||||||
},
|
},
|
||||||
|
// Networks guides moved to use-cases
|
||||||
|
{
|
||||||
|
source: '/manage/networks/routing-traffic-to-multiple-resources',
|
||||||
|
destination: '/manage/networks/use-cases/routing-traffic-to-multiple-resources',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/manage/networks/accessing-restricted-domain-resources',
|
||||||
|
destination: '/manage/networks/use-cases/accessing-restricted-domain-resources',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/manage/networks/accessing-entire-domains-within-networks',
|
||||||
|
destination: '/manage/networks/use-cases/accessing-entire-domains-within-networks',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
// Network Routes guides moved to use-cases
|
||||||
|
{
|
||||||
|
source: '/manage/network-routes/routing-traffic-to-private-networks',
|
||||||
|
destination: '/manage/network-routes',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/manage/network-routes/use-cases/routing-traffic-to-private-networks',
|
||||||
|
destination: '/manage/network-routes',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/manage/network-routes/configuring-default-routes-for-internet-traffic',
|
||||||
|
destination: '/manage/network-routes/use-cases/exit-nodes',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/manage/network-routes/configuring-routes-with-access-control',
|
||||||
|
destination: '/manage/network-routes/use-cases/access-control',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: '/manage/network-routes/resolve-overlapping-routes',
|
||||||
|
destination: '/manage/network-routes/use-cases/overlapping-routes',
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
// Site-to-Site section redirects (overview and comprehensive guides)
|
// Site-to-Site section redirects (overview and comprehensive guides)
|
||||||
{
|
{
|
||||||
source: '/manage/site-to-site',
|
source: '/manage/site-to-site',
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 247 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 179 KiB After Width: | Height: | Size: 179 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 273 KiB After Width: | Height: | Size: 273 KiB |
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 104 KiB After Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 491 KiB After Width: | Height: | Size: 491 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 103 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 233 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 228 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 333 KiB After Width: | Height: | Size: 333 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 149 KiB |
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 142 KiB After Width: | Height: | Size: 142 KiB |