cloudempiere-docs Repository Setup

Companion guide to ADR-076. Use this to initialize the central documentation repository.

Quick Start

# Create and initialize the repository
mkdir cloudempiere-docs && cd cloudempiere-docs
git init

# Create directory structure
mkdir -p architecture/decisions/{idempiere-hub,frontend,plugins}
mkdir -p architecture/{patterns,diagrams}
mkdir -p guides/{getting-started,development,deployment,consulting}
mkdir -p reference/{application-dictionary,api,cli,mcp-tools}
mkdir -p knowledge-base/{idempiere,support,troubleshooting}
mkdir -p research/{completed,active}
mkdir -p cheatsheets
mkdir -p templates

# Initialize with README
cat > README.md << 'EOF'
# CloudEmpiere Documentation

Central documentation hub for CloudEmpiere projects.

## Structure

| Directory | Content |
|-----------|---------|
| `architecture/` | ADRs, patterns, diagrams |
| `guides/` | How-to documentation |
| `reference/` | API, CLI, MCP reference |
| `knowledge-base/` | Support KB, troubleshooting |
| `research/` | Research documents |
| `cheatsheets/` | Quick reference guides |

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

## Building

```bash
# Using MkDocs
pip install mkdocs mkdocs-material
mkdocs serve

# Or using Docusaurus
npm install
npm start

EOF


## MkDocs Configuration

```yaml
# mkdocs.yml
site_name: CloudEmpiere Docs
site_url: https://docs.cloudempiere.com
repo_url: https://github.com/cloudempiere/cloudempiere-docs

theme:
  name: material
  palette:
    primary: indigo
    accent: indigo
  features:
    - navigation.tabs
    - navigation.sections
    - search.suggest
    - content.code.copy

nav:
  - Home: index.md
  - Architecture:
    - Decisions: architecture/decisions/index.md
    - Patterns: architecture/patterns/index.md
  - Guides:
    - Getting Started: guides/getting-started/index.md
    - Development: guides/development/index.md
    - Deployment: guides/deployment/index.md
  - Reference:
    - Application Dictionary: reference/application-dictionary/index.md
    - CLI: reference/cli/index.md
    - MCP Tools: reference/mcp-tools/index.md
  - Knowledge Base:
    - iDempiere: knowledge-base/idempiere/index.md
    - Support: knowledge-base/support/index.md
  - Cheatsheets: cheatsheets/index.md

plugins:
  - search
  - tags

markdown_extensions:
  - admonition
  - codehilite
  - toc:
      permalink: true
  - pymdownx.superfences
  - pymdownx.tabbed:
      alternate_style: true

Migration Mapping

Source (idempiere-hub) Destination (cloudempiere-docs)
docs/adr/*.md architecture/decisions/idempiere-hub/
docs/application-dictionary/*.md reference/application-dictionary/
docs/guides/*.md guides/development/
docs/research/*.md research/completed/
docs/cheatsheets/*.md cheatsheets/
docs/ref/*.md reference/
docs/user/*.md guides/getting-started/

GitHub Actions Workflow

# .github/workflows/docs.yml
name: Deploy Documentation

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.x'

      - name: Install dependencies
        run: pip install mkdocs mkdocs-material

      - name: Build docs
        run: mkdocs build

      - name: Deploy to GitHub Pages
        if: github.ref == 'refs/heads/main'
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./site

Templates

ADR Template

# ADR-XXX: Title

## Status
Proposed | Accepted | Deprecated | Superseded

## Date
YYYY-MM-DD

## Context
What is the issue we're addressing?

## Decision
What did we decide?

## Consequences
What are the results?

## References
- Related ADRs
- External links

Guide Template

# Guide: Title

## Overview
Brief description

## Prerequisites
What you need before starting

## Steps

### 1. First Step
Details...

### 2. Second Step
Details...

## Troubleshooting
Common issues and solutions

## Related
- Links to related guides

Integration with idempiere-hub

After migration, update idempiere-hub to reference central docs:

// DocsServerCommand.java
@Command(name = "docs", description = "Serve documentation from cloudempiere-docs")
public class DocsServerCommand implements Callable<Integer> {

    @Option(names = "--repo",
            defaultValue = "https://github.com/cloudempiere/cloudempiere-docs")
    String docsRepo;

    @Option(names = "--local-path",
            description = "Path to local clone of cloudempiere-docs")
    Path localPath;

    @Override
    public Integer call() {
        // Clone or pull docs repo
        // Serve via Qute Web
    }
}

Path: /docs/developers/architecture/idempiere-hub/076-cloudempiere-docs-setup