[modularization] Phase 2: Data Layer — Gitea, Weather, Bitcoin, Loaders #411
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 2 of App.js Modularization (Refs #409)
What
Extract all API/data fetching into isolated modules:
modules/data/gitea.js— All Gitea API calls: commits, PRs, agent status. Writes tostate.commits,state.agentStatus,state.zoneIntensitymodules/data/weather.js— Open-Meteo fetch. Writes tostate.weathermodules/data/bitcoin.js— Blockstream block height polling. Writes tostate.blockHeightmodules/data/loaders.js— JSON file loaders: portals.json, sovereignty-status.json, SOUL.mdRule
No
fetch()calls outside ofdata/modules. All visual modules read fromstate.js.Acceptance Criteria
node --check app.jspassesDepends on: Phase 1 (core/)
Refs #409
PR created: http://143.198.27.163:3000/Timmy_Foundation/the-nexus/pulls/462
This extracts the last
fetch()call outsidemodules/data/— the portal health URL probe inmodules/weather.js— into a newcheckPortalHealth()function inmodules/data/loaders.js. All 4 data modules were already in place from prior PRs; this is the final cleanup that satisfies all Phase 2 acceptance criteria:gitea.js,weather.js,bitcoin.js,loaders.js)fetch()calls isolated tomodules/data/node --check app.jspasses