albertonline.org docs
Packages

Tooling & config

Shared Vitest/test config, TypeScript base configs, Next.js config helpers, dev-only devtools scripts, and a k6 load-test harness.

These packages don't ship product features — they standardize how every app in the monorepo is tested, type-checked, configured, and load-tested, so each app's own config stays a thin wrapper around one shared source of truth.

@repo/testing

Centralized Vitest setup for the whole monorepo: shared configs, per-environment setup files, and helpers for unit, component, e2e, and visual-regression tests. Tests run in real-browser mode via Playwright by default; visual regression uses pixelmatch to diff screenshots against stored baselines.

  • @repo/testing/vitest-configbaseConfig (node) and browserBaseConfig (browser mode, default for React components)
  • @repo/testing/setup, ./setup-react, ./setup-node, ./setup-browser, ./setup-effect — environment-specific setupFiles entries
  • @repo/testing/helpersunitTest, componentTest, e2eTest, visualTest
  • @repo/testing/effect — Effect-aware test utilities (pairs with @effect/vitest)
  • @repo/testing/fixtures, ./browser-callback-helpers
  • @repo/testing/visual-regressiontakeScreenshot, compareScreenshot

@repo/typescript-config

Shared tsconfig.json bases every app and package extends from, plus tsdown build presets. No source code — just JSON configs and a couple of tsdown config helpers re-exported for packages that bundle with it.

  • ./base.json, ./nextjs.json, ./react-library.json, ./package-library.json
  • ./tsdown-base, ./tsdown-library, ./tsdown-modern

@repo/next-config

Shared next.config building blocks: monorepo-wide Next.js defaults (Turbopack root, transpilePackages, serverExternalPackages, image remote patterns, the PostHog ingest reverse-proxy rewrite), a canary-flag helper apps can use without pulling in the full base config, and the @t3-oss/env-nextjs keys shared build-time env vars (ANALYZE, VERCEL*) validate against.

  • .config, withBaseConfig(overrides), withAnalyzer
  • ./canarycanaryDefaults, withCanaryPerf(cfg) (import-free, for standalone configs like lila-web/storybook that skip withBaseConfig)
  • ./keyskeys(), the shared createEnv schema for Next build env vars

@repo/next-devtools

Thin, dev-only React components that inject third-party devtools <script> tags (react-scan, react-grab) into a Next.js app. No README; purpose is inferred from its file names and its next/react peer deps — it's a UI-side package, not a build-config one.

  • NextDevtoolsScripts, ReactGrabScript, ReactScanScript

@repo/k6-harness

Effect-based CLI harness for running k6 smoke/load tests against the monorepo's apps. It knows each app's health-check URL and where its smoke/load scripts live (k6/smoke/<app>.smoke.ts, k6/load/<app>.load.ts), probes the target is up before running, then parses and summarizes k6's JSON summary output against configured thresholds.

  • probeTarget, TargetStatus — health-check before running
  • K6Runner, K6RunError, K6RunOptions — spawn and manage a k6 run
  • formatReport, summarizeRun, RunResult — human-readable run summaries
  • decodeSummary, breachedThresholds, K6Summary, ThresholdBreach — typed decoding of k6's summary JSON and threshold-breach detection
  • TARGETS, Target — the registry of known apps (web, blog, cvm, cvm-server, lila-server, lila-web, juicy-shop, it-f-store, portal, http-server)

See the packages overview and the architecture guide.

On this page