Provides Vaadin Documentation and help with development tasks
A sophisticated, hierarchically-aware Retrieval-Augmented Generation (RAG) system for Vaadin documentation that understands document structure, provides framework-specific filtering, and enables intelligent parent-child navigation through documentation sections.
This project provides an advanced RAG system with enhanced hybrid search that:
vaadin-documentation-services/
โโโ packages/
โ โโโ core-types/ # Shared TypeScript interfaces
โ โโโ 1-asciidoc-converter/ # AsciiDoc โ Markdown + metadata extraction
โ โโโ 2-embedding-generator/ # Markdown โ Vector database with hierarchical chunking
โ โโโ mcp-server/ # MCP server with hierarchical navigation
โโโ package.json # Bun workspace configuration
โโโ PROJECT_PLAN.md # Complete project documentationflowchart TD
subgraph "Step 1: Documentation Processing"
VaadinDocs["๐ Vaadin Docs<br/>(AsciiDoc)"]
Converter["๐ AsciiDoc Converter<br/>โข Framework detection<br/>โข URL generation<br/>โข Markdown output"]
Processor["โก Embedding Generator<br/>โข Hierarchical chunking<br/>โข Parent-child relationships<br/>โข OpenAI embeddings"]
end
subgraph "Step 2: Agent Integration"
Pinecone["๐๏ธ Pinecone Vector DB<br/>โข Rich metadata<br/>โข Hierarchical relationships<br/>โข Framework tags"]
MCP["๐ค MCP Server<br/>โข search_vaadin_docs<br/>โข get_full_document<br/>โข Full document retrieval"]
IDEs["๐ป IDE Assistants<br/>โข Context-aware search<br/>โข Hierarchical exploration<br/>โข Framework-specific help"]
end
VaadinDocs --> Converter
Converter --> Processor
Processor --> Pinecone
Pinecone <--> MCP
MCP <--> IDEs
classDef processing fill:#e1f5fe,stroke:#01579b,stroke-width:2px
classDef storage fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
classDef api fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px
classDef agent fill:#fff3e0,stroke:#e65100,stroke-width:2px
class VaadinDocs,Converter,Processor processing
class Pinecone storage
class MCP api
class IDEs agent# Clone and install dependencies
git clone https://github.com/vaadin/vaadin-documentation-services
cd vaadin-documentation-services
bun install# Create .env file with your API keys
echo "OPENAI_API_KEY=your_openai_api_key" > .env
echo "PINECONE_API_KEY=your_pinecone_api_key" >> .env
echo "PINECONE_INDEX=your_pinecone_index" >> .env# Convert AsciiDoc to Markdown with metadata
cd packages/1-asciidoc-converter
bun run convert
# Generate embeddings and populate vector database
cd ../2-embedding-generator
bun run generateThe MCP server is deployed and available remotely via HTTP transport at:
https://mcp.vaadin.com/
Configure your IDE assistant to use the Streamable HTTP transport:
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://mcp.vaadin.com/")
);packages/core-types/)Shared TypeScript interfaces used across all packages:
DocumentChunk: Core documentation chunk structureRetrievalResult: Search result with relevance scoringFramework: Type-safe framework definitionspackages/1-asciidoc-converter/)Converts Vaadin AsciiDoc documentation to Markdown with metadata:
cd packages/1-asciidoc-converter
bun run convert # Convert all documentation
bun run test # Run framework detection testspackages/2-embedding-generator/)Creates vector embeddings with hierarchical relationships:
cd packages/2-embedding-generator
bun run generate # Generate embeddings from Markdown
bun run test # Run chunking and relationship testspackages/mcp-server/)Model Context Protocol server for IDE assistant integration:
search_vaadin_docs and get_full_documentcd packages/mcp-server
bun run build # Build for distribution
bun run test # Run document-based tests
Available Tools:
search_vaadin_docs: Search with semantic and keyword matchingget_full_document: Retrieve complete documentation pagesget_vaadin_version: Get latest Vaadin version and release timestampEach package includes comprehensive test suites:
# Test individual packages
cd packages/1-asciidoc-converter && bun run test
cd packages/2-embedding-generator && bun run test
cd packages/mcp-server && bun run testThe MCP server is available at:
https://mcp.vaadin.com/https://mcp.vaadin.com/healthAutomated via GitHub Actions:
This project uses Bun workspaces for package management:
bun install # Install all dependencies
bun run build # Build all packages
bun run test # Test all packagespackages/core-types/packages/1-asciidoc-converter/ or packages/2-embedding-generator/packages/mcp-server/This project successfully delivered:
โ
Sophisticated RAG System: Replaced naive implementation with hierarchically-aware search
โ
Enhanced User Experience: Agents can now navigate from specific details to broader context
โ
Production Quality: Clean architecture, comprehensive testing, and error handling
โ
Framework Intelligence: Accurate Flow/Hilla content separation with common content inclusion
โ
Developer Integration: Seamless IDE assistant integration via MCP protocol
The system now provides intelligent, context-aware documentation search that understands the hierarchical structure of Vaadin documentation and enables sophisticated agent interactions.
MIT - See license file for details.
Built with โค๏ธ for the Vaadin developer community