ADFA-4933: retire legacy web dashboard UI; serve REST core under /k2go-api - #296
Merged
luisguzman-adfa merged 1 commit intoJul 30, 2026
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
/socket.io and /dashboard.
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.