GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bulwark/web at main · ranklancer/bulwark

Expand file tree

/

web

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

web

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
scripts
scripts
 
 
src
src
 
 
.gitignore
.gitignore
 
 
.lighthouserc.json
.lighthouserc.json
 
 
README.md
README.md
 
 
components.json
components.json
 
 
index.html
index.html
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
postcss.config.js
postcss.config.js
 
 
tailwind.config.ts
tailwind.config.ts
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.node.json
tsconfig.node.json
 
 
vite.config.ts
vite.config.ts
 
 

README.md

Outline

Bulwark dashboard (web/)

Vite + React + TypeScript + Tailwind. The build artifact lives at ../internal/api/ui-react/dist/ so the Go server picks it up via go:embed — there's no separate "deploy the static files" step.

Develop

cd web
npm install
npm run dev      # Vite dev server at http://localhost:5173
                 # /api/* requests are proxied to http://localhost:8080

In a second terminal, run bulwark serve (or bulwark run) on :8080 so the proxy has something to talk to.

Build for embedding

cd web
npm ci           # use lockfile in CI; npm install during dev
npm run build    # emits ../internal/api/ui-react/dist/{index.html, assets/*}

Then go build ./... in the repo root picks up the freshly-built artifact. CI runs both steps in .github/workflows/ci.yml.

Why a placeholder dist?

go:embed fails the build when the embedded directory is missing. The committed internal/api/ui-react/dist/index.html placeholder lets go build succeed for operators without a Node toolchain — they get the legacy vanilla dashboard at /. After npm run build the React SPA mounts at / and the legacy dashboard moves to /legacy/.

Bundle-size budget

npm run build
npm run perf:check

Fails when any single chunk exceeds 200 KB gzipped, when the entry + vendor chunks combined exceed 350 KB gzipped, or when total CSS exceeds 40 KB gzipped. Override the defaults with BULWARK_PERF_PER_CHUNK_GZ_KB, BULWARK_PERF_ENTRY_GZ_KB, or BULWARK_PERF_CSS_GZ_KB env vars when ratcheting the gate down.

CI runs perf:check on every PR.

Lighthouse CI

# In repo root: build the binary once
go build -o bulwark ./cmd/bulwark

cd web
npm run build
BULWARK_BIN=../bulwark npm run perf:lighthouse

LHCI spins up bulwark serve --no-docker --listen :8080 (anonymous mode — never use this outside CI / dev), runs a desktop-preset Lighthouse pass against http://localhost:8080/, and asserts:

Metric Threshold
LCP < 1500 ms
Total transfer < 500 KB
CLS < 0.1

The CI workflow runs this best-effort (continue-on-error: true) while we accumulate a stable baseline; it'll flip to a hard gate once the numbers settle. LHCI ships via npx so it doesn't bloat package-lock.json with Puppeteer + Chromium.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.