Kulcare Docs
Developer

Admin CI: local-first, GitHub only on the trunk

The admin app (admin/) has its own canonical gate, the same way frontend/ and patient/ do (#2329). Run it before you open a feature PR that touches admin/ or frontend/packages/:

cd admin
pnpm run ci      # the same as bin/ci

What it runs

StepGate
pnpm install --frozen-lockfileMust pass. A stale admin/pnpm-lock.yaml fails here, which is also what fails the Cloudflare Pages build.
Build the linked @kulcare/* packagesAdmin reads their types from each package's dist/.
pnpm run lintMust pass (it is clean).
Typecheck of tsconfig.app.jsonRatcheted to admin/.ci-baselines/typecheck.txt. The count may only go down.
Typecheck of tsconfig.node.jsonMust pass.
vitest runMust pass.

tsc --noEmit against admin/tsconfig.json checks nothing, because that file has "files": [] and lists only references. The gate names both projects.

The lockfiles must agree with shared packages

Admin's pnpm workspace includes ../frontend/packages/*. When you add a dependency to a shared package, run pnpm install in admin/ and in patient/ as well as in frontend/, and commit all three lockfiles. If you do not, the frozen install fails in both apps.

The admin install relinks frontend/packages/*/node_modules into admin's own package store. Frontend tests then load two copies of React and fail with "Cannot read properties of null (reading 'useRef')". To prevent this, admin/bin/ci reinstalls frontend/ when it exits, whether it passes or fails. If you ran a plain pnpm install in admin/, run pnpm install in frontend/ before the next frontend test run.

The master gate

.github/workflows/admin-ci.yml runs admin/bin/ci on pull requests into master that change admin/** or frontend/packages/**.

On this page