Nx monorepo for the Subspace Lattice board game — Firebase Auth, Firestore, Cloud Functions, with optional Tauri desktop shell.
| Nx name | Package | Path | Role |
|---|---|---|---|
core |
@subspace-lattice/core |
packages/subspace-lattice |
Game engine + types |
react-ui |
@subspace-lattice/react |
packages/subspace-lattice-react |
Board/Lobby/Chat + Firebase client |
functions |
@subspace-lattice/functions |
apps/functions |
Authoritative callables |
web |
@subspace-lattice/web |
apps/web |
Vite browser host |
desktop |
@subspace-lattice/desktop |
apps/desktop |
Tauri 2 shell over web |
- Node 22+, Yarn 4 (Corepack)
- Firebase CLI (
firebase-toolsin this repo) - Rust toolchain (for desktop): https://rustup.rs
- Firebase project: subspace-lattice
- Enable Authentication → Anonymous + Google
- Create a Firestore database
- Register a Web app; copy config into
apps/web/.env(see.env.example) yarn firebase use subspace-lattice
yarn install
# Terminal A
yarn emulators
# Terminal B — browser
yarn serve:web
# Or desktop (starts web vite via Tauri beforeDevCommand)
yarn serve:desktopyarn nx run-many -t lint test build typecheck
yarn nx test core
yarn nx test functions # room-logic (+ rules tests when emulator is up)
yarn test:rules # firestore rules via emulator
yarn test:e2e # Playwright (local AI path)
yarn nx build core
yarn nx build react-ui
yarn nx build functions
yarn nx build web
yarn nx run desktop:tauri-build# shellcheck source=scripts/lib/subspace-env.sh
. scripts/lib/subspace-env.sh
subspace_env_load web # or: base | desktop | functions | deploy | e2e
subspace_env_validate webSee .env.example and apps/web/.env.example.
roomCodes/{code}→{ roomId }rooms/{roomId}— seats / members (Functions write only)rooms/{roomId}/meta/gameStaterooms/{roomId}/chat/{messageId}rooms/{roomId}/events/{eventId}
