A Warhammer 40,000 companion app powered by Wahapedia data. Build army lists, browse datasheets, and plan your crusades with offline-capable tools.
"Knowledge is power, guard it well."
- Node.js >= 24.0.0 (CI pins Node 24)
- pnpm >= 10.0.0
Install dependencies once:
pnpm installThis is a pnpm workspace with four main packages:
-
@depot/core(packages/core)
Shared TypeScript types and pure utilities. This is the canonical source of truth for data structures flowing between CLI, web, and workers. -
@depot/cli(packages/cli)
Fetches Wahapedia CSV exports, converts them into typed JSON, and emits the data consumed by the PWA. -
@depot/web(packages/web)
React PWA (Vite + Tailwind) with IndexedDB offline storage for factions, datasheets, rosters, and collections. -
@depot/workers(packages/workers)
Cloudflare Pages/Workers handlers (for example, the Cogitator API). Rootfunctions/files are thin adapters into this package.
Core stack:
- React 19
- React Router DOM 7
- Vite 6
- Tailwind CSS v4
- TypeScript 5.9+
See AGENTS.md files (root and per-package) for deeper guidance.
pnpm startThis will:
- Build
@depot/coreand@depot/cli. - Run the CLI to download Wahapedia CSVs and convert them to JSON.
- Copy generated data into
packages/web/public/data/. - Start the web dev server.
Open the app at the URL Vite prints (typically http://localhost:5173).
If you already have data in packages/web/public/data/:
pnpm --filter @depot/web devUse this for quick UI-only work when you don’t need fresh Wahapedia data.
From the root:
pnpm --filter @depot/cli build # compile CLI
pnpm --filter @depot/cli start # download + convert CSV -> JSON
pnpm refresh-data # force a re-download + regenerateThe CLI writes to:
packages/cli/dist/json/– raw converted CSV filespackages/cli/dist/data/– faction payloads + navigation index
scripts/copy-data.mjs copies dist/data/ into packages/web/public/data/ (run automatically by pnpm start / pnpm build).
pnpm start # build core+cli, generate data, copy assets, start web dev server
pnpm dev # start web dev server only (expects data in packages/web/public/data)
pnpm build # production build (all packages, fresh data, copy assets)
pnpm format # format across the workspace
pnpm lint # lint/typecheck across the workspace
pnpm typecheck # type-only check
pnpm test # run tests
pnpm clean # clean all package outputspnpm --filter @depot/core build
pnpm --filter @depot/core dev
pnpm --filter @depot/core test
pnpm --filter @depot/core format
pnpm --filter @depot/core lint
pnpm --filter @depot/core typecheck
pnpm --filter @depot/core cleanpnpm --filter @depot/cli build # TypeScript build to dist/
pnpm --filter @depot/cli start # run compiled CLI
pnpm --filter @depot/cli start -- --force-download # force fresh CSV downloads
pnpm --filter @depot/cli dev # tsc -b --watch
pnpm --filter @depot/cli test
pnpm --filter @depot/cli format
pnpm --filter @depot/cli lint
pnpm --filter @depot/cli typecheck
pnpm --filter @depot/cli cleanpnpm --filter @depot/web dev # dev server (requires data)
pnpm --filter @depot/web build # production build
pnpm --filter @depot/web preview # preview production build
pnpm --filter @depot/web test # unit/integration tests (Vitest)
pnpm --filter @depot/web test:ci # CI-friendly test run
pnpm --filter @depot/web test:e2e # Playwright E2E tests
pnpm --filter @depot/web format
pnpm --filter @depot/web lint
pnpm --filter @depot/web typecheck
pnpm --filter @depot/web clean
pnpm --filter @depot/web generate-pwa-assetspnpm --filter @depot/workers build
pnpm --filter @depot/workers dev
pnpm --filter @depot/workers test
pnpm --filter @depot/workers format
pnpm --filter @depot/workers lint
pnpm --filter @depot/workers typecheck
pnpm --filter @depot/workers cleanCloudflare Pages/Workers entrypoints live under functions/ and should be thin adapters that delegate to compiled handlers from @depot/workers.
- CLI fetches CSV files from Wahapedia URLs defined in
packages/cli/src/config/supplements.ts. - CSV data is converted into typed JSON using
@depot/coretypes (wahapedia.*raw,depot.*processed). - Output is written to
packages/cli/dist/json/andpackages/cli/dist/data/(includingindex.jsonnavigation). scripts/copy-data.mjscopiesdist/data/topackages/web/public/data/.- The web app reads from
public/data/, normalizes intodepot.*shapes with@depot/core/utils/*, and caches results in IndexedDB for offline use.
All cross-package helpers live in @depot/core/src/utils; web code should not introduce ad-hoc data shaping when shared helpers exist.
The web client can report unhandled errors to Sentry.
Frontend env vars:
VITE_SENTRY_DSN– Sentry client DSNVITE_SENTRY_ENVIRONMENT(optional) – display environment name; defaults to build mode
CI / build env vars (for source maps):
SENTRY_AUTH_TOKENSENTRY_ORGSENTRY_PROJECT
When deploying (e.g. Cloudflare Pages), configure matching environment variables/secrets so the build step can upload source maps and the runtime can send events.
The published app exposes a privacy policy at /privacy. Update the content in packages/web/src/routes/privacy/index.tsx if data practices change.
depot is a free, open-source fan project intended for personal hobby use via the web. It is not monetised, has no in-app purchases or ads, and is not distributed via any app stores.
depot is not affiliated with, endorsed by, or sponsored by Games Workshop Limited. All related names, logos, imagery, and trademarks remain the property of their respective owners. Please support the official publications and products wherever you can.
Game data is derived from Wahapedia exports. Wahapedia is unaffiliated with Games Workshop and unaffiliated with depot; this project simply transforms its public CSV exports into offline JSON so you can browse and tinker with lists.
MIT License – see LICENSE.md.
Knowledge is power, guard it well.
