Local Next.js dashboard for visualizing an agent host wallet using the same files and field names as agent-wallet.
- Next.js (App Router, TypeScript)
- Tailwind CSS v4
- shadcn/ui core components (
new-yorkstyle,neutralbase)
By default, the dashboard reads:
~/.zbd-wallet/config.json~/.zbd-wallet/payments.json
These paths can be overridden at runtime:
ZBD_WALLET_CONFIGZBD_WALLET_PAYMENTS
Optional live balance call:
- Uses
apiKeyfromconfig.json - Calls
${ZBD_API_BASE_URL:-https://api.zbdpay.com}/v0/wallet
npm install
npm run devOpen http://localhost:3113.
You can run the dashboard immediately with included sample files:
ZBD_WALLET_CONFIG="$PWD/sample-data/config.json" \
ZBD_WALLET_PAYMENTS="$PWD/sample-data/payments.json" \
npm run devThis gives a full UI walkthrough without requiring a real API key or wallet state.
npm run dev- Starts Next.js dev server on port3113npm run build- Production buildnpm run start- Starts production servernpm run lint- ESLint check
ZBD_WALLET_CONFIG- Override config path (default~/.zbd-wallet/config.json)ZBD_WALLET_PAYMENTS- Override payments path (default~/.zbd-wallet/payments.json)ZBD_API_BASE_URL- Override ZBD API URL for live balance lookup
The repo includes local sample files in sample-data/.
ZBD_WALLET_CONFIG="$PWD/sample-data/config.json" \
ZBD_WALLET_PAYMENTS="$PWD/sample-data/payments.json" \
npm run dev- JSON compatibility follows the
agent-walletschema (id,type,amount_sats,status,timestamp,fee_sats,preimage). - The dashboard is read-only. It does not mutate wallet files.
- Persistent light/dark theme toggle in the header (system-aware, saved locally).
- Auto-refresh every 15 seconds (plus a manual
Refresh nowbutton). - CSV export from the Payments Ledger for the active filter (
All,Received, orSent). - Click any ledger row to open a transaction dialog with scrollable details and copy actions.
- ZBD branding icon wired as favicon/app icon from
public/zbd.png.
- Start with sample data:
ZBD_WALLET_CONFIG="$PWD/sample-data/config.json" \
ZBD_WALLET_PAYMENTS="$PWD/sample-data/payments.json" \
npm run dev-
Open
http://localhost:3113and confirm:- Header shows
Auto-refresh 15s. Last synctime updates automatically every ~15 seconds.Refresh nowtriggers immediate sync and spin animation.
- Header shows
-
CSV export checks:
- In Payments Ledger, choose
Alland clickExport CSV. - Repeat for
ReceivedandSent. - Confirm downloaded filenames include the active filter.
- Open each file and verify row count matches the table filter.
- In Payments Ledger, choose
-
Live-balance behavior checks:
- With invalid/missing
apiKey, confirm wallet section shows a balance diagnostic. - With a valid key in your config, confirm live balance appears and updates on refresh.
- With invalid/missing
-
Transaction dialog checks:
- Click any row in Payments Ledger.
- Confirm a shadcn dialog opens with scrollable transaction details.
- Use
Copybuttons for fields (Payment ID,Status,Amount, etc.) and confirmCopiedfeedback. - Use
Copy JSONand paste into a text editor to verify full transaction payload.
-
Dark mode checks:
- Click
Dark modein the header. - Confirm the full dashboard theme switches (background, cards, table, dialog).
- Reload page and verify theme choice persists.
- Click
-
Branding icon checks:
- Confirm browser tab icon uses the ZBD image.
- In DevTools, verify icon URL resolves to
/zbd.png.