The three apps run straight on your machine, against the services from Services:
| App | Address | Reads |
|---|---|---|
| CMS | http://localhost:3101 |
The database, Keycloak and the assets bucket |
| Website dev server | http://localhost:3100 (pages under /bengaluru/...) |
A snapshot of the published content and the resized images, not the database |
| Worker | No port | The jobs table: it runs publishing, media resizing, translation and site build triggers |
The worker is easy to forget. Without it, the CMS's Publish button only queues the job and nothing is published, and uploaded images never get their sizes.
#Before you start
- The services are up and the database is loaded: Services, Database and content.
- Nothing else uses ports 3100 and 3101 (an earlier copy of the apps, for example).
- On Windows: Application Control allows the Next.js compiler (
@next/swc-win32-x64-msvc). See Windows notes.
#Quick way
Run from <KIMS_FOLDER>:
node deployment-steps/scripts/deploy.mjs local apps prepare
node deployment-steps/scripts/deploy.mjs local apps startnode deployment-steps/scripts/deploy.mjs local apps prepare
node deployment-steps/scripts/deploy.mjs local apps startnode deployment-steps/scripts/deploy.mjs local apps prepare
node deployment-steps/scripts/deploy.mjs local apps startapps prepare does steps 1 to 3 below and ends OK: the website's content and images are ready. About 10 seconds once the images are copied.
apps start starts all three in the one window. Each line of output starts [cms], [website] or [worker]. After a minute or two:
cms ready at http://localhost:3101
website ready at http://localhost:3100/bengaluru/doctors/
worker ready (running)
OK: cms, website, worker running. Press Ctrl+C to stop.It runs until Ctrl+C, which stops all three. If one of them stops, it stops the others. apps start cms worker starts only those two. It refuses to start if a port is taken.
apps start was tested on Windows (Git Bash, 2026-11-28). On Linux and macOS it stops the apps with a plain SIGTERM to each Node process rather than Windows' taskkill /T. If a port is still taken after Ctrl+C, find and stop the leftover process: Port already in use.
#Prepare the website's content
The website dev server reads a snapshot of the published content and the resized images. These three outputs are all gitignored.
#1. Export the published content
Run from the repo:
npm run content:export -- --out .local-content --cleannpm run content:export -- --out .local-content --cleannpm run content:export -- --out .local-content --cleanIt writes the newest published version as JSON under .local-content/content (2,750 files after the first load). --version <n> exports another version.
#2. Write the media manifest
npm run media:manifest -- --out apps/website/media-manifest.jsonnpm run media:manifest -- --out apps/website/media-manifest.jsonnpm run media:manifest -- --out apps/website/media-manifest.jsonThe list of images the website uses, with their sizes.
#3. Copy the resized images
The dev server serves images from apps/website/public/media. They come from the bundle's assets/derived folder: 10,173 files, about 330 MB. (In a real deploy, the site build copies them from the assets bucket instead.) Run from the repo:
mkdir -p apps/website/public/media
cp -R ../../KIMS-v2-handover-2026-11-24/data-bundle/assets/derived/. apps/website/public/media/mkdir -p apps/website/public/media
cp -R ../../KIMS-v2-handover-2026-11-24/data-bundle/assets/derived/. apps/website/public/media/New-Item -ItemType Directory -Force apps/website/public/media
Copy-Item -Recurse -Force ../../KIMS-v2-handover-2026-11-24/data-bundle/assets/derived/* apps/website/public/media/apps prepare copies only files that are missing or a different size, so running it again is quick.
#Start the apps by hand
Each app runs in its own terminal window. Leave each window open; Ctrl+C stops it.
npm run dev does not work on Windows: the repo's script starts npm and next in a way Windows can't run without a shell, and the website's dev script uses Unix-only VAR=value syntax. On Linux and macOS it works, but it starts only the CMS and the website (with the repo's test content, not the loaded content), not the worker. So use the commands below on every system, or the quick way.
#4. Start the CMS
Run from the repo. On Linux and macOS the shell loads .env.local into the environment; on Windows the PowerShell line does the same.
cd apps/cms && set -a && . ../../.env.local && set +a && node ../../node_modules/next/dist/bin/next dev --port 3101cd apps/cms && set -a && . ../../.env.local && set +a && node ../../node_modules/next/dist/bin/next dev --port 3101Set-Location apps/cms
Get-Content ../../.env.local | ForEach-Object { if ($_ -match '^([A-Za-z_][A-Za-z0-9_]*)=(.*)