End-user documentation for Program Rules Playground, an open-source DHIS2 app for testing and debugging program rules. Built with Docusaurus 3.10.
- Canonical site: https://prp-docs.nnkogift.dev
- Mirror: https://nnkogift.github.io/program-rules-playground-docs/
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, markdownlintThe 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 buildpnpm build:mirror runs the same command.
| 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.
- 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 theDOKPLOY_DEPLOY_WEBHOOKrepository secret. - DNS and TLS: DNS and TLS for
prp-docs.nnkogift.devare set up in Dokploy (domain with Let's Encrypt), not in this repo.
docker build -t prp-docs .
docker run --rm -p 8080:80 prp-docsScreenshots 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 screenshotsBy 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.
Read docs-contributing/STYLE_GUIDE.md and start from a template in docs-contributing/templates/. Agent guidance is in AGENTS.md.
BSD-3-Clause. See LICENSE.