KKIMS on-site docs
Your workstation

Get the code and the handover

Set up the working folder, clone kims-v2 from GitHub or from the git bundle, install its packages, extract the handover zip on Linux, macOS or Windows, and check the data bundle so you know the copy you carry on site is whole.

By the end of this page you have, on your laptop:

text
<WORK>/
  repos/kims-v2/                      the code, on branch main, with npm packages installed
  KIMS-v2-handover-2026-11-24/        the handover, extracted
    kims-v2.bundle
    data-bundle/                      checked: "bundle ok: 13247 rows, 11307 objects"
    KIMS-v2-On-site-deployment-runbook.docx

You need Git and Node.js 24 installed first.

#What you are getting

Item What it is Where it comes from
The code The kims-v2 repository, branch main. Holds no secrets: only local test values, and .env.local is not in Git GitHub (https://github.com/DayntTech/kims-v2, private) or the git bundle in the handover
The handover zip content-latest.zip. Unpacks into KIMS-v2-handover-2026-11-24/ ClinicSpots gives it to you (ask the project owner how; it is about 530 MB)
The data bundle data-bundle/ inside the handover: the content (2,750 entities, 489 blogs among them) and the media library (1,102 records, 11,307 files). 13,247 database rows in all Made with scripts/handover/data-bundle.mjs export from a clean database on 2026-11-24
The Word runbook KIMS-v2-On-site-deployment-runbook.docx The original on-site runbook. This site replaces it; where they differ, follow this site

The zip was called KIMS-v2-handover-2026-11-24.zip until 2026-11-28; only its name changed. The folder inside keeps the old name, and every page uses it.

#Make the working folder

bash
mkdir -p ~/kims/repos && cd ~/kims
bash
mkdir -p ~/kims/repos && cd ~/kims
powershell
New-Item -ItemType Directory -Force C:\kims\repos | Out-Null; Set-Location C:\kims

A short path like C:\kims keeps you well under Windows's path length limit. (If you prefer your home folder, $HOME\kims works too once long paths are on.)

This folder is <WORK> on every page. Put the handover zip in it.

#Clone the code

#From GitHub

Needs access to the private repository and git signed in to GitHub (Git credentials). From <WORK>:

text
git clone https://github.com/DayntTech/kims-v2 repos/kims-v2

You should see Cloning into 'repos/kims-v2'... and then done. (On PowerShell this arrives in red: that is stderr, not an error.)

#From the git bundle (no GitHub needed)

Use this on a network that cannot reach GitHub, or if you have no GitHub access. Extract the handover zip first (below), then from <WORK>:

text
git bundle list-heads KIMS-v2-handover-2026-11-24/kims-v2.bundle

You should see one line, the commit the bundle holds:

text
535cdc72f3b6d160674605be733879c2a017b644 refs/heads/main

Clone it:

text
git clone -b main KIMS-v2-handover-2026-11-24/kims-v2.bundle repos/kims-v2

(git bundle verify needs to run inside a repository, so it fails with need a repository to verify a bundle from <WORK>. If you want it, run it from inside the new clone: git bundle verify ../../KIMS-v2-handover-2026-11-24/kims-v2.bundle, which ends ... is okay.)

The clone's origin now points at the bundle file. That is fine: you push to KIMS's Git with a separate remote (Push the code).

#Check which commit you have

From <WORK>/repos/kims-v2:

text
git status
git log -1 --oneline

You should see On branch main, nothing to commit, working tree clean, and the commit that will be deployed. At hand-over (2026-11-28) both GitHub and the bundle held:

text
535cdc7 Runbook: AWS set-up from scratch, Hyderabad region

A clone from GitHub may be newer. Note the commit you take on site; it is what KIMS will run, and the hand-over records it.

Note

main is the code KIMS gets. It deploys production from main and, if KIMS wants UAT, UAT from a uat branch, each from its own Jenkins folder. There is also a windows-fixes branch on GitHub with fixes for running the local rehearsal on Windows. It is not merged into main, it lacks main's three newest commits, and it does not merge cleanly. Never push it to KIMS. If you want its local fixes on a Windows laptop, keep them in a separate clone used only for the rehearsal: git clone -b windows-fixes https://github.com/DayntTech/kims-v2 repos/kims-v2-windows. Windows notes says which local steps need it.

#Install the packages

From <WORK>/repos/kims-v2:

text
npm install

It takes a few minutes and ends with added NNNN packages (and possibly found 0 vulnerabilities or a list of advisories; neither stops you). On a Node other than 24 there are npm warn EBADENGINE lines first: install Node 24 (Node).

Then check:

text
npm ls next --workspace @kims/cms

You should see next@16.3.0 (16.x) under @kims/cms.

Tip

On Windows, now run the three native-module checks in Windows notes, before anything else uses Next.js.

If npm install changed package-lock.json (git status lists it), restore it with git checkout -- package-lock.json. Nothing on site should change the code.

#Extract the handover zip

From <WORK>, with content-latest.zip in it:

bash
unzip -q content-latest.zip

(Install unzip with sudo apt install -y unzip or sudo dnf install -y unzip if it is missing.)

bash
unzip -q content-latest.zip

Use the command line rather than double-clicking in Finder, and do not open the data-bundle/assets folders in Finder: Finder can leave .DS_Store files in folders it shows, and the bundle check reports any file not in its manifest (assets/.../.DS_Store: not in the manifest). If that happens, delete them: find KIMS-v2-handover-2026-11-24/data-bundle -name .DS_Store -delete.

powershell
C:\Windows\System32\tar.exe -xf content-latest.zip

Do not use Explorer's "Extract all" (it adds a folder level and fails with "path too long"), and do not use Git Bash's tar (it cannot read zip files). It prints nothing and takes a minute or two.

Check what you got:

bash
ls KIMS-v2-handover-2026-11-24
ls KIMS-v2-handover-2026-11-24/data-bundle
bash
ls KIMS-v2-handover-2026-11-24
ls KIMS-v2-handover-2026-11-24/data-bundle
powershell
Get-ChildItem KIMS-v2-handover-2026-11-24 | Select-Object Name
Get-ChildItem KIMS-v2-handover-2026-11-24\data-bundle | Select-Object Name

You should see KIMS-v2-On-site-deployment-runbook.docx, data-bundle and kims-v2.bundle, and inside data-bundle: MANIFEST.json, assets and tables.

If a __MACOSX folder appears next to them, delete it; it is leftover metadata from a zip made on a Mac and is not part of the bundle.

#Check the data bundle

data-bundle.mjs check recomputes the SHA-256 of every table file and every media file and compares it with MANIFEST.json. It needs no services and no .env.local, only the repository's packages (npm install above). Run it from <WORK>/repos/kims-v2:

bash
node scripts/handover/data-bundle.mjs check --from ../../KIMS-v2-handover-2026-11-24/data-bundle
bash
node scripts/handover/data-bundle.mjs check --from ../../KIMS-v2-handover-2026-11-24/data-bundle
powershell
node scripts/handover/data-bundle.mjs check --from ..\..\KIMS-v2-handover-2026-11-24\data-bundle

It counts up (500 of 11307, 1000 of 11307, ... 11000 of 11307) and ends with exactly:

text
bundle ok: 13247 rows, 11307 objects, made 2026-11-24T14:03:17.744Z

It takes a few seconds to a minute. Anything else is a damaged or incomplete copy: see If it goes wrong.

#Check it after every copy

Run the check again every time the bundle is copied: onto a USB drive, onto the machine you load it from on site, into a shared folder. The load itself checks again before it writes anything, but finding a bad copy at the start of the day is better than in front of KIMS's team.

To check a copy somewhere else, point --from at it, for example --from E:\data-bundle or --from /media/usb/data-bundle.

#What the bundle does and does not carry

Carried Not carried
Drafts, versions and the live snapshot (state_objects, publish_versions, published_files) People (cms_users, sessions): they come from Keycloak and the People screen
The media library records (media_assets, media_usage) Jobs and site build history
Every media file for the assets bucket (assets/originals/..., assets/derived/...) Stored secrets (the Google key and reviews sign-in): encrypted with the source's SECRETS_KEY, so they are entered again in each environment

The content arrives as publish version 1. Loading it into an environment is on Content load.

#Keep it safe

  • The code holds no secrets; the data bundle holds KIMS's published content and media (nothing secret, but not yours to share). Keep both on an encrypted disk.
  • Do not commit anything into repos/kims-v2 on site, and never create .env.local with real KIMS values: real values go into Kubernetes Secrets and Jenkins credentials only.
  • Do not put the handover or your notes inside the repository folder, where git add could pick them up.

#If it goes wrong

What you see Cause Fix
remote: Repository not found. No access to the private GitHub repository Ask for access, or clone from the bundle
error: ... does not look like a v2 or v3 bundle file The bundle file is damaged or not fully copied Extract the zip again
warning: remote HEAD refers to nonexistent ref, unable to checkout Cloned the bundle without -b main git checkout main inside the clone, or clone again with -b main
Error: Cannot find module 'pg' or '@aws-sdk/client-s3' from the check npm install not run in the repository Run npm install from <WORK>/repos/kims-v2
ENOENT: no such file or directory, open '.../MANIFEST.json' Wrong --from path Point at the data-bundle folder itself, not its parent
The bundle does not match its manifest (N problems) with checksum differs or missing Incomplete or damaged copy Extract the zip again from the original and check again
... .DS_Store: not in the manifest Finder added files (macOS) find <data-bundle> -name .DS_Store -delete, check again
"path too long" while extracting (Windows) Explorer's "Extract all" Delete the half-extracted folder, use tar.exe
tar: Error opening archive: Unrecognized archive format Git Bash's tar C:\Windows\System32\tar.exe from PowerShell
git status shows files modified right after cloning (Windows) Line endings only git diff --ignore-cr-at-eol --stat; see Git

#Sources

Built 2026-11-29. Commands are shown for the system picked at the top; every block has all three.