The web app is built with:
- Vue.js for templating and reactive updates
- Firebase Hosting for hosting
- Go toolchain (
go run ./cmd/build/) that orchestrates Less to CSS, YAML to JS, Pug to HTML (vianpx pug3), JS minification, and cache-busting - pug3 to convert Pug templates to HTML (the only npm
devDependency) - firebase-tools for Firebase CLI (install globally)
Install build tools:
npm installThis gives you pug3, the only npm dependency. The Go build toolchain uses it via npx.
For image compression and deployment, install these globally:
npm install -g firebase-tools svgo png-minifyAll the code you care about lives in src:
- Privacy Policy templates:
src/includes/content/privacy_policy - Terms & Conditions templates:
src/includes/content/tnc
The app is made of Pug partials, Less stylesheets, and a YAML file for third-party service definitions. The Go build compiles everything into a single index.html under public, plus minified CSS and JS files.
To build:
❯ make buildThis generates index.html, style.min.css, main.min.js, utils.min.js, thirdpartyservices.min.js, and locale files.
Other useful commands:
❯ make watch # watch for changes and rebuild automatically
❯ make reviews # regenerate reviews page from cached data
❯ make reviews-force # regenerate reviews page (re-fetch from GitHub)You can also pass flags directly to the Go build tool:
❯ go run ./cmd/build/ -lang de # build only a specific locale
❯ go run ./cmd/build/ -clean # clean public/ before building❯ ./scripts/compress_images.shThe third-party services list is generated from a YAML file. To add one, open a PR that adds an entry to src/includes/yaml/thirdpartyservices.yml:
- name: Google Play Services
enabled: false
logo: images/third_party_logos/gps.png
link:
privacy: https://www.google.com/policies/privacy/
terms: https://policies.google.com/termsDrop the logo into public/images/third_party_logos/. Make it 160x160 pixels.
Tip: Use remove.bg to strip the background and imagetools.org/trim to trim excess space.
npm updateBuilds and serves on port 8000:
❯ make serveUse a custom port with:
❯ go run ./cmd/build/ -serve -port 9090E2E tests run against the dev server using Playwright (Chromium only):
❯ make test # run all tests
❯ make test-ui # run with Playwright UI mode
❯ make test-debug # run with Playwright debug modeTests are in tests/. The dev server starts automatically when you run tests.
Note: Only maintainers with Firebase console access can deploy.
firebase login
❯ make firebase-deploy VERSION="3.0.9"Omit VERSION and you will be prompted for it.