VitePress Federation Hub — Aggregate documentation from multiple projects into a unified portal
Live Demo: https://kooshaPari.github.io/phenodocs/
PhenoDocs solves the problem of maintaining multiple documentation sites by providing a federation layer that:
- Aggregates docs from multiple projects into one searchable portal
- Auto-generates navigation from project structures
- Maintains separate views for different audiences (lab, docs, audit, kb)
- Indexes content for both human and AI consumption
- 🚀 Fast — Static site generation with VitePress
- 🔗 Federated — Pull docs from multiple repositories
- 🤖 AI-Ready —
.llms.txtgeneration for LLM context - 🔍 Searchable — Full-text search across all projects
- 📊 Layered — Separate views for ideas, specs, audits, knowledge
- ⚙️ Automated — Git hooks for automatic updates
# Clone the repository
git clone https://github.com/yourorg/phenodocs.git
cd phenodocs
# Install dependencies
npm install
# or
pnpm install# Development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewFrom a project using docs_engine:
docs hub --hub-dir ../phenodocsOr programmatically:
from docs_engine.hub.generator import HubGenerator
projects = {
"thegent": "/path/to/thegent/docs",
"pheno-sdk": "/path/to/pheno-sdk/docs",
"cliproxy": "/path/to/cliproxy/docs"
}
gen = HubGenerator(
hub_dir="phenodocs",
projects=projects
)
gen.generate()phenodocs/
├── .vitepress/
│ ├── config.ts # VitePress configuration
│ └── theme/
│ └── index.ts # Custom theme
├── docs/ # Hub documentation
│ ├── index.md # Hub landing page
│ ├── guide/
│ │ └── getting-started.md
│ └── reference/
│ └── api.md
├── projects/ # Aggregated project docs (git submodule or external)
├── package.json
└── README.md
PhenoDocs organizes content into five layers:
| Layer | View | Content Type |
|---|---|---|
| 0 | (internal) | Raw/ephemeral (conversation dumps, scratch notes) |
| 1 | /lab/ |
Ideas, research, debug logs |
| 2 | /docs/ |
PRDs, ADRs, specifications |
| 3 | /audit/ |
Changelogs, completion reports |
| 4 | /kb/ |
Retrospectives, knowledge extracts |
// .vitepress/config.ts
import { defineConfig } from 'vitepress'
export default defineConfig({
title: 'PhenoDocs',
description: 'Federated documentation hub',
themeConfig: {
nav: [
{ text: 'Lab', link: '/lab/' },
{ text: 'Docs', link: '/docs/' },
{ text: 'Audit', link: '/audit/' },
{ text: 'KB', link: '/kb/' }
],
sidebar: {
'/docs/': [
{
text: 'Specifications',
items: [
{ text: 'PRD', link: '/docs/prd' },
{ text: 'ADRs', link: '/docs/adr' }
]
}
]
}
}
})- Add project to
HubGeneratorprojects dict - Ensure project has proper frontmatter
- Regenerate hub:
docs hub - Commit changes
PhenoDocs works with the docs_engine Python package:
# CLI
docs hub --hub-dir ../phenodocs
# MCP Tool
thegent_doc_hub_generate(hub_dir="../phenodocs")- Fork the repository
- Create a feature branch
- Make your changes
- Submit a PR
npm run build
npm run previewMIT License — see LICENSE for details.
- docs_engine — Agent-driven documentation lifecycle
- thegent — AI agent system
- pheno-sdk — SDK for Pheno APIs