Near real-time decision-support site for Garden Horizons players:
- Live stock tracker (client polls every 90s)
- Restock countdown + confidence score
- Codes quick copy panel
- Mutation guide pages
- ROI calculator
- 24h stock history page
- Trust pages: About, Contact, Privacy, Terms
- Optional GA4 support via env var
- Canonical + robots metadata and structured data
- Favicon/manifest assets in
public/
- Frontend: Next.js 14 (App Router)
- Rendering: Static export (
output: "export") - Hosting: Cloudflare Pages
- Data update: GitHub Actions + JSON files (no custom backend)
npm install
npm run devnpm run buildBuild artifacts are generated in out/.
- Push repository to GitHub.
- In Cloudflare dashboard: Pages -> Create project -> Connect to Git.
- Build settings:
- Framework preset:
Next.js (Static HTML Export) - Build command:
npm run build - Build output directory:
out
- Framework preset:
- Environment variables (optional):
NODE_VERSION=20NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX(optional)
- Deploy.
public/data/current-stock.jsonpublic/data/stock-history.jsonlib/data.ts(codes + mutation content)
This repo includes .github/workflows/update-stock.yml, which runs every 5 minutes.
Setup steps:
- Prepare an external JSON feed endpoint that returns:
{
"source": "Official Discord Digest",
"lastUpdated": "2026-03-04 17:10 UTC+8",
"nextRestockAt": "2026-03-04T17:30:00+08:00",
"confidence": 0.92,
"items": [
{
"name": "Dawn Fruit Seed",
"rarity": "legendary",
"buyPrice": 550,
"expectedSellPrice": 1300,
"growthMinutes": 42
}
]
}- Add GitHub secret:
STOCK_FEED_URL. - Workflow writes latest data to
public/data/current-stock.jsonand commits. - Cloudflare Pages auto redeploys on push.
Replace the placeholder form link in components/StockPanel.tsx:
https://forms.gle/your-form-link
with your own form URL.
- Canonical URL metadata per core page
- Robots metadata +
robots.txt+sitemap.xml - Structured data:
WebSite,ItemList,SoftwareApplication,HowTo,BreadcrumbList - Internal links between stock, calculator, mutations, guides, and trust pages