No description
  • Svelte 53.5%
  • TypeScript 44.9%
  • JavaScript 1.1%
  • CSS 0.3%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tomáš Mládek afa190ff03 chore(release): land the 0.0.1 release baseline
Publish version 0.0.1 as the starting point for release notes. Keep the existing clock and language picker available on the merged site.
2026-12-03 12:00:44 +00:00
.dagger feat(releases): start a fresh changelog at 0.0.1 2026-12-03 11:20:32 +00:00
assets feat: add audio channel test, av sync test 2024-02-24 22:21:24 +01:00
av-sync feat(ui): use Atkinson Hyperlegible Next variable font 2026-12-02 22:17:45 +00:00
messages chore(release): land the 0.0.1 release baseline 2026-12-03 12:00:44 +00:00
project.inlang chore: inlang 2026-08-13 18:41:56 +02:00
src chore(release): land the 0.0.1 release baseline 2026-12-03 12:00:44 +00:00
static chore: add favicon 2025-02-11 13:55:09 +01:00
tests chore(release): land the 0.0.1 release baseline 2026-12-03 12:00:44 +00:00
.eslintignore lint: reformat 2026-01-21 12:00:16 +01:00
.eslintrc.cjs chore: update eslint config 2025-09-27 13:50:36 +02:00
.gitattributes tests: update baseline, move out of outputs, add script 2026-08-13 18:41:45 +02:00
.gitignore tests: update baseline, move out of outputs, add script 2026-08-13 18:41:45 +02:00
.gitlab-ci.yml feat(releases): add a changelog and unread release badge 2026-12-03 11:03:22 +00:00
.npmrc Initial commit. 2024-02-02 21:23:20 +01:00
.prettierignore lint: reformat 2026-01-21 12:00:16 +01:00
.prettierrc fix: test card double click 2026-01-20 23:13:02 +01:00
AGENTS.md docs: write changelog-friendly commit messages 2026-12-03 11:14:04 +00:00
cliff.toml feat(releases): start a fresh changelog at 0.0.1 2026-12-03 11:20:32 +00:00
dagger.json ci: align Dagger with the tetra runner 2026-12-02 13:43:42 +00:00
package.json chore(release): land the 0.0.1 release baseline 2026-12-03 12:00:44 +00:00
pnpm-lock.yaml feat(ui): use Atkinson Hyperlegible Next variable font 2026-12-02 22:17:45 +00:00
pnpm-workspace.yaml chore: bun -> pnpm 2026-08-05 18:01:53 +02:00
README.md chore(release): land the 0.0.1 release baseline 2026-12-03 12:00:44 +00:00
svelte.config.js fix: re-enable SSR, somewhat functional pre-JS version 2024-02-02 22:23:47 +01:00
tailwind.config.ts feat(ui): use Atkinson Hyperlegible Next variable font 2026-12-02 22:17:45 +00:00
tsconfig.json Initial commit. 2024-02-02 21:23:20 +01:00
vite.config.ts feat(time): synchronize with the server clock 2026-12-02 22:17:45 +00:00

Total Tech Test

A browser-based collection of audio, video, input, and device diagnostics. Use it to check a display, speakers, AV synchronisation, or browser-accessible hardware such as cameras, microphones, gamepads, and sensors.

Included tests

  • Video: fullscreen test card, AV sync video, display timer, and camera preview
  • Audio: stereo and surround channel tests, phase test, signal generator, microphone analyser and recorder
  • Controls: keyboard, mouse and multi-touch, and gamepad tests
  • Device and network: browser sensors and an embedded internet speed test

The UI is available in English, Spanish, French, German, Simplified Chinese, Japanese, Czech, and Ukrainian.

Getting started

Install Git LFS, Node.js, pnpm, and Dagger v0.21.12 with access to a container runtime.

git lfs pull
pnpm install --frozen-lockfile
pnpm run generate-assets
pnpm run dev

Vite prints the local URL when the development server is ready. Browser permission prompts for cameras, microphones, location, and sensors must be granted before those tests can access the relevant hardware.

Server clock synchronization

The /time screen reads GET /api/time. Vite provides this endpoint during development and preview; the static production build needs the web server to provide it. For Nginx, add this location inside the site's server block:

location = /api/time {
    default_type text/plain;
    add_header Cache-Control no-store always;
    return 200 "$msec";
}

$msec returns Unix seconds with millisecond precision. The endpoint must return a plain numeric body and disable caching so each sample reflects the current server time.

