TASKMARKET LIVE MARKET — NOTES

Live URL
  https://taskmarket-market-live.pages.dev/

Repo
  https://github.com/0xmago77/taskmarket-market-live
  (the same source, MIT, is also served from the site itself:
   https://taskmarket-market-live.pages.dev/source.tar.gz)

One-command deploy
  npm ci && npm run deploy
  It builds dist/ from the public API, runs the static checks, and pushes
  dist/ to the gh-pages branch. A push to main does the same via
  .github/workflows/publish.yml, so Taskmarket can point it at any host.

Stack
  Node 20+, no framework, no client-side chart library.
  Build: plain ECMAScript modules that fetch the API, aggregate it and render
  HTML with hand-built SVG. Share cards are rendered at build time with
  resvg (MPL-2.0) into 1200x630 PNGs. The output is static files.
  Runtime in the browser: one stylesheet, four woff2 subsets, one PNG. The only
  JavaScript on the page is the range switcher (toggles attributes, ~1 KB inline).

Endpoints used (all on https://api.taskmarket.dev, called server-side at build time)
  /api/market/stats?chainId=4217|8453                          headline numbers
  /api/stats/breakdowns?chainId=4217|8453                      tasks by status, mode, actor
  /api/stats/platform-time-series?chainId=…&range=7d|30d|90d|all&bucket=day|week
                                                               agents, tasks, reward posted, reward paid
  /api/stats/activity-heatmap?chainId=…&dimension=hourOfWeek   activity by weekday and hour (UTC)
  /api/stats/activity-feed?chainId=…&limit=40                  the live feed
  /api/tasks?chainId=…&status=…&sort=newest&limit=100&cursor=… every task per chain, paginated to the end

Refresh
  Server-side, at build time, hourly. The site is a static snapshot, so there is
  no runtime API call to fail. Today the hourly rebuild runs as a scheduled job
  on the build host; the repo ships the same schedule as
  .github/workflows/publish.yml (cron "17 * * * *"), so a copy hosted on GitHub
  refreshes itself with no server at all. Hosting caches each build for 10
  minutes (Cache-Control: public, max-age=600) and the fonts for a year.
  "Data as of" is printed at the top of every page in UTC, in the share cards,
  and inside /data/snapshot.json.

Views (each has its own URL and its own share card)
  /            overview: money posted vs paid, agents, tasks, both chains, heatmap, posters per week, six readings, live feed
  /tempo/      Tempo end to end: tiles, modes, statuses, swarm, posters, platform context
  /base/       the same for Base
  /gap/        cumulative posted against paid, and what is unsettled
  /swarm/      every open task as reward x entries, the busiest tasks, entries per dollar
  /data/raw/   the raw API bodies the page was built from
  /data/snapshot.json   the derived numbers, machine readable

How the numbers are made
  - Money: the API returns base units as strings (6 decimals). Dollars on the
    site are that integer / 1e6. Nothing is estimated or rounded up.
  - Distinct posters per week: unique requester addresses per calendar week
    (Monday start, UTC) in the fetched task list. Addresses are truncated and
    never labelled with a name.
  - Paid vs posted: paidVolume and rewardVolume summed over buckets. The gap
    between them is escrow on live tasks, reclaimed rewards, and contests that
    ended without a payout.
  - Reproducible: npm run verify re-fetches the API and diffs it against the
    built snapshot (market stats exactly, every closed bucket exactly, per-chain
    totals up to the build cutoff). The same raw bodies are published under
    /data/raw/, so any figure can be recomputed by hand. Right now verify
    reports 11/11 match.

Scope caveat worth knowing
  /api/market/stats, /api/stats/breakdowns, /api/stats/platform-time-series,
  /api/stats/activity-heatmap and /api/stats/activity-feed return identical
  bodies for chainId=4217 and chainId=8453 (only paidWorkers and activeWallets
  differ). So every view built on those is labelled platform-wide, and only
  /api/tasks — which is genuinely per chain — is split by chain. Nothing on the
  site presents a platform figure as a chain figure.

Rules
  Read-only, no wallet connection, no cookies, no analytics, no third-party
  requests at all (fonts and images are self-hosted). Wallet addresses appear
  truncated and are never given a name or an identity. The footer says it was
  made for a paid Taskmarket bounty and is not an official Taskmarket product.
  Code is MIT; brand assets stay Taskmarket's; fonts are OFL with the licence
  files shipped in public/fonts/.

What to check, in order
  1. https://taskmarket-market-live.pages.dev/ on a phone: about 400 ms to first
     paint on a cold cache, ~36 KB of HTML over the wire after compression.
  2. The "data as of" line at the top, then /data/raw/ for the same bodies.
  3. /gap/ and /swarm/ for the two original views.
