--- # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 title: Templates --- Templates for creating consistent Dynamo documentation. ## Directory Hierarchy ### Components (Router, Planner, KVBM, Frontend, Profiler) ``` ┌──────────────────────────────────────────────────────────────┐ │ Tier 1: components/src/dynamo//README.md │ ← Redirect stub │ Content: 1-5 lines pointing to docs/components//│ │ Template: incode_readme.md │ └─────────────────────┬────────────────────────────────────────┘ ▼ ┌──────────────────────────────────────────────────────────────┐ │ Tier 2: docs/components// │ ← User docs │ • README.md ← component_readme.md │ │ • _guide.md ← component_guide.md │ │ • _examples.md ← component_examples.md │ └─────────────────────┬────────────────────────────────────────┘ ▼ ┌──────────────────────────────────────────────────────────────┐ │ Tier 3: docs/design_docs/_design.md │ ← Contributor docs │ Template: component_design.md │ └──────────────────────────────────────────────────────────────┘ ``` ### Backends (SGLang, TRT-LLM, vLLM) ``` ┌─────────────────────────────────────────────────────┐ │ Tier 1: components/src/dynamo//README.md │ ← Redirect stub │ Content: 1-5 lines pointing to docs/backends/ │ │ Template: incode_readme.md │ └─────────────────────┬───────────────────────────────┘ ▼ ┌─────────────────────────────────────────────────────┐ │ Tier 2: docs/backends// │ ← User docs │ • README.md ← backend_readme.md │ │ • _guide.md ← backend_guide.md │ │ │ │ Tier 2.5: docs/backends/README.md (exists) │ │ • Backend comparison table │ └─────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────┐ │ Tier 3: External │ │ Backend internals documented in upstream repos │ └─────────────────────────────────────────────────────┘ ``` ### Features (Multimodal, LoRA, Speculative Decoding) ``` ┌─────────────────────────────────────────────────────┐ │ Tier 1: N/A │ │ No in-code README (features are not components) │ └─────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────┐ │ Tier 2: docs/features// │ ← User docs │ • README.md ← feature_readme.md │ │ • _sglang.md ← feature_backend.md │ │ • _trtllm.md ← feature_backend.md │ │ • _vllm.md ← feature_backend.md │ └─────────────────────┬───────────────────────────────┘ ▼ ┌─────────────────────────────────────────────────────┐ │ Tier 3: docs/design_docs/_design.md │ ← Optional │ Only if significant architecture │ └─────────────────────────────────────────────────────┘ ``` ### Integrations (LMCache, HiCache, NIXL) ``` ┌─────────────────────────────────────────────────────┐ │ Tier 1: N/A │ │ No in-code README (external tools) │ └─────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────┐ │ Tier 2: docs/integrations// │ ← User docs │ • README.md ← integration_readme.md │ │ • _setup.md (custom) │ │ • _.md (custom) │ └─────────────────────────────────────────────────────┘ ``` ### Deploy (Kubernetes, Helm, Operator) ``` ┌─────────────────────────────────────────────────────┐ │ Tier 1: N/A │ │ No in-code README (deployment topics) │ └─────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────┐ │ Tier 2: docs/deploy/ │ ← User docs │ • README.md (deployment overview) │ │ • installation_guide.md, dynamo_operator.md │ │ • helm.md, examples/ │ └─────────────────────────────────────────────────────┘ ``` ### Performance (Tuning, Benchmarks) ``` ┌─────────────────────────────────────────────────────┐ │ Tier 1: N/A │ │ No in-code README (performance topics) │ └─────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────┐ │ Tier 2: docs/performance/ │ ← User docs │ • README.md (performance overview) │ │ • tuning.md, benchmarking.md, etc. │ └─────────────────────────────────────────────────────┘ ``` ### Infrastructure (Observability, Fault Tolerance, Development) ``` ┌─────────────────────────────────────────────────────┐ │ Tier 1: N/A │ │ No in-code README (operations topics) │ └─────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────┐ │ Tier 2: docs/infrastructure// │ ← User docs │ • README.md ← infrastructure_readme.md │ │ • .md (detailed guides) │ └─────────────────────────────────────────────────────┘ ``` ## Three-Tier Pattern | Tier | Purpose | Audience | Location | |------|---------|----------|----------| | **Tier 1** | Redirect stub (5 lines) | Developers browsing code | `components/src/dynamo/`\`/README.md` | | **Tier 2** | User documentation | Users, operators | `docs/`\`/`\`/` (e.g., `docs/components/router/`) | | **Tier 3** | Design documentation | Contributors | `docs/design_docs/`\`_design.md` | ## Template Selection | What you're documenting | Templates to use | |------------------------|------------------| | New component | `incode_readme.md` + `component_*.md` (all 4) | | New backend | `incode_readme.md` + `backend_*.md` (both) | | New feature | `feature_readme.md` + `feature_backend.md` (per backend) | | New integration | `integration_readme.md` | | New deploy topic | Custom (follows `docs/deploy/` structure) | | New performance topic | Custom (follows `docs/performance/` structure) | | New infrastructure topic | `infrastructure_readme.md` | | Migrating existing docs | Use the template matching your target file | ## Usage 1. Identify which category your documentation belongs to (component, backend, feature, integration) 2. Create the directory structure shown above 3. Copy templates to the correct locations with correct filenames 4. Replace all `` with actual values 5. Replace `{/* comments */}` with actual content 6. Remove sections that don't apply ## Updating Navigation After adding new documentation: 1. **Sphinx (current):** Update `docs/index.rst` or the appropriate `_sections/*.rst` file to include your new docs in the navigation 2. **Fern (future):** Update `fern/docs.yml` with your new pages See [docs/README.md](../README.md) for documentation build instructions.