An educational, static, animated companion to the BitcoinPIR protocol. Twelve short sections, one animated SVG each, no tracking, no third-party fonts, no runtime backend.
- Toolchain: Astro + MDX + Shiki
- Animations: inline SVG + CSS keyframes + tiny JS (no animation library — stays lightweight and framework-agnostic)
- Deploy target: GitHub Pages (workflow in
.github/workflows/deploy.yml) - Source of truth: every factual claim is cross-referenced in
CONTENT-AUDIT.md.
# Node 20 recommended (see .nvmrc)
npm install
npm run dev # http://localhost:4321
npm run build # produces dist/
npm run preview # serve dist/ locallyThe included workflow (.github/workflows/deploy.yml) builds on every push
to main and publishes to GitHub Pages. The workflow computes the correct
base path automatically:
- If the repo is
<owner>/<owner>.github.io→ base =/ - Otherwise → base =
/<repo-name>/
To enable:
- On GitHub, Settings → Pages → Build and deployment → Source: GitHub Actions.
- Push to
main. The workflow will build and publish.
To test a production build locally with a non-root base path:
SITE_BASE=/bitcoinpir-website/ npm run build
npm run previewsrc/
layouts/Main.astro # shell + theme script + nav
styles/global.css # theme tokens, typography, components
components/
Section.astro # numbered section wrapper
Callout.astro # inline note / warn / danger boxes
Stage.astro # animation canvas + IntersectionObserver hook
sections/
01-Problem.astro # one .astro per section
02-Primer.astro
… 12 total
pages/
index.astro # hero + TOC + all 12 sections
- All animations respect
prefers-reduced-motion. Diagrams degrade to static final-state SVG automatically. - All SVGs have
role="img"+aria-labeldescribing what they depict. - Dark / light themes both pass WCAG AA on body text. Toggle persists in
localStorage. - The nav is keyboard-navigable; skip-to-content is implicit via the anchor navigation and visible focus rings.
- Do not guess. Every claim in a section must come from the upstream
source. Open
pir-sdk-client/src/dpf.rs,pir-core/src/params.rs, etc., and cite the exactfile:lineinCONTENT-AUDIT.md. If you edit a claim, update the audit in the same commit. - Animations: keep them programmatic (inline SVG + CSS keyframes).
Any animation should work with
prefers-reduced-motion: reduce. - Writing style: plain English, define terms on first use, short paragraphs, no marketing speak. Callouts for security-critical points.
- Create
src/components/sections/NN-Foo.astro. Start from one of the existing sections — they all share the same structure (prose +<Stage>- CSS + small JS trigger).
- Import and render it from
src/pages/index.astroand append an entry to thetocarray at the top of that file. - Add a row for every new factual claim in
CONTENT-AUDIT.md.
See upstream BitcoinPIR for the protocol. This documentation site is provided under the same license as the upstream repo unless otherwise noted.