Files
aitbc/apps/explorer-web
oib 7062b2cc78 feat: add dark mode, navigation, and Web Vitals tracking to marketplace
Backend:
- Simplify DatabaseConfig: remove effective_url property and project root finder
- Update to Pydantic v2 model_config (replace nested Config class)
- Add web_vitals router to main.py and __init__.py
- Fix ExplorerService datetime handling (ensure timezone-naive comparisons)
- Fix status_label extraction to handle both enum and string job states

Frontend (Marketplace):
- Add dark mode toggle with system preference detection
2026-02-15 19:02:51 +01:00
..
```
2025-12-22 15:51:19 +01:00
```
2025-12-22 15:51:19 +01:00

Explorer Web

Purpose & Scope

Static web explorer for the AITBC blockchain node, displaying blocks, transactions, and receipts as outlined in docs/bootstrap/explorer_web.md.

Development Setup

npm install
  • Start the dev server (Vite):
    npm run dev
    
    The dev server listens on http://localhost:5173/ by default. Adjust via --host/--port flags in the systemd unit or package.json script.

Data Mode Toggle

  • Configuration lives in src/config.ts and can be overridden with environment variables.
  • Use VITE_DATA_MODE to choose between mock (default) and live.
  • When switching to live data, set VITE_COORDINATOR_API to the coordinator base URL (e.g., http://localhost:8000).
  • Example .env snippet:
    VITE_DATA_MODE=live
    VITE_COORDINATOR_API=https://coordinator.dev.internal
    

Feature Flags & Auth

  • Document any backend expectations (e.g., coordinator accepting bearer tokens) alongside the environment variables in deployment manifests.

End-to-End Tests

  • Install browsers after npm install by running npx playwright install.
  • Launch the dev server (or point EXPLORER_BASE_URL at an already running instance) and run:
    npm run test:e2e
    
  • Tests automatically persist live mode and stub coordinator responses to verify overview, blocks, and transactions views.

Playwright

  • Run npm run test:e2e to execute the end-to-end tests.
  • The tests will automatically persist live mode and stub coordinator responses to verify overview, blocks, and transactions views.