# redis/docs architecture

> Architecture diagram of the GitHub repository redis/docs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/redis/docs
- Repository: https://github.com/redis/docs

## Overview

This repository is the source for the Redis documentation site. Readers consume documentation pages rendered from Markdown and site templates; the content tree also includes runnable use-case and client examples, plus static assets and JavaScript demos. The README describes the Hugo rendering structure, but the supplied tree is incomplete for the site itself, and most example source was not sampled, so the graph shows only documented site relationships and clear tree-backed content branches.

Main entry points: [`content/develop/use-cases`](https://github.com/redis/docs/tree/main/content/develop/use-cases) (Redis use cases), [`local_examples`](https://github.com/redis/docs/tree/main/local_examples) (Client examples), [`static/code/agent-templates`](https://github.com/redis/docs/tree/main/static/code/agent-templates) (RAG agent templates), [`static/js/index.js`](https://github.com/redis/docs/blob/main/static/js/index.js) (Site JavaScript)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Documentation Site"]
  node_page_templates["Page templates"]
  node_partials["Shared partials"]
  node_shortcodes["Shortcodes"]
  node_home_template["Home template"]
  node_not_found["404 template"]
  node_site_config["Hugo configuration"]
end

subgraph group_content["Docs Content"]
  node_markdown["Markdown pages"]
end

subgraph group_examples["Examples"]
  node_use_cases["Redis use cases"]
  node_local_examples["Client examples"]
  node_agent_templates["RAG agent templates"]
end

subgraph group_static["Static Resources"]
  node_assets["Site assets"]
  node_static_files["Static files"]
  node_site_js["Site JavaScript<br/>[index.js]"]
  node_retriever_demo["Context retriever demo"]
end

node_reader(("Documentation reader"))

node_reader -->|"reads pages"| node_markdown
node_markdown -->|"renders with"| node_page_templates
node_page_templates -->|"uses shared"| node_partials
node_markdown -->|"uses snippets"| node_shortcodes
node_site_config -->|"configures rendering"| node_page_templates
node_reader -->|"opens home"| node_home_template
node_reader -->|"gets fallback"| node_not_found
node_markdown -.->|"includes examples"| node_use_cases
node_markdown -.->|"includes examples"| node_local_examples
node_static_files -->|"serves templates"| node_agent_templates
node_static_files -->|"serves scripts"| node_site_js
node_static_files -->|"serves demo"| node_retriever_demo
node_reader -->|"loads styling"| node_assets

click node_use_cases "https://github.com/redis/docs/tree/main/content/develop/use-cases"
click node_local_examples "https://github.com/redis/docs/tree/main/local_examples"
click node_agent_templates "https://github.com/redis/docs/tree/main/static/code/agent-templates"
click node_site_js "https://github.com/redis/docs/blob/main/static/js/index.js"
click node_retriever_demo "https://github.com/redis/docs/blob/main/static/js/context-retriever-demo.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_page_templates,node_partials,node_shortcodes,node_home_template,node_not_found,node_site_config toneBlue
class node_markdown toneAmber
class node_use_cases,node_local_examples,node_agent_templates toneMint
class node_assets,node_static_files,node_site_js,node_retriever_demo toneRose
class node_reader toneIndigo
```

## Components

### Documentation Site

- **Page templates**
- **Shared partials**
- **Shortcodes**
- **Home template**
- **404 template**
- **Hugo configuration**

### Docs Content

- **Markdown pages**

### Examples

- [Redis use cases](https://github.com/redis/docs/tree/main/content/develop/use-cases): `content/develop/use-cases`
- [Client examples](https://github.com/redis/docs/tree/main/local_examples): `local_examples`
- [RAG agent templates](https://github.com/redis/docs/tree/main/static/code/agent-templates): `static/code/agent-templates`

### Static Resources

- **Site assets**
- **Static files**
- [Site JavaScript](https://github.com/redis/docs/blob/main/static/js/index.js): `static/js/index.js`
- [Context retriever demo](https://github.com/redis/docs/blob/main/static/js/context-retriever-demo.js): `static/js/context-retriever-demo.js`

### Other components

- **Documentation reader**

## Connections

- Documentation reader → Markdown pages: reads pages (evidence: `README.md`)
- Markdown pages → Page templates: renders with (evidence: `README.md`)
- Page templates → Shared partials: uses shared (evidence: `README.md`)
- Markdown pages → Shortcodes: uses snippets (evidence: `README.md`)
- Hugo configuration → Page templates: configures rendering (evidence: `README.md`)
- Documentation reader → Home template: opens home (evidence: `README.md`)
- Documentation reader → 404 template: gets fallback (evidence: `README.md`)
- Markdown pages → Redis use cases: includes examples
- Markdown pages → Client examples: includes examples
- Static files → RAG agent templates: serves templates (evidence: `README.md`)
- Static files → Site JavaScript: serves scripts (evidence: `README.md`)
- Static files → Context retriever demo: serves demo (evidence: `README.md`)
- Documentation reader → Site assets: loads styling (evidence: `README.md`)
