ADR-077: Multi-Repo Documentation Aggregation

Status

Proposed

Context

CloudEmpiere is a consulting SaaS company with heavy knowledge assets distributed across 10+ repositories. Documentation needs include:

Audiences

  1. Developers - Technical docs, ADRs, API references
  2. Product Managers - Product design, requirements, roadmaps
  3. Consultants - Client resources, SOPs, implementation guides

Source Repositories (10+)

Repository ADR Prefix Content Type
idempiere-hub ADR-0XX CLI/MCP/API architecture
nx-frontend FE-0XX Angular frontend decisions
ionic-mobile MOB-0XX Mobile app architecture
idempiere-plugins PLG-0XX Plugin development
cloudempiere-infra INF-0XX DevOps, infrastructure
... ... ...

Decision

1. Hybrid Aggregation Model

Use symlinks for local development + CI sync for production:

cloudempiere-docs/
├── content/
│   ├── index.md                    # Landing page
│   ├── getting-started.md          # Onboarding
│   │
│   ├── developers/                 # 🔧 DEVELOPER AUDIENCE
│   │   ├── index.md
│   │   ├── architecture/           # Cross-repo ADR aggregation
│   │   │   ├── index.md            # ADR index with search
│   │   │   ├── idempiere-hub/      # → symlink to ../../../idempiere-hub/docs/adr
│   │   │   ├── nx-frontend/        # → symlink to ../../../nx-frontend/docs/adr
│   │   │   └── ionic-mobile/       # → symlink to ../../../ionic-mobile/docs/adr
│   │   ├── api-reference/
│   │   └── guides/
│   │
│   ├── product/                    # 📋 PRODUCT MANAGER AUDIENCE
│   │   ├── index.md
│   │   ├── roadmap/
│   │   ├── requirements/           # PRDs, specs
│   │   ├── releases/               # Release notes aggregated
│   │   └── analytics/              # Usage metrics, KPIs
│   │
│   ├── consulting/                 # 🤝 CONSULTANT AUDIENCE
│   │   ├── index.md
│   │   ├── client-onboarding/
│   │   ├── workflows/              # SOPs, processes
│   │   ├── support-kb/             # Knowledge base
│   │   └── audits/                 # Security, compliance
│   │
│   ├── idempiere/                  # Core ERP knowledge
│   ├── cloudempiere/               # Hub ecosystem
│   ├── nx-frontend/                # Angular frontend
│   ├── ionic-mobile/               # Mobile app
│   └── cheatsheets/                # Quick references

Create docs-config.yaml in cloudempiere-docs root:

# docs-config.yaml
aggregation:
  # Symlink mappings for local development
  symlinks:
    - source: ../idempiere-hub/docs/adr
      target: content/developers/architecture/idempiere-hub
    - source: ../nx-frontend/docs/adr
      target: content/developers/architecture/nx-frontend
    - source: ../ionic-mobile/docs/adr
      target: content/developers/architecture/ionic-mobile
    - source: ../idempiere-hub/CHANGELOG.md
      target: content/product/releases/idempiere-hub.md

  # CI sync for repos not locally available
  ci_sync:
    - repo: cloudempiere/idempiere-plugins
      path: docs/adr
      target: content/developers/architecture/idempiere-plugins

3. ADR Index Generation

Auto-generate ADR index from all symlinked repos:

# Architecture Decision Records

| ID | Title | Status | Product | Date |
|----|-------|--------|---------|------|
| [ADR-077](idempiere-hub/077-multi-repo...) | Multi-Repo Aggregation | Proposed | Hub | 2024-12 |
| [FE-012](nx-frontend/012-state-mgmt...) | State Management | Accepted | Frontend | 2024-11 |

4. Audience-Based Navigation

Update base.html sidebar to be audience-aware:

<h3>👤 By Role</h3>
<ul>
    <li><a href="/docs/developers/">Developers</a></li>
    <li><a href="/docs/product/">Product</a></li>
    <li><a href="/docs/consulting/">Consultants</a></li>
</ul>

<h3>📦 By Product</h3>
<ul>
    <li><a href="/docs/idempiere/">iDempiere</a></li>
    <li><a href="/docs/cloudempiere/">CloudEmpiere</a></li>
    <li><a href="/docs/nx-frontend/">Nx Frontend</a></li>
    <li><a href="/docs/ionic-mobile/">Ionic Mobile</a></li>
</ul>

Aggregation Strategies Compared

Strategy Pros Cons Use When
Symlinks Zero duplication, real-time Local repos required Local dev
Git Submodules Version-pinned Complex updates Stable references
CI Sync Works with remote repos Stale until sync Production build
Copy on Release Simple, controlled Manual effort Release notes

Implementation Plan

  1. Create audience directories in cloudempiere-docs
  2. Add symlink setup script
  3. Update sidebar navigation

Phase 2: CI Aggregation (Sprint 2)

  1. GitHub Action to sync remote repos
  2. ADR index generator script
  3. Search across all docs

Phase 3: Knowledge Graph (Future)

  1. Cross-reference ADRs
  2. Dependency visualization
  3. AI-powered search via RAG

Consequences

Positive

Negative

Risks

References

Path: /docs/developers/architecture/idempiere-hub/077-multi-repo-documentation-aggregation