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
This commit is contained in:
Ashley Mensah
2026-02-05 17:31:10 +01:00
parent 0962784937
commit 91c453f6b7
167 changed files with 2166 additions and 1899 deletions

79
CLAUDE.md Normal file
View 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`)

View File

@@ -58,7 +58,7 @@ const nextConfig = {
},
{
source: '/docs/how-to-guides/network-routes',
destination: '/manage/network-routes/routing-traffic-to-private-networks',
destination: '/manage/network-routes',
permanent: true,
},
{
@@ -96,6 +96,12 @@ const nextConfig = {
destination: '/api/:path*',
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
{
source: '/how-to/manage-network-access',
@@ -304,7 +310,7 @@ const nextConfig = {
// documentation redirects for network-routes
{
source: '/how-to/routing-traffic-to-private-networks',
destination: '/manage/network-routes/routing-traffic-to-private-networks',
destination: '/manage/network-routes',
permanent: true,
},
{
@@ -526,6 +532,48 @@ const nextConfig = {
destination: '/manage/networks/use-cases/access-home-devices',
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)
{
source: '/manage/site-to-site',

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Some files were not shown because too many files have changed in this diff Show More