Skip to main content

Wargrid Platform Reference

This page lists the current Wargrid platform pieces that are implemented in the new stack.

Applications

  • apps/site: marketing and legal surface for wargrid.app
  • apps/play: SvelteKit play client and PWA shell for play.wargrid.app
  • apps/admin: admin and moderation surface for admin.wargrid.app
  • apps/api: Elysia API for metadata, content, queue presets, liveops bootstrap, and testing metadata
  • apps/multiplayer: Colyseus server baseline
  • apps/docs: Docusaurus documentation
  • apps/blog: Astro blog
  • apps/studio: local content and balancing studio

Shared packages

  • @wargrid/contracts
  • @wargrid/auth
  • @wargrid/db
  • @wargrid/mail
  • @wargrid/telemetry
  • @wargrid/game-content
  • @wargrid/game-rules
  • @wargrid/game-sim
  • @wargrid/matchmaking-social
  • @wargrid/testing-tools
  • @wargrid/design-system
  • @wargrid/i18n

Implemented API routes

  • GET /api/health
  • GET /api/meta
  • GET /api/content/catalog
  • GET /api/matchmaking/queues
    • returns maps.short and maps.long as { layout, analysis }
    • layout carries width, height, lanes, overlap cells, and build zones
    • analysis carries path/build counts plus per-lane small and large route lengths
  • GET /api/player/bootstrap
  • GET /api/player/decks
  • POST /api/player/decks/import
  • POST /api/player/decks/default
  • GET /api/player/social
  • POST /api/player/social/actions
  • GET /api/player/lobbies
  • POST /api/player/lobbies
  • GET /api/admin/bootstrap
  • GET /api/liveops/admin-bootstrap
  • GET /api/testing/legacy-tools
  • ALL /api/auth/player
  • ALL /api/auth/admin

Current queue presets

  • casual-short
  • casual-long
  • ranked-short
  • ranked-long
  • custom-hosted

Current validation commands

Run the standard checks:

bun run typecheck
bun run lint
bun run test
bun run storybook:build
bun run docs:build
bun run blog:build

Storybook

  • Storybook is hosted from apps/play/.storybook.
  • Reusable UI components live in packages/design-system.
  • Current stories live in packages/design-system/src/components/*.stories.ts.

Player meta state

  • apps/api/src/player-state.ts owns the mutable fixture-backed deck, social, and lobby state used by the current play shell.
  • apps/play/src/lib/player-platform.ts is the typed client for those routes.
  • apps/play/src/routes/+page.svelte now validates bootstrap, auth, deck import/default selection, social actions, and lobby creation against the same shared contracts.

Grid and map tooling

  • @wargrid/contracts now exposes shared schemas for GridPoint, BuildZone, PathLane, MapLayout, and MapLayoutAnalysis.
  • @wargrid/game-sim now owns:
    • seeded short and long map generation
    • overlap resolution
    • build-zone generation that stays off the lane corridor
    • small and large unit route checks
    • structure placement validation for tower and trap cells
    • matrix generation for app previews and local tooling
  • apps/studio now renders the same board matrix and lane analysis that the API exposes.
  • apps/play/src/lib/GridPreview.svelte now renders lane corridor cells from the shared simulation package instead of reconstructing wide rectangles locally.

Run vendor doc sync:

bun run vendor-docs:sync

Legacy validation bridge

The current testing package still points to the legacy tool roots:

  • tools/cdp
  • tools/image-tools

Use the generated command helpers in @wargrid/testing-tools when building AI validation flows.