[PR #37] [MERGED] Hub: the official server's market (/hub/market) #39

Closed
opened 2026-11-03 04:02:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon-site/pull/37
Author: @ludovic111
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: feat/hub-market


📝 Commits (1)

  • fd6e40b The official server's market in the hub: /hub/market

📊 Changes

4 files changed (+386 additions, -0 deletions)

View changed files

📝 README.md (+2 -0)
➕ app/api/market/route.ts (+27 -0)
➕ app/hub/market/page.tsx (+50 -0)
➕ components/market-board.tsx (+307 -0)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

/hub/market is a new page, in the style the hub and /stats already use: the aurora header, #18112c tiles, and the same range buttons and SVG charts as the player count. No existing page changes.

The page

  • Four tiles: items traded, volume over 24 h, the day's biggest move, and taxes paid to the Treasury.
  • Yesterday's summary: movers and news.
  • One item's chart, 24 hours or 30 days. It shows the mid price, the volume as violet bars, and green or red depending on the direction.
  • A table filtered by category. Each row has buy, sell, the 1 h and 24 h change (▲ green / ▼ red), the 24 h volume and a sparkline. Clicking a row charts that item.
  • The page refreshes every minute.

Data

/api/market?file=market reads Kira's GET /smp/market.json (horizon-rust/kira#110). The official server pushes its pages to Kira: horizon-rust/horizon-mods#134 (web/market.json, schema 1) POSTs them gzipped, with their own token, each minute they change. Kira holds no key to the server. KIRA_URL is optional and defaults to Kira's Railway address. If Kira has no page, the page says "The server's market isn't available right now."

Checks

npm run lint is clean. tsc --noEmit shows only the existing PageProps/LayoutProps errors, which next build generates away. next build passes on this head. Kira's /smp/market.json is live with the official server's data (2026-11-01 21:13Z), and the page is checked on playhorizon.dev after the merge.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon-site/pull/37 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/hub-market` --- ### 📝 Commits (1) - [`fd6e40b`](https://github.com/horizon-rust/horizon-site/commit/fd6e40bbc50f848a7891928b6c50dabf5be0233c) The official server's market in the hub: /hub/market ### 📊 Changes **4 files changed** (+386 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -0) ➕ `app/api/market/route.ts` (+27 -0) ➕ `app/hub/market/page.tsx` (+50 -0) ➕ `components/market-board.tsx` (+307 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. `/hub/market` is a new page, in the style the hub and `/stats` already use: the aurora header, `#18112c` tiles, and the same range buttons and SVG charts as the player count. No existing page changes. ## The page - Four tiles: items traded, volume over 24 h, the day's biggest move, and taxes paid to the Treasury. - Yesterday's summary: movers and news. - One item's chart, 24 hours or 30 days. It shows the mid price, the volume as violet bars, and green or red depending on the direction. - A table filtered by category. Each row has buy, sell, the 1 h and 24 h change (▲ green / ▼ red), the 24 h volume and a sparkline. Clicking a row charts that item. - The page refreshes every minute. ## Data `/api/market?file=market` reads Kira's `GET /smp/market.json` (horizon-rust/kira#110). The official server pushes its pages to Kira: horizon-rust/horizon-mods#134 (`web/market.json`, schema 1) POSTs them gzipped, with their own token, each minute they change. Kira holds no key to the server. `KIRA_URL` is optional and defaults to Kira's Railway address. If Kira has no page, the page says "The server's market isn't available right now." ## Checks `npm run lint` is clean. `tsc --noEmit` shows only the existing `PageProps`/`LayoutProps` errors, which `next build` generates away. `next build` passes on this head. Kira's `/smp/market.json` is live with the official server's data (2026-11-01 21:13Z), and the page is checked on playhorizon.dev after the merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:02:35 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon-site#39
No description provided.