Some checks failed
API Endpoint Tests / test-api-endpoints (push) Successful in 10s
Blockchain Synchronization Verification / sync-verification (push) Failing after 3s
CLI Tests / test-cli (push) Failing after 4s
Documentation Validation / validate-docs (push) Successful in 8s
Documentation Validation / validate-policies-strict (push) Successful in 4s
Integration Tests / test-service-integration (push) Successful in 38s
Multi-Node Blockchain Health Monitoring / health-check (push) Successful in 2s
P2P Network Verification / p2p-verification (push) Successful in 3s
Security Scanning / security-scan (push) Successful in 40s
Smart Contract Tests / test-solidity (map[name:aitbc-token path:packages/solidity/aitbc-token]) (push) Successful in 15s
Smart Contract Tests / lint-solidity (push) Successful in 8s
- Relocate blockchain-event-bridge README content to docs/apps/blockchain/blockchain-event-bridge.md - Relocate blockchain-explorer README content to docs/apps/blockchain/blockchain-explorer.md - Replace app READMEs with redirect notices pointing to new documentation location - Consolidate documentation in central docs/ directory for better organization
1.9 KiB
1.9 KiB
Marketplace Web
Mock UI for exploring marketplace offers and submitting bids.
Development
npm install
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 Modes
Marketplace web reuses the explorer pattern of mock vs. live data:
- Set
VITE_MARKETPLACE_DATA_MODE=mock(default) to consume JSON fixtures underpublic/mock/. - Set
VITE_MARKETPLACE_DATA_MODE=liveand pointVITE_MARKETPLACE_APIto the coordinator backend when integration-ready.
Feature Flags & Auth
VITE_MARKETPLACE_ENABLE_BIDS(defaulttrue) gates whether the bid form submits to the backend. Set tofalseto keep the UI read-only during phased rollouts.VITE_MARKETPLACE_REQUIRE_AUTH(defaultfalse) enforces a bearer token session before live bid submissions. Tokens are stored inlocalStoragebysrc/lib/auth.ts; the API helpers automatically attach theAuthorizationheader when a session is present.- Session JSON is expected to include
token(string) andexpiresAt(epoch ms). Expired or malformed entries are cleared automatically.
Document any backend expectations (e.g., coordinator accepting bearer tokens) alongside the environment variables in deployment manifests.
Structure
public/mock/offers.json– sample marketplace offers.public/mock/stats.json– summary dashboard statistics.src/lib/api.ts– data-mode-aware fetch helpers.src/main.ts– renders dashboard, offers table, and bid form.src/style.css– layout and visual styling.
Submitting Bids
When in mock mode, bid submissions simulate latency and always succeed.
When in live mode, ensure the coordinator exposes /v1/marketplace/offers, /v1/marketplace/stats, and /v1/marketplace/bids endpoints compatible with the JSON shapes defined in src/lib/api.ts.