Static JSON data store served as a read-only JSON API via GitHub Pages, fronted by the custom domain api.hyperweavers.com.
Purpose / idea: Commit plain
.jsonfiles to this repo and fetch them over HTTPS with a simpleGET, no server or database to maintain.
- Add a JSON file anywhere in this repo, e.g.
v1/products.json. - Commit and push to the
mainbranch. - GitHub Pages serves it statically:
- Default Pages URL:
https://<org-or-user>.github.io/<repo>/<path>.json - Custom Domain (this repo):
https://api.hyperweavers.com/<path>.json - Example:
https://hyperweavers.github.io/data-store/products.json/https://api.hyperweavers.com/v1/products.json
- Default Pages URL:
Only GET is supported (static hosting). GitHub Pages serves JSON with Content-Type: application/json and Access-Control-Allow-Origin: *, so browsers and mobile apps can fetch() it directly from any origin.
The CNAME file at the repo root contains:
api.hyperweavers.com
This tells GitHub Pages to serve this repo from that hostname. Point the api subdomain at GitHub Pages with a CNAME DNS record (api → <org-or-user>.github.io) and enable Enforce HTTPS under repo Settings → Pages. See GitHub docs: Managing a custom domain.
The empty .nojekyll file disables Jekyll processing so files and folders (including _-prefixed ones) are served exactly as committed.
# validate every JSON file in the repo
Get-ChildItem -Recurse -Filter *.json | ForEach-Object { Get-Content $_.FullName -Raw | ConvertFrom-Json | Out-Null; Write-Host "OK $($_.FullName)" }# validate every JSON file in the repo (python3 is preinstalled on macOS)
find . -name '*.json' -print0 | xargs -0 -n1 python3 -m json.tool > /dev/null && echo "All JSON valid"
# alternative if jq is installed (brew install jq):
find . -name '*.json' -exec jq empty {} \; && echo "All JSON valid"# validate every JSON file in the repo (python3 is preinstalled on most distros)
find . -name '*.json' -print0 | xargs -0 -n1 python3 -m json.tool > /dev/null && echo "All JSON valid"
# alternative if jq is installed (apt install jq / dnf install jq / pacman -S jq):
find . -name '*.json' -exec jq empty {} \; && echo "All JSON valid"Keep files small, UTF-8, and pretty-printed so diffs stay readable.
Keep the API backward-compatible: prefer adding fields over renaming/removing them, and version breaking changes under a new top-level folder (e.g. /v2/).
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License — see LICENSE.
You may share and adapt the data with attribution for non-commercial purposes, provided you distribute derivatives under the same license.