Source for the ForkWatch website.
The site is a static Astro + React post-fork archive for Augur fork safety content, REP holder checks, and migrated-supply data generated from Ethereum mainnet reads.
- Astro 6 with selective React islands
- React 19 for interactive components
- Tailwind CSS 4 via the Vite plugin and CSS-first styles
- Biome for linting and formatting
- TypeScript for app and script code
- Vitest for unit tests
- viem for Ethereum reads
- Bun for package management and scripts
- GitHub Actions + GitHub Pages for production deployment
src/
βββ components/ # Astro + React UI components
βββ content/ # Fork page copy and resources
βββ domain/ # Ethereum, migration, and token constants
βββ features/ # Migration progress and REP checker feature code
βββ layouts/ # Astro layouts
βββ lib/ # Shared utilities
βββ pages/ # Astro routes
βββ services/ # Ethereum read helpers
βββ styles/ # Global Tailwind CSS
scripts/
βββ generate-migration-progress.ts
βββ validate-migration-progress.ts
public/
βββ data/migration-progress.json
βββ fonts/ # Self-hosted display, body, and Korean glyphs
- Bun 1.3.x, matching CI
- Node.js compatible with the installed Astro/TypeScript toolchain
bun install --frozen-lockfile| Command | Purpose |
|---|---|
bun run dev |
Start Astro dev server at localhost:4321 |
bun run typecheck |
Run Astro/TypeScript checks |
bun run lint |
Run Biome checks |
bun run test |
Run Vitest tests |
bun run build |
Build the static site |
bun run generate:migration-progress |
Generate public/data/migration-progress.json |
bun run validate:data |
Validate migration progress JSON |
bun run preview |
Build then preview the site |
bun run format |
Run Biome with writes enabled |
bun run check |
Run typecheck, lint, tests, and data validation |
Before declaring work done, run:
bun run check
bun run buildAstro builds static output and uses GitHub Pages defaults when:
GITHUB_PAGES=true
Production metadata and paths can be overridden with:
SITE_URLBASE_PATHPUBLIC_MAIN_SITE_URL
Migration data generation can use:
ETH_RPC_URLfor server-side RPC readsETH_RPC_LABELfor a public-safe source label
Never expose private RPC URLs through PUBLIC_* environment variables.
ForkWatch does not:
- connect wallets
- request signatures
- send transactions
- ask for private keys, seed phrases, or recovery words
- check exchanges, custodians, L2s, or bridges
- prove that every address a user controls has been checked
The REP checker sends the public address entered by the user to public Ethereum RPC providers from the browser.
Migration progress is generated by
scripts/generate-migration-progress.ts
and committed at
public/data/migration-progress.json.
Pull requests validate committed data. Scheduled and main-branch workflow runs regenerate the data before building.
The post-fork generator pins every ERC-20 read to one Ethereum block and reads
totalSupply(), decimals(), and symbol() from both outcome tokens:
- Yes:
0xCf6A0A7826fa124B7705d6f3c675eAD76f1e540D, in child universe0x281171519Fb41540528398d8ED3EA257f0F32A9f - No:
0x2F4005456c2F098358213f01DbE34abDAa2989A4, in child universe0xbaaD633FAa0E4847A4b66043E3E92102e5800546
Both child universes forked from
0x49244BD018Ca9fd1f06ecC07B9E9De773246e5AA. Schema v2 stores each outcome's
token metadata and supply separately. The top-level migrated amount is the sum
of Yes and No, and all percentages compare against the original 11 million REP
supply. If a scheduled RPC read fails, the generated error record retains the
last complete dual-outcome snapshot instead of mixing old and new values.
The UI itself is statically in the completed-fork state. Deployment timingβnot client-side clock logicβcontrols when that version goes live.
Tailwind is configured through the Vite plugin and the global stylesheet at
src/styles/global.css.
Biome is configured in biome.json.
deploy-pages.yml runs on:
- hourly schedule
- pushes
- pull requests
- manual workflow dispatch
The workflow:
- Installs dependencies with Bun.
- Generates migration progress outside pull requests.
- Validates committed migration data on pull requests.
- Runs typecheck, lint, tests, data validation, and build.
- Verifies the static output.
- Deploys to GitHub Pages from the repository default branch.
Use raw Git worktrees under .worktrees/ when parallel branch checkouts are
useful:
git fetch origin
git worktree add -b feature/example .worktrees/feature-example origin/mainRemove when done:
git worktree remove .worktrees/feature-example
git worktree prune