This is a NextJS starter in Firebase Studio.
To get started, take a look at src/app/page.tsx.
The token chart uses a server-side hourly history file (data/market-history.txt or /tmp/market-history.txt) and a daily cut at 3:00 PM America/Mexico_City.
Current storage caps are symbol-based: 24 points for BTC/ETH/SOL/XRP/BNB and 8 points for USDT (128 total points max across the 6 tracked symbols per map).
Sampling cadence is also symbol-based: BTC/ETH/SOL/XRP/BNB update every 1h, while USDT is bucketed every 3h.
To keep it updated without user traffic, this repo includes a GitHub Actions scheduler:
- Workflow:
.github/workflows/market-history-hourly.yml - Endpoint:
/api/market/cron-sync
SITE_URL: your deployed site URL, for examplehttps://your-domain.comMARKET_CRON_SECRET: shared secret used by the scheduler and the API endpoint
COINMARKETCAP_API_KEY(orCMC_API_KEY)MARKET_CRON_SECRET(same value used in GitHub secret)
This project now includes:
robots.txtroute (src/app/robots.ts)sitemap.xmlroute (src/app/sitemap.ts)- Canonical/Open Graph metadata per route
- JSON-LD structured data in the root layout
- Verification meta tags via environment variables
GOOGLE_SITE_VERIFICATIONFACEBOOK_DOMAIN_VERIFICATIONPINTEREST_SITE_VERIFICATIONFACEBOOK_APP_ID(orNEXT_PUBLIC_FACEBOOK_APP_ID)
NEXT_PUBLIC_SITE_URL(for canonical URLs, robots host/sitemap, OG absolute URLs)