git clone https://github.com/forgesworn/402-pub.git
cd 402-pubNo dependencies to install — this is a static site with zero build tools.
Serve the site locally with any static file server:
npx serve .
# or
python3 -m http.server 8000Open http://localhost:8000 and services will stream in from the configured relays.
External directories (satring, x402 Bazaar, agent-commerce) are stored as local JSON snapshots in data/. To refresh them:
node scripts/fetch-sources.mjsindex.html Landing page + live service directory
style.css Design system (dark theme, CSS custom properties, amber/blue accents)
app.js Nostr relay manager, event parser, DOM renderer (zero dependencies)
data/ Pre-fetched JSON snapshots of external directories
scripts/ Build/fetch scripts (fetch-sources.mjs)
social-preview.* Social preview assets (PNG + SVG source)
favicon.* Favicon set (ICO, SVG, PNG sizes)
llms.txt AI-readable project summary
CLAUDE.md AI agent coding instructions
- Create a branch:
git checkout -b feat/short-description - Make your changes.
- Test locally by serving the site and verifying the directory loads.
- Commit using conventional commits:
type: descriptionfeat:— new featurefix:— bug fixdocs:— documentation onlyrefactor:— no behaviour change
- Open a pull request against
main.
- British English in all prose and comments — colour, behaviour, licence, initialise.
- No build tools — vanilla HTML/CSS/JS. No bundler, no transpiler, no npm scripts.
- XSS safety — all Nostr event strings go through
.textContent, neverinnerHTML. Relay URLs from localStorage use DOM construction, not string interpolation. - Accessibility — ARIA labels, roles,
prefers-reduced-motionsupport, screen-reader-only utility class. - No runtime dependencies —
app.jshas zero imports. Keep it that way.
| Task | How |
|---|---|
| Add a relay | Add to DEFAULT_RELAYS array in app.js |
| Add an external source | Add entry to EXTERNAL_SOURCES array with a parser function |
| Change design tokens | Edit CSS custom properties in :root block of style.css |
| Update external snapshots | Run node scripts/fetch-sources.mjs |
By contributing, you agree that your contributions will be licensed under the MIT licence.