type: decision
status: active
timestamp: 2026-06-21
tags: [architecture, api, json, github-pages, monetization, rapidapi, static]

GitHub Pages as canonical static JSON API host

Static read-only JSON APIs via GitHub Pages in name-api repos Pages with a custom subdomain. GH Actions cron updates the JSON. Cloudflare Worker only for dynamic / write / auth-gated endpoints. APIs are publishable to RapidAPI + other monetization marketplaces.

GitHub Pages as canonical static JSON API host

Decision

Static, read-only JSON APIs across the chirag127 family ship as GitHub Pages repos with the -api suffix. GH Actions cron updates the JSON. Cloudflare Worker (api.oriz.in) handles only the dynamic / write / auth-gated endpoints.

Why GitHub Pages over CF Worker for static APIs

AspectGitHub PagesCF Worker
CostFree, unlimited reposFree 100K req/day account-wide
Per-repo isolationYes — each repo independentNo — shared account quota
Custom domainYes, one per repoOne per Worker (or via Pages)
Bandwidth100 GB/month soft capUnlimited
Build timeGH Actions cron, no limitBuild at request time
Cold startZero (static file)Zero (Workers are fast)
Update pathCommit JSON, pushDeploy new Worker
Monetizable on RapidAPIYes, expose via HTTP endpointYes
CORSWildcard on raw + PagesConfigurable

The killer point: GitHub Pages quota is per-repo + unlimited repos. Adding the 50th -api repo doesn’t fight the existing 49 for quota. CF Worker’s 100K/day is shared across ALL family Workers.

The -api suffix

Repos that serve static JSON datasets via GitHub Pages get the -api suffix appended to the v6 family naming policy:

ExampleSubdomainEndpoint
oriz-mmi-tracker-apimmi.oriz.in/data.json — market mood index time-series
oriz-fii-dii-activity-apifii-dii.oriz.in/data.json — FII/DII flow daily aggregate
oriz-redirects-apiredirects.oriz.in/map.json — family-wide redirect map
oriz-family-registry-apifamily.oriz.in/registry.json — list of all oriz-* products

Architecture per -api repo

oriz-<name>-api/
+-- .github/workflows/
¦   +-- cron.yml         # scheduled: scrape source ? produce JSON ? commit
¦   +-- deploy.yml       # on push: deploy /public/ to GitHub Pages
+-- src/
¦   +-- scraper.py       # or .ts — the data producer
+-- public/
¦   +-- data.json        # the API payload, committed
¦   +-- meta.json        # schema, last-updated, version
¦   +-- openapi.json     # spec for RapidAPI listing
¦   +-- index.html       # tiny landing page documenting the API
+-- CNAME                # <subdomain>.oriz.in
+-- README.md            # docs + RapidAPI link
+-- LICENSE

scraper.py (or .ts) runs in GH Actions cron, fetches upstream data, writes public/data.json, commits + pushes. GitHub Pages serves the file at https://<subdomain>.oriz.in/data.json.

Monetization via RapidAPI + others

Each -api repo lists on:

RapidAPI handles auth, rate-limiting, billing; we just expose the public subdomain URL.

When NOT to use GitHub Pages

Cross-refs


Edit on GitHub · Back to index