Static activity dashboard for projects explored at Sovereign Engineering cohorts.
It renders commits, PRs, issues, and releases as a compact git log --oneline
style timeline.
Target site: heartbeat.sovereignengineering.io
Data is fetched at build time. The browser only reads public/data/events.json,
so visitors never call GitHub directly and never spend API rate limit.
Fork provenance: this project is adapted from
OpenSats/heartbeat. Keep the upstream
remote pointed at OpenSats for later generic fix PRs.
Requires Bun 1.3+.
bun install
export GITHUB_TOKEN=ghp_yourtoken # public_repo scope is enough for public repos
bun run fetch # writes public/data/events.json
bun run devUseful checks:
bun test
bun run typecheck
bun run lint
bun run format:check
bun run buildHeartbeat derives its repo set from the Sovereign Engineering website project catalog.
Default source:
https://raw.githubusercontent.com/soveng/website/main/src/data/showcaseProjects.json
Rules:
- GitHub repo URLs become
owner/repo. - GitHub URLs with deeper paths, such as
/pull/123or/tree/main, still map to the base repo. - GitHub owner/org URLs, such as
github.com/orgs/Routstr, expand to all public non-archived repos for that owner. - Public
github.com/sovengrepos are always added to thesovenggroup. - Non-GitHub and site-only project links are reported and skipped.
Override source for local testing:
SOVENG_PROJECTS_JSON=/path/to/showcaseProjects.json bun run import:repos
SOVENG_PROJECTS_JSON=https://example.com/showcaseProjects.json bun run fetchKnobs for the activity window and per-repo page sizes live at the top of
scripts/fetch.ts.
masteris the Sovereign Engineering heartbeat base.upstream/mastertracks OpenSats heartbeat and is not used as the fork base.- Create scoped issue branches from latest
master, namedissue/NN-short-name. - Merge issue branches back to
masterwithgit merge --ff-only. - Keep issue branches after merge so they remain available for review and later upstream extraction.
- For upstream PRs, create new branches from
upstream/masterand manually port only generic fixes. Do not include Sovereign Engineering branding, catalog logic, domain config, or Bun-only choices unless upstream asks for them.
Cloudflare Pages is the canonical hosted deployment path for this fork.
Built with Bun. Deployment builds must run the GitHub fetcher before vite build
because public/data/events.json is generated and intentionally ignored by git.
The browser only reads the generated file from the published dist output.
Local env:
GITHUB_TOKENorGH_TOKEN: GitHub token used locally by the fetcher for owner expansion and GraphQL activity fetches.SOVENG_PROJECTS_JSON: optional explicit project catalog path or URL.HOSTED_BASE_URL: optional base URL forbun run hosted:smoke.
Cloudflare Pages env:
GITHUB_TOKEN: read-only GitHub token used bybun run fetch.SOVENG_PROJECTS_JSON: optional explicit project catalog path or URL.BUN_VERSION:1.3.3.SKIP_DEPENDENCY_INSTALL:1.
GitHub Actions repo secrets:
CLOUDFLARE_PAGES_DEPLOY_HOOK_URL: Cloudflare Pages deploy hook URL configured for themasterbranch.
Create a Cloudflare Pages project linked to soveng/heartbeat:
-
Production branch:
master -
Framework preset: React (Vite). If only React is offered, choose React. Do not choose a server-side framework preset.
-
Build command:
bun install --frozen-lockfile && bun run deploy-build -
Output directory:
dist -
Root directory: repository root
Scheduled refreshes are handled by .github/workflows/refresh.yml. The workflow
uses a Cloudflare Pages deploy hook every 6 hours to rebuild master. Store the
hook URL in the GitHub Actions secret named
CLOUDFLARE_PAGES_DEPLOY_HOOK_URL.
Verification commands:
HOSTED_BASE_URL=https://<cloudflare-pages-domain> bun run hosted:smoke --strict-headers
HOSTED_BASE_URL=https://heartbeat.sovereignengineering.io bun run hosted:smoke --strict-headersCloudflare Pages reads public/_headers during deployment. The active headers
set CSP, referrer, frame, permissions, MIME-sniffing, and cache policy. Hashed
Vite assets are immutable for one year; events.json and HTML revalidate.
Create a deploy hook in Cloudflare Pages under Settings > Builds > Deploy Hooks:
- Name:
heartbeat-master-refresh - Branch to build:
master
Custom domain cutover:
- Deploy and verify the Cloudflare Pages generated domain.
- Add custom domain
heartbeat.sovereignengineering.ioin Cloudflare Pages. - Point DNS CNAME
heartbeatto the generated<project>.pages.devtarget shown by Cloudflare. - If CAA blocks certificate issuance, add these CAA values at the apex:
issue "letsencrypt.org",issue "pki.goog; cansignhttpexchanges=yes",issue "ssl.com",issuewild "letsencrypt.org",issuewild "pki.goog; cansignhttpexchanges=yes", andissuewild "ssl.com". - Run the strict custom-domain smoke check:
bun run hosted:smoke https://heartbeat.sovereignengineering.io --strict-headers- Keep the previous hosting provider available for 24 hours as rollback.