Commands

Command Description
pnpm run dev Start the development server.
pnpm run build Create the static production build in build/.
pnpm run preview Serve the production build locally.
pnpm run check Synchronise SvelteKit and run Svelte/TypeScript checks.
pnpm run lint Check formatting and run ESLint.
pnpm run format Apply Prettier formatting.
pnpm test Run the Vitest suite once.
pnpm run generate-assets Generate media assets with Dagger.
pnpm run av:dev Start the AV-sync asset development app.
pnpm run av:render:video <args> Render the AV-sync video asset.
pnpm run av:render:audio Render the AV-sync audio asset.

Dagger builds

Run this command from the repository root to export the complete static site.

dagger call site --source . export --path build

Dagger installs dependencies from pnpm-lock.yaml with --frozen-lockfile and generates the speaker test tracks and all three AV-sync videos. Run git lfs pull before building to fetch the source WAV files. The Dagger build uses its own Node.js installation.

In a regular checkout, the build reads Git history from the checkout automatically. For a linked worktree, pass a bundle because its .git file points to metadata outside the worktree:

history_dir=$(mktemp -d)
git bundle create "$history_dir/test-card-history.bundle" HEAD --tags
dagger call site --source . --git-history "$history_dir/test-card-history.bundle" export --path build
rm -rf -- "$history_dir"

The bundle carries the current commit and release tags without Git configuration or remote URLs. GitLab CI fetches full history and uses the same bundle input. Source exports without Git metadata still build; their release notes show the unavailable message.

Release notes start empty at version 0.0.1. After merging the baseline into main, tag that commit v0.0.1 and push the tag to origin. Eligible commits after that tag appear under Unreleased until they are tagged with a later release.

To export just the generated media for local development, run:

dagger call assets-generated --source . export --path assets/generated

Version bumps

Run the bump from a clean, up-to-date main after the v0.0.1 baseline tag is in place.

npm run version:bump -- patch
git push origin main v0.0.2

The script updates package.json and creates a local release commit and matching tag. Use minor, major, or an explicit version in place of patch when appropriate. For later releases, push the tag the script reports. If GitLab builds main before the mirror has the tag, start a fresh main pipeline once the tag is visible.

GitLab CI and deployment

The GitLab mirror builds on pushes to main. You can also start a pipeline in the GitLab UI to test a branch that has the CI configuration. Use a project runner that picks up untagged Docker jobs and mounts /var/run/docker.sock. The runner must be able to start Dagger v0.21.12 or connect to a compatible engine. The engine needs network access to the SSH target for deployment.

Protect main in GitLab. Set SSH_TARGET to the rsync destination, for example web:/var/www/site/, under Settings → CI/CD → Variables. Use a protected, masked variable scoped to production with variable expansion disabled.

Under Settings → CI/CD → Secure Files, upload SSH_CONFIG with the SSH client configuration, SSH_UPLOAD_KEY with the private deploy key (including its final newline), and SSH_KNOWN_HOSTS with the verified SSH host keys. The deploy job downloads these uploads by their GitLab file IDs. Update the corresponding ID in .gitlab-ci.yml when replacing an upload.

Pipelines on protected main deploy automatically after build_site succeeds. The deploy job passes that pipeline's build/ artifact to Dagger's deploy function.

Testing

The test suite uses Vitest. The visual regression test starts a Vite server on port 5888, captures /card with Puppeteer, and compares it with tests/fixtures/testcard-baseline.png.

pnpm test

A deliberately updated visual baseline can be regenerated by deleting the fixture and rerunning the relevant test:

rm tests/fixtures/testcard-baseline.png
pnpm exec vitest --run tests/test-card.test.ts

Screenshots and visual diff artifacts are written to tests/output/, which is ignored by Git.

Project structure

  • src/routes/ — SvelteKit routes for each diagnostic
  • src/lib/ — reusable Svelte components, including the test card and audio visualisers
  • messages/ — translated Paraglide message files
  • assets/generated/ — generated AV assets; do not edit by hand
  • av-sync/ — source and render scripts for AV-sync media
  • tests/ — Vitest functional and visual regression tests

Development notes

This is a SvelteKit, Svelte 5, TypeScript, Vite, and Tailwind CSS application. It is statically prerendered, with trailing slashes enabled. Formatting is enforced by Prettier and linting by ESLint. See AGENTS.md for repository conventions and validation guidance.