|
|
||
|---|---|---|
| .. | ||
| scripts | ||
| static | ||
| README.md | ||
| package.json | ||
| typedoc.json | ||
README.md
ADK-TS API Documentation
Complete API reference for ADK-TS, built using TypeDoc with comprehensive API references and guidesAuto-generated • Type-safe • Developer-friendly
📖 About
This directory contains the complete API reference for ADK-TS, built using TypeDoc for automatic API reference generation. The documentation provides comprehensive coverage of all ADK-TS features, including API references, guides, and examples.
📁 Structure
adk-api-docs/
├── package.json # Project configuration and scripts
├── typedoc.json # TypeDoc configuration
├── README.md # This file
├── node_modules/ # Dependencies
└── api/ # Auto-generated TypeDoc output (created on build)
🚀 Development
Prerequisites
Before building the documentation, ensure you have:
- Node.js (version 18 or later)
- pnpm (recommended package manager)
- Basic familiarity with TypeDoc and documentation generation
Setup
-
Install dependencies from the workspace root:
pnpm install -
Navigate to the API docs directory:
cd apps/adk-api-docs
Building Documentation
-
Generate API documentation:
pnpm run docs:build -
Clean previous builds:
pnpm run docs:clean -
Build and serve documentation:
pnpm run dev -
Just serve existing documentation:
pnpm run docs:serve
The generated documentation will be available in the api/ directory and served at http://localhost:4000.
🛠️ Configuration
TypeDoc Configuration
The main configuration is in typedoc.json:
{
"entryPoints": ["../../packages/adk/src/index.ts"],
"out": "./api",
"theme": "default",
"name": "@iqai/adk API Documentation",
"readme": "../../packages/adk/README.md",
"excludePrivate": true,
"excludeExternals": true,
"githubPages": true,
"excludeReferences": true
}
Key settings:
entryPoints: Main TypeScript files to documentout: Output directory (./api)name: Documentation site titlereadme: Uses ADK-TS package README as main pageexcludePrivate/excludeExternals: Controls visibility of APIsgithubPages: Optimized for GitHub Pages deploymentexcludeReferences: Hides "Re-exports" to reduce clutter from barrel exports
Package Configuration
The package.json contains scripts for building and serving documentation:
pnpm run docs:build- Generate TypeDoc documentationpnpm run docs:serve- Serve documentation on port 4000pnpm run docs:clean- Remove existing documentationpnpm run dev- Build and serve in one command
🚀 Deployment
Documentation is automatically built and deployed to GitHub Pages via GitHub Actions when changes are pushed to the main or develop branches.
The deployment workflow (.github/workflows/docs.yml):
- Triggers on changes to ADK-TS source code or documentation files
- Installs Node.js 20 and pnpm dependencies
- Builds the
@iqai/adkpackage - Generates TypeDoc documentation in
apps/adk-api-docs/api - Deploys to GitHub Pages (main branch only)
The documentation is automatically published at the configured GitHub Pages URL.
🎨 Customization
Adding New Content
API documentation is automatically generated from TypeScript source code comments. To add or improve documentation:
-
Add JSDoc comments to TypeScript source files in
packages/adk/src/ -
Use TypeDoc tags for enhanced documentation:
/** * Creates a new agent with the specified configuration. * * @param config - The agent configuration * @returns A configured agent instance * @example * ```typescript * const agent = createAgent({ name: 'MyAgent' }); * ``` */ export function createAgent(config: AgentConfig): Agent { // implementation } -
Rebuild documentation to see changes
Styling and Theme
TypeDoc provides several built-in themes and supports custom styling:
- Default theme with responsive design
- Custom CSS can be added via TypeDoc configuration
- Plugin ecosystem for enhanced features
📚 Resources
- TypeDoc Documentation - Complete TypeDoc reference
- ADK-TS Documentation - Published documentation site
- TSDoc Reference - Documentation comment standards