How pedronauck/docz works
Docz turns project MDX and component source into an interactive Gatsby documentation site. Authors configure and write MDX, then run the CLI for live development or a production build; Gatsby discovers documentation and generates pages, while the Docz theme renders navigation, component props, and live playgrounds. The graph includes the documented static-site output and the sampled configuration, state, and rendering layers. Some ingestion and build internals are unsampled, so those links are shown only where the README or source index supports them.
Main entry points: cli.ts Docz CLI · state.tsx Documentation state · gatsby-node.js Gatsby theme integration · argv.ts Arguments and config
Components 24
Authoring and configuration
- Arguments and config
core/docz-core/src/config/argv.ts - Docz config
core/docz-core/src/config/docz.ts - Plugin system
core/docz-core/src/lib/Plugin.ts - MDX documents
Site generation
- Gatsby theme integration
core/gatsby-theme-docz/gatsby-node.js - Document discovery
core/gatsby-theme-docz/lib/sourceNodes.js - Page creation
core/gatsby-theme-docz/lib/createPagesStatefully.js - Markdown transforms
core/remark-docz/src/index.ts - HTML transforms
core/rehype-docz/src/index.ts - Component prop parsing
core/docz-core/src/utils/docgen/externalProptypesHandler.ts
Documentation runtime
- Documentation state
core/docz/src/state.tsx - Menu construction
core/docz/src/hooks/useMenus.ts - Theme components
core/docz/src/hooks/useComponents.tsx - Props lookup
core/docz/src/hooks/useComponentProps.ts - Live playground
core/gatsby-theme-docz/src/components/Playground/index.js - Props display
core/gatsby-theme-docz/src/components/Props/index.js
Development and output
- Docz CLI
core/docz-core/src/cli.ts - Development machine
core/docz-core/src/bundler/machine/index.ts - Development server
core/docz-core/src/bundler/server.ts - Production build
core/docz-core/src/bundler/build.ts - Static site output
Other components
- Documentation author
- Gatsby runtime
- Site visitor
Connections 25
- Documentation author → MDX documents: writes MDX
README.md - Documentation author → Docz CLI: runs commands
README.md - Docz CLI → Arguments and config: sets options
- Arguments and config → Docz config: loads defaults
core/docz-core/src/config/argv.ts - Docz config → Plugin system: configures plugins
core/docz-core/src/config/docz.ts - Gatsby theme integration → Document discovery: registers
core/gatsby-theme-docz/gatsby-node.js - Gatsby theme integration → Page creation: registers
core/gatsby-theme-docz/gatsby-node.js - Document discovery → Gatsby runtime: creates content nodes
- Page creation → Gatsby runtime: creates pages
- Gatsby runtime → Markdown transforms: transforms Markdown
README.md - Gatsby runtime → HTML transforms: transforms markup
README.md - Gatsby runtime → Component prop parsing: extracts component props
README.md - Gatsby runtime → Documentation state: provides documentation data
README.md - Documentation state → Menu construction: supplies entries
core/docz/src/hooks/useMenus.ts - Documentation state → Props lookup: supplies props
core/docz/src/hooks/useComponentProps.ts - Props lookup → Theme components: uses components
core/docz/src/hooks/useComponentProps.ts - Live playground → Theme components: renders themed components
core/gatsby-theme-docz/src/components/Playground/index.js - Props display → Documentation state: queries props
- Docz CLI → Development server: starts development
- Development server → Development machine: interprets machine
core/docz-core/src/bundler/server.ts - Docz CLI → Production build: builds site
README.md - Production build → Static site output: generates assets
README.md - Static site output → Site visitor: serves documentation
README.md - Gatsby runtime → Live playground: renders theme
README.md - Gatsby runtime → Props display: renders theme
README.md