Skip to content

About

End-user documentation for Program Rules Playground, a DHIS2 app for testing and debugging program rules

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Program Rules Playground docs

End-user documentation for Program Rules Playground, an open-source DHIS2 app for testing and debugging program rules. Built with Docusaurus 3.10.

Develop

Use the Node version in .nvmrc and pnpm.

pnpm install
pnpm start    # dev server with live reload
pnpm build    # production build; fails on broken links
pnpm lint     # prettier, tsc --noEmit on the config, markdownlint

Build the mirror

The mirror is built from the same source. DOCS_MIRROR=true marks every page noindex, points canonical links at https://prp-docs.nnkogift.dev and omits sitemap.xml.

DOCS_MIRROR=true \
DOCS_URL=https://nnkogift.github.io \
DOCS_BASE_URL=/program-rules-playground-docs/ \
pnpm build

pnpm build:mirror runs the same command.

Where it deploys

Host Trigger Workflow
GitHub Pages (mirror) Push to main deploy-pages.yml
prp-docs.nnkogift.dev Push to main deploy-server.yml

Pull requests and pushes run ci.yml, which lints and builds both variants.

One-time setup

  • GitHub Pages: in the repository settings, set Pages source to GitHub Actions.
  • Dokploy: create an application from this repo that builds the Dockerfile, and copy its deploy webhook URL into the DOKPLOY_DEPLOY_WEBHOOK repository secret.
  • DNS and TLS: DNS and TLS for prp-docs.nnkogift.dev are set up in Dokploy (domain with Let's Encrypt), not in this repo.

Run the image locally

docker build -t prp-docs .
docker run --rm -p 8080:80 prp-docs

Screenshots

Screenshots are captured by a Playwright script against a DHIS2 instance, so they can be refreshed after every app release. scripts/screenshots/manifest.mts lists every image with its stable path (docs/<folder>/img/<name>.png, and static/app-hub/ for the App Hub listing).

# DHIS2_USERNAME and DHIS2_PASSWORD go in .env (git ignores it)
APP_DIR=../program-rules-playground pnpm screenshots

By default the script uses the demo instance https://dhis.rufaa.co.tz (DHIS2 2.43). Set DHIS2_USERNAME and DHIS2_PASSWORD in .env, and ask the maintainer for access to the demo instance. screenshots.yml runs it weekly, on manual dispatch and on app-released / app-compat-changed dispatches from the app repository, and opens a pull request when images change. It reads the DHIS2_USERNAME and DHIS2_PASSWORD secrets. See docs-contributing/SCREENSHOTS.md for the environment variables and how to add a scenario.

Contributing

Read docs-contributing/STYLE_GUIDE.md and start from a template in docs-contributing/templates/. Agent guidance is in AGENTS.md.

License

BSD-3-Clause. See LICENSE.

About

End-user documentation for Program Rules Playground, a DHIS2 app for testing and debugging program rules

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages