type: decision
status: active
timestamp: 2026-06-22
tags: [decision, architecture, market-data, github-actions, github-pages, json, india, free-tier, no-cf-workers]

Market-data per repo — GH Actions cron + GH Pages JSON serve, one repo per API

FII/DII + MMI each in own GitHub repo GH Actions scrapes (weekdays post-NSE-close for FII/DII, hourly for MMI) and commits JSON back into the repo's data/ directory. GitHub Pages + raw.githubusercontent.com serve the JSON publicly. Zero Cloudflare Workers, zero shared aggregator repo.

Market-data per repo

Decision

Each India-market data feed lives in its own GitHub repo. GitHub Actions cron runs the scraper, commits the resulting JSON back to that repo’s data/ directory, and GitHub Pages publishes the same directory at a stable HTTPS URL. Apps fetch via Pages or raw.githubusercontent.com. Zero Cloudflare Workers, zero shared aggregator, zero recurring cost.

API repoRefreshPages URL (latest)Raw URL (latest)
chirag127/oriz-flow-fii-dii-activity-apiweekdays 13:00 UTC (post-NSE-close)https://chirag127.github.io/oriz-flow-fii-dii-activity-api/latest.jsonhttps://raw.githubusercontent.com/chirag127/oriz-flow-fii-dii-activity-api/main/data/latest.json
chirag127/oriz-mmi-tickertape-mmi-apihourly (0 * * * *)https://chirag127.github.io/oriz-mmi-tickertape-mmi-api/latest.jsonhttps://raw.githubusercontent.com/chirag127/oriz-mmi-tickertape-mmi-api/main/data/latest.json

Scrapers are Node 22 native fetch + cheerio, ~55 LOC each, in scripts/scrape.mjs. FII/DII tries NSE official API first, falls back to Moneycontrol HTML scrape. MMI scrapes Tickertape’s public /market-mood-index page (Next.js __NEXT_DATA__ regex with DOM-text fallback).

Each repo has two workflows:

Why per-repo, not the aggregator we tried briefly

The aggregator fused two unrelated upstreams into one repo for no real benefit:

Why GitHub Pages + raw, not CF Workers

Same rationale as the original draft:

Trade-off accepted: a small eventual-consistency window (apps see data up to 1h stale for MMI, up to 24h for FII/DII) and reliance on GH Actions uptime. Both acceptable for non-trading UI.

Implications

Cross-refs


Edit on GitHub · Back to index