VitePress Federation Hub β Aggregate documentation from multiple projects into a unified portal
Live Demo: https://kooshapari.github.io/phenodocs/
Every merged wave should land via pull request to main (or a release branch), update CHANGELOG.md when the change is user-visible, and keep bun run build green for doc config changes. See docs/guides/full-turn-delivery.md and docs/guides/tooling.md.
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 JS deps (Bun) and Python tooling (uv, CPython 3.14+)
curl -fsSL https://bun.sh/install | bash # if Bun not installed
curl -LsSf https://astral.sh/uv/install.sh | sh # if uv not installed
bun install
uv sync --group devAfter cloning, use gh pr list / gh pr view (GitHub CLI) to see open PRs and merge status; gh pr view --web opens the current branchβs PR in the browser.
# Development server
bun run dev
# Build for production
bun run build
# Preview production build
bun run preview
# Oxlint + vue-tsc + link stub
bun run checkFrom 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
bun run build
bun run previewMIT License β see LICENSE for details.
- docs_engine β Agent-driven documentation lifecycle
- thegent β AI agent system
- pheno-sdk β SDK for Pheno APIs