# discord/discord-api-docs architecture

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

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

## Overview

This repository provides Discord Developer Platform documentation, consumed by third-party developers through its online docs site. The file tree supplied here contains reusable MDX/React presentation snippets rather than the documentation pages themselves, so the page content and navigation cannot be mapped to source paths. The visible runtime layer comprises API-route and content-formatting helpers, generated icons, and YouTube embeds; the playlist carousel also retrieves playlist metadata and coordinates playback. Tooling is omitted because it supports repository maintenance, not the documented product workflow.

Main entry points: [`snippets/route.jsx`](https://github.com/discord/discord-api-docs/blob/main/snippets/route.jsx) (API route display), [`snippets/imagecard.jsx`](https://github.com/discord/discord-api-docs/blob/main/snippets/imagecard.jsx) (Image card), [`snippets/linkbutton.jsx`](https://github.com/discord/discord-api-docs/blob/main/snippets/linkbutton.jsx) (Link button), [`snippets/manualanchor.jsx`](https://github.com/discord/discord-api-docs/blob/main/snippets/manualanchor.jsx) (Manual anchor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content widgets"]
  node_route["API route display<br/>[route.jsx]"]
  node_imagecard["Image card<br/>[imagecard.jsx]"]
  node_linkbutton["Link button<br/>[linkbutton.jsx]"]
  node_manualanchor["Manual anchor<br/>[manualanchor.jsx]"]
  node_monospace["Monospace text<br/>[monospace.jsx]"]
  node_snowflake["Snowflake content<br/>[snowflake.jsx]"]
end

subgraph group_media["Media embeds"]
  node_youtube["YouTube embed<br/>[youtube.jsx]"]
  node_playlist["Playlist carousel"]
end

subgraph group_visuals["Icon assets"]
  node_iconset["Generated icons"]
end

node_developers(("Third-party developers"))
node_docs["Developer documentation"]

node_developers -->|"read"| node_docs
node_docs -.->|"embeds"| node_youtube
node_docs -.->|"embeds"| node_playlist
node_docs -.->|"renders"| node_route
node_docs -.->|"renders"| node_imagecard
node_docs -.->|"renders"| node_linkbutton
node_docs -.->|"renders"| node_manualanchor
node_docs -.->|"renders"| node_monospace
node_docs -.->|"renders"| node_snowflake
node_docs -.->|"uses"| node_iconset

click node_route "https://github.com/discord/discord-api-docs/blob/main/snippets/route.jsx"
click node_imagecard "https://github.com/discord/discord-api-docs/blob/main/snippets/imagecard.jsx"
click node_linkbutton "https://github.com/discord/discord-api-docs/blob/main/snippets/linkbutton.jsx"
click node_manualanchor "https://github.com/discord/discord-api-docs/blob/main/snippets/manualanchor.jsx"
click node_monospace "https://github.com/discord/discord-api-docs/blob/main/snippets/monospace.jsx"
click node_snowflake "https://github.com/discord/discord-api-docs/blob/main/snippets/snowflake.jsx"
click node_youtube "https://github.com/discord/discord-api-docs/blob/main/snippets/youtube.jsx"
click node_playlist "https://github.com/discord/discord-api-docs/blob/main/snippets/youtubeplaylist.jsx"
click node_iconset "https://github.com/discord/discord-api-docs/tree/main/snippets/icons"

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_route,node_imagecard,node_linkbutton,node_manualanchor,node_monospace,node_snowflake toneBlue
class node_youtube,node_playlist toneAmber
class node_iconset toneMint
class node_developers,node_docs toneIndigo
```

## Components

### Content widgets

- [API route display](https://github.com/discord/discord-api-docs/blob/main/snippets/route.jsx): `snippets/route.jsx`
- [Image card](https://github.com/discord/discord-api-docs/blob/main/snippets/imagecard.jsx): `snippets/imagecard.jsx`
- [Link button](https://github.com/discord/discord-api-docs/blob/main/snippets/linkbutton.jsx): `snippets/linkbutton.jsx`
- [Manual anchor](https://github.com/discord/discord-api-docs/blob/main/snippets/manualanchor.jsx): `snippets/manualanchor.jsx`
- [Monospace text](https://github.com/discord/discord-api-docs/blob/main/snippets/monospace.jsx): `snippets/monospace.jsx`
- [Snowflake content](https://github.com/discord/discord-api-docs/blob/main/snippets/snowflake.jsx): `snippets/snowflake.jsx`

### Media embeds

- [YouTube embed](https://github.com/discord/discord-api-docs/blob/main/snippets/youtube.jsx): `snippets/youtube.jsx`
- [Playlist carousel](https://github.com/discord/discord-api-docs/blob/main/snippets/youtubeplaylist.jsx): `snippets/youtubeplaylist.jsx`

### Icon assets

- [Generated icons](https://github.com/discord/discord-api-docs/tree/main/snippets/icons): `snippets/icons`

### Other components

- **Third-party developers**
- **Developer documentation**

## Connections

- Third-party developers → Developer documentation: read (evidence: `README.md`)
- Developer documentation → YouTube embed: embeds
- Developer documentation → Playlist carousel: embeds
- Developer documentation → API route display: renders
- Developer documentation → Image card: renders
- Developer documentation → Link button: renders
- Developer documentation → Manual anchor: renders
- Developer documentation → Monospace text: renders
- Developer documentation → Snowflake content: renders
- Developer documentation → Generated icons: uses
