Skip to content

Repository files navigation

Rebel's Relay

A public nomination map connecting people who've done the ALS Ice Bucket Challenge, and who they nominated, in support of Rebel (Tanea Brooks), who is battling ALS.

See PROJECT_SPEC.md for the full design rationale, and CONTRIBUTING.md to add a nomination.

How it's built

  • /data/*.json — one file per person; including links to associated posts, who nominated them, who they nominated (though npm run add writes these for you — see CONTRIBUTING.md).
  • /scripts/ — the build pipeline and contributor CLI tools: schema validation, web/data.json generation, and the add/check-links commands. See "Scripts" below for the breakdown.
  • /web/ — the static site. index.html + styles.css + app.js fetch data.json at runtime and render either the tree+cross-links view or the layered-DAG view (toggle, no re-fetch), using D3 loaded via CDN — no frontend build step.

Commands

npm run add -- --name "..." --label "..." [options]     # create data/<id>.json — see CONTRIBUTING.md
npm run validate                                         # check /data without writing output (what CI runs)
npm run build                                            # validate + write web/data.json
npm run check-links                                      # optional, hits every link in the dataset over the network
npm test                                                 # unit tests for the trickier validation rules

Scripts

  • scripts/build-data.js (npm run validate / npm run build) — validates every file in /data (schema, id uniqueness) and computes everything the spec marks as derived (primaryParent, secondaryParents, depth, isComplete, nominates, per-link platform). --check (what validate runs) stops after validation; without it (build), writes the result to web/data.json.

  • scripts/add-person.js (npm run add) — creates data/<id>.json. Dry-run by default, --write to apply — see CONTRIBUTING.md for the full flag list. There's no equivalent CLI for editing an existing person's file afterward — that's a direct hand-edit, then npm run validate — see CONTRIBUTING.md.

  • scripts/check-links.js (npm run check-links) — fetches every link in the dataset and reports which didn't return success. Optional and non-blocking, including in CI (see below).

  • scripts/lib/ — shared logic the scripts above are built from:

    • validate.js — schema rules, plus a non-blocking warning when a nominatedBy/nominates free-text entry slugifies to an id that already has a file
    • derive.js — the derived-fields computation, including cycle detection on nominatedBy
    • synthesize.js — turns unresolved nominatedBy/nominates text into stub nodes, slugifying and matching against existing ids first
    • slugify.js — display name → kebab-case id
    • platforms.js — URL hostname → platform lookup
    • files.js — recursive /data glob
    • diff.js — the field-level diff add's dry-run output uses when a --nominates reference stages an update to a second, already-existing file

    Unit-tested pieces live in test/, run via npm test.

Local preview

web/ is fully static (fetches data.json via a relative path), so any static file server works, e.g.:

npx serve web

web/data.json is gitignored (see Deploying) — it needs to exist on disk first. npm run build generates it, and npm run add -- --write already runs that for you by default, so this is usually only something to remember right after a fresh clone.

Deploying

Hosted on Netlify, configured by netlify.toml at the repo root (build command npm run build, publish directory web). Connect the repo once via Netlify's "Add new site → Import an existing project" and it picks up netlify.toml automatically — no separate dashboard config needed. web/data.json is never committed — it's a build artifact, generated fresh on every deploy, so it can't go stale relative to /data.

Every PR also gets its own Netlify Deploy Preview automatically — no config needed beyond the initial connect — linked in a PR comment/check and torn down when the PR closes.

Status

Scaffolding, validation, the build pipeline, and the live site (both views, detail panel with video embeds, pan/zoom, posted gallery) are all in place and working. Real roster population is ongoing via PRs — see /data/*.json for the current state. The timeline view is designed for but not yet built; see PROJECT_SPEC.md for the full status and what's still deferred.

About

A public nomination map connecting people who've done the ALS Ice Bucket Challenge, and who they nominated, in support of Rebel (Tanea Brooks), who is battling ALS.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages