This is a playground app for testing and debugging DHIS2 program rules. It exercises the @nnkogift/dhis2-form-utils-hooks, -rules, and -metadata packages against real form configurations, and uses @nnkogift/dhis2-form-utils-devtools (rule trace and dependency graph panels) to inspect rule evaluation live.
It consumes those packages as regular npm dependencies, published from the dhis2-form-utils monorepo — file issues or PRs against the underlying libraries there.
This project was bootstrapped with DHIS2 Application Platform.
pnpm install
pnpm dev # start the dev server, proxying against a DHIS2 instance
pnpm build # production build
pnpm test # run the test suite
pnpm lint # eslint + prettier checkIn the project directory, you can run:
Runs the app in development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner and runs all available tests found in /src.
See the section about running tests for more information.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
A deployable .zip file can be found in build/bundle!
See the section about building for more information.
Deploys the built app in the build folder to a running DHIS2 instance.
This command will prompt you to enter a server URL as well as the username and password of a DHIS2 user with the App Management authority.
You must run pnpm build before running pnpm deploy.
See the section about deploying for more information.
You can learn more about the platform in the DHIS2 Application Platform Documentation.
You can learn more about the runtime in the DHIS2 Application Runtime Documentation.
To learn React, check out the React documentation.