Repository navigation
feat(frontend): add React device status dashboard (#6) - #37
Open
2022117144 wants to merge 1 commit into
Open
2022117144 wants to merge 1 commit into
2022117144 wants to merge 1 commit into
Conversation
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.
Summary
Closes #6.
Introduce a minimal, responsive React dashboard under
frontend/for managers to view devices from the existingGET /devicesAPI.Files matching the requested scope
frontend/package.json+ lockfile: lightweight React, ReactDOM and esbuild.frontend/public/index.html+frontend/src/index.jsx: static HTML bootstrap and React mount.frontend/src/App.jsx: device list, online/offline status badges, totals, initial loading, empty results, manual refresh, timestamp and actionable API errors.frontend/src/api.js: isolated, validated device API with sensible errors and abort support.frontend/src/index.css: responsive styles.frontend/build.mjs, README and seven API regression tests.Verification on Windows / Node v24.15.0
npm test: 7 passed, 0 failed.npm run build: passed, esbuild emittedpublic/app.js(221.1 kB) andpublic/app.css(1.9 kB).git diff --cached --check: passed.The default API base is
http://localhost:8000; at build timeREACT_APP_API_BASEoverrides it.public/app.jsandpublic/app.cssare generated and intentionally gitignored. To run the UI frompublic/on a different origin, the backend must explicitly permit that origin via CORS or be served behind a same-origin proxy (documented in the README).Scope limitation: This is a tested React/API build, not a claim of an end-to-end browser test against live Raspberry Pi hardware or production FastAPI deployment. No cash bounty or acceptance/payment is implied. AI-assisted implementation disclosed.