Skip to content

ADFA-4933: retire legacy web dashboard UI; serve REST core under /k2go-api - #296

Merged
luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-4933-k2go-api-retire-web-dashboard
Jul 30, 2026
Merged

ADFA-4933: retire legacy web dashboard UI; serve REST core under /k2go-api#296
luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-4933-k2go-api-retire-web-dashboard

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

The dashboard's REST engine was mounted at root /api. Under the shared :8085
server that path also belongs to Kolibri, and nginx precedence (^~ /api/ beats
Kolibri's ~ regex) sent every /api to the dashboard -> Kolibri 404'd.

  • nginx: expose the engine under /k2go-api (-> :4000/api); drop root /api,
    /socket.io and /dashboard.
  • server.ts: headless REST core — remove socket.io + the EJS/static web UI.
  • Retire the web UI: delete views/, public/, the kiwix/home/books socket
    handlers and the web-only lang-parity test; trim maps.socket.ts to its pure
    helpers; drop now-unused deps (ejs, socket.io).

Nothing loads /dashboard/ (Android is REST + native). Kolibri needs no change
once root /api is free. Verified: tsc --noEmit clean, npm test 16/16.
Atomic cutover — ship with the paired APK PR.

…o-api

The dashboard's REST engine was mounted at the root /api. Under the shared :8085
nginx server that path also belongs to Kolibri; nginx precedence (^~ /api/ beats
Kolibri's ~ regex) sent every /api request to the dashboard, so Kolibri's
frontend 404'd. Free the root /api by namespacing our REST core.

- nginx (dash-node-nginx.conf): expose the engine under /k2go-api (-> :4000/api);
  drop the root /api, /socket.io and /dashboard blocks.
- server.ts: headless REST core — remove socket.io and the EJS/static web UI;
  keep helmet, express.json and the /api router.
- Retire the web UI: delete views/, public/, the kiwix/home/books socket handlers
  and the web-only lang-parity test; trim maps.socket.ts to its pure helpers
  (parseBox/parseEstimate/... used by routes.ts, maps.exec and the unit tests).
- Drop now-unused deps (ejs, socket.io).

Android already uses REST + native screens and nothing loads /dashboard/, so the
web surface has no consumer. Kolibri needs no change once root /api is free.

Paired with the Android change (point BoxEndpoints/clients at /k2go-api) under the
same ticket; ship the rootfs and APK together (no back-compat shim on /api).

Verified: tsc --noEmit clean; npm test 16/16 pass.
@luisguzman-adfa
luisguzman-adfa merged commit e373981 into main Jul 30, 2026
4 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/ADFA-4933-k2go-api-retire-web-dashboard branch July 30, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant