Documentation Generator is a private, local-first tool that turns project notes into structured proposals and then initializes a ready-to-use GitHub repository with a full professional scaffold (docs, workflows, CI/CD, compose). It is designed for a single developer workflow and runs on a home server.
- Generate a proposal from a free-text plan using a fixed template (Markdown + optional PDF).
- Edit proposals in-place, save updates, and reuse past proposals without re-generating.
- Initiate a project: create
~/project/<client>/<project>, generate docs/workflows, init git, and push to GitHub viagh. - Tiered DevOps scaffolding (Tier 1/Tier 2) with CI gates, releases, and staging/production deploys.
- AI automation in generated repos (PR summary + risk, CI failure explainer, release notes draft).
- Deploy metrics logging (JSONL) plus human-readable deploy log.
- Preflight checks to fail early before spending AI tokens.
- Paste a project plan and generate a proposal.
- Review and edit the proposal in the UI.
- Initiate the project to create the scaffolded repo.
- Configure GitHub settings/secrets and begin implementation.
- Go 1.22+
- Git
- GitHub CLI (
gh) with authentication - systemd user services
- Optional (for PDF):
pandoc+ LaTeX (xelatex) - Optional (remote access): cloudflared
- Clone
git clone https://github.com/alfonsusenrico/documentation-generator.git
cd documentation-generator- Configure environment
cp .env.example .envFill in the values in .env.
- Install and run as a service
bash start-server- Open the UI
- Local:
http://localhost:3000 - Remote: use your Cloudflared tunnel URL
| Name | Required | Example | Notes |
|---|---|---|---|
| OPENAI_API_KEY | yes | sk-... | OpenAI API key |
| OPENAI_MODEL | no | gpt-5-mini | Default model |
| PORT | no | 3000 | Server port |
| PUBLIC_BASE_URL | no | https://docgen.example.com | Used for download links |
| LANG | no | en | Output language for body content |
| PREPARED_BY | no | Alfonsus Enrico | Proposal header default |
| ENABLE_PDF | no | 1 | Enable PDF output via pandoc |
| INIT_TOKEN | no | some-token | Optional header token for /api/init |
| GITHUB_OWNER | no | alfonsusenrico | GitHub owner/org slug |
| GIT_USER_NAME | no | Enrico | Optional git identity override |
| GIT_USER_EMAIL | no | you@example.com | Optional git identity override |
- Fill in project name, client/owner, and the plan.
- Click Generate proposal to produce Markdown (and PDF if enabled).
- Edit directly in the preview and click Save edits to persist and update the PDF.
- Use Existing Proposals to load from
out/without re-generating.
- Select stack (python/node), tier (1/2), and visibility.
- Click Initiate project.
- Preflight checks validate
ghauth, git identity, repo name, and target path. - The system creates
~/project/<client>/<project>, commits with[skip ci], and pushesmain+devbranches.
- Set
OPENAI_API_KEY(and optionalOPENAI_MODEL) in repo secrets/vars to enable:- PR summary + risk classification
- CI failure explainer
- Release notes draft
- If the key is missing, these workflows no-op and do not block CI.
docs/with: QUALITY, DEPLOYMENT, RUNBOOK, RELEASE, ARCHITECTURE, SECURITY, ENV_VARS, METRICS, GITHUB_SETTINGS..github/workflows/: CI, release, deploy staging/prod, AI automation..github/pull_request_template.md,.github/ISSUE_TEMPLATE/*,.github/dependabot.yml.compose/compose.staging.yml,compose/compose.prod.yml.Dockerfile,Makefile,.env.example.- Deploy logs:
docs/DEPLOY_LOG.mdand metrics JSONL:docs/DEPLOY_METRICS.jsonl.
- Apply GitHub settings from
docs/GITHUB_SETTINGS.md. - Add required secrets:
SSH_HOST,SSH_USER,SSH_KEY,SSH_PORT, optionalOPENAI_API_KEY. - Prepare servers and
.envfiles for staging/production (seedocs/DEPLOYMENT.md). - Implement a minimal
/healthendpoint and structured logging. - Configure
make migrate-checkwhen migrations are introduced.
- Generated proposals are saved in
out/. - Files are cleaned 30 minutes after a download.
- API keys remain server-side.
- For remote access, use Cloudflare Access and/or set
INIT_TOKEN.
cmd/docgen/main.go— server bootstrapinternal/— httpapi, AI, scaffolding, project init, stack catalog, progresstemplates/— proposal, README, docs, workflows, compose, Makefile, stack configpublic/— UI assetsstart-server— build + systemd service setupdevops-standard-coverage.md— coverage checklist vs standard
Proprietary — All rights reserved. No use, copying, or distribution without permission.