Browse and publish plugins for wago, the pure-Go WebAssembly engine. Host-import bundles, WASI shims, debuggers and codegen backends — drop-in Go modules for the runtime.
Two pieces:
- Frontend — a static single-page app (plain HTML + CSS + TypeScript, no
framework, compiled by
tsc). Hosted on GitHub Pages atplugins.wago.sh. - Backend — a small Go service (
backend/) that does GitHub OAuth, sessions, and stores stars / reviews / votes. Standard-library only (with an eye toward a future TinyGo → wago build).
The site is designed to degrade gracefully: with no backend reachable it still runs entirely from the static package index, faking sign-in, stars and reviews in the browser so the whole UI is explorable. Point it at a live backend and those become real and shared.
There are no passwords anywhere. Sign-in is GitHub OAuth; the backend holds the client secret, verifies the GitHub identity, and issues its own signed-cookie session. We store only the GitHub id, login, name, avatar and email.
index.html # SPA shell — mounts #app, loads the module bundle
data/
packages.json # the package index (drives both frontend and backend)
src/ # TypeScript source
main.ts # boot
app.ts # render loop, hash router, event delegation
screens.ts # pure screen render functions (home/search/package/auth/account)
api.ts # data layer: backend client + local (no-backend) fallback
state.ts # the single app-state object
types.ts util.ts # shapes + helpers
config.ts # where the backend lives (window.WAGO_CONFIG override)
copy.ts # copy-to-clipboard buttons
assets/css/tokens.css # base + palette (dark-only "sparkle" theme)
assets/js/ # compiled output (git-ignored)
backend/ # the Go service — see backend/README.md
CNAME # plugins.wago.sh
.github/workflows/
deploy.yml # build + publish to GitHub Pages
Everything is driven by the Makefile — run make (or make help)
to see all targets.
make install # one-time: npm + go deps
make web # site only, at http://localhost:8000 — no backend needed
make dev # site + backend together (real, shared data)make web builds the TypeScript once and serves the static site. With no
backend running, the frontend drops into local-demo mode automatically:
package data comes from the static index and sign-in / stars / reviews are faked
in the browser, so the whole UI is explorable.
make dev additionally runs the Go backend at :8787 and tsc --watch, so
stars, reviews, comments, install history and publishing become real. Ctrl-C
stops all three.
Other useful targets:
make watch # just tsc --watch (pair with `make web` in another terminal)
make api # just the backend (reads backend/.env if present)
make check # typecheck the frontend + vet the backend
make build # production build: dist/ + backend binary
make reset-store # wipe the backend store; it re-seeds from data/packages.jsonLocal-demo mode fakes sign-in. For the real OAuth flow, register a GitHub OAuth
app (callback http://localhost:8787/auth/github/callback), then:
make env # writes backend/.env from the example
# edit backend/.env → set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
make devSee backend/README.md for every env var.
Everything on the site is driven by data/packages.json:
the package list, per-package readme/compat/versions/issues, stats and
categories. The backend reads the same file (read-only) and merges in live star
counts and user reviews from its own store. Update the index by committing to
this file (a CI job can regenerate it from the org's repos later).
- Frontend: pushing to
mainruns.github/workflows/deploy.yml—npm ci,npm run build, publishdist/to GitHub Pages.CNAMEpoints it atplugins.wago.sh; set the matching custom domain in the repo's Pages settings and the DNS record at the registrar. - Backend: deploy
backend/anywhere that runs a Go binary (a small VM, Fly, Render, Cloud Run…). Set itsFRONTEND_URLtohttps://plugins.wago.shand, in the frontend, setwindow.WAGO_CONFIG.apiBaseinindex.htmlto the backend's URL (default guess ishttps://api.plugins.wago.sh). Register the GitHub OAuth app's callback as<backend>/auth/github/callback.