A clear, minimal reference UI for exploring cub-scout JSON outputs.
This repo is intentionally opinionated:
- Local mode first: no OAuth needed, no backend required.
- Connected mode optional: can use ConfigHub auth flow through
@confighub/ui-react. - Readable architecture: parser + view model + tree explorer.
If you only want to validate the UI behavior, local mode is enough.
- Parse and render these
cub-scoutpayloads:tree ownershiptree runtimetree git
- Paste JSON, upload JSON, or load included sample payloads.
- Search/filter tree nodes.
- Inspect selected node details.
src/
App.tsx # main explorer page
data/samples.ts # reusable sample payloads
lib/cubScoutAdapter.ts # payload detection + view model construction
types/cubScout.ts # data contracts for supported payloads
test/adapter.test.ts # parser unit tests
flowchart LR
A["cub-scout CLI JSON"] --> B["Parser (src/lib/cubScoutAdapter.ts)"]
B --> C["Explorer model"]
C --> D["Tree UI (SimpleTreeView)"]
D --> E["Node details pane"]
npm install
npm run devOpen: http://127.0.0.1:5173
Expected result:
- You see the
cub-scout-uipage immediately. - Click
Load samplethenApply JSON. - A hierarchy appears on the right.
- Clicking nodes updates the details panel.
- Search narrows tree results.
If all 5 happen, local mode is working.
Connected mode is opt-in.
VITE_ENABLE_CONFIGHUB_AUTH=true \
CONFIGHUB_BACKEND_URL=https://hub.confighub.com \
npm run devIf your OAuth provider/backend does not allow the exact dev origin, login fails.
You must register the exact URL used by Vite. This example runs at:
http://127.0.0.1:5173
If you change host/port, register that exact origin too.
- Confirm the browser URL is exactly
http://127.0.0.1:5173. - Ensure that exact origin is allowed in ConfigHub OAuth/backend settings.
- Keep host/port stable (
strictPortis enabled in Vite config). - Retry login.
Examples:
cub-scout tree ownership --format json > ownership.json
cub-scout tree runtime --json > runtime.json
cub-scout tree git --format json > git.jsonThen upload the file or paste JSON into the left panel.
npm test
npm run buildVITE_ENABLE_CONFIGHUB_AUTHfalse(default): local modetrue: connected mode with auth gate
CONFIGHUB_BACKEND_URL- default:
https://hub.confighub.com - set to local backend if needed
- default:
- Focuses on
cub-scoutJSON exploration, not spaces/units dashboard. - Works fully offline in local mode.
- Includes explicit OAuth troubleshooting so login failures are easier to diagnose.