Document Renderer & AI Chat Portal renderer

User-facing web portal for browsing documentation sets, reading AST topics, and interacting with the integrated AI Assistant chat.

Service Overview

The renderer service provides the primary web interface on port 3000. It fetches JSON AST topic trees produced by DITA-OT and renders them dynamically into real Bootstrap components (accordions, tabs, alerts, cards, code blocks).

Portal Views & Features

  • Documentation Store Catalog (/) — Card grid landing page displaying all discovered documentation sets with direct navigation links.
  • Topic Reader View (/<docId>/<topicPath>) — Interactive topic viewer with collapsible TOC sidebar, breadcrumbs, scrollspy, and code block copy/syntax highlighting.
  • Integrated AI Assistant (/chat) — Real-time conversational interface connected to mcp-server for technical question-answering and live component previews.

Fallback Layout Templates (chrome.json)

When published document sets omit custom header or footer parameters, the renderer automatically uses fallback AST layout templates from data-store/data/chrome.json:

  • docs-page.header — Landing catalog navbar template.
  • docs-page.card — Document card grid template.
  • chat-bot.header — AI Assistant header navbar template.
  • chat-bot.card — Welcome card template in /chat.
  • chat-bot.form — Prompt submission bar template in /chat.
  • footer — Global fallback footer.

Container Deployment & Configuration

Deploy using Docker Compose or a standalone Docker container:

# Launch using Docker Compose:
docker compose up -d renderer

# Or run as a standalone Docker container:
docker run -d -p 3000:3000 \
  -e INTERNAL_DATA_URL=http://data-store:4000/data \
  -e INTERNAL_API_URL=http://data-store:4000/api \
  -e MCP_SERVER_URL=http://mcp-server:4001/mcp \
  -e CHAT_BOT_PROVIDER=gemini \
  -e GEMINI_API_KEY=your_api_key \
  ghcr.io/jason-fox/ast-renderer:latest

Key Environment Variables:

PORT
HTTP port for the web application (default: 3000).
BOOTSTRAP_THEME
Bootswatch theme name (e.g. default, darkly, journal, flatly).
CHAT_BOT_PROVIDER
Active LLM provider for /chat (gemini, anthropic, openai, ollama).
MCP_SERVER_URL
Streamable HTTP endpoint of the MCP server service (default: http://localhost:4001/mcp).