Development Commands
Core Commands
Package-Specific
Build Pipeline
The server package includes automated tasks for collision footprint extraction:world/assets/models/**/*.glb and generates world/assets/manifests/model-bounds.json with bounding box data for automatic collision footprint calculation.
Turbo Caching:
- Only re-runs when GLB files or script changes
- Outputs cached between builds
- Configured in
packages/server/turbo.json
Port Allocation
Hot Reload
The dev server provides:- Client: Vite HMR for instant updates
- Server: Auto-restart on file changes
- Shared: Watch mode with rebuild
Docker Services
CDN Container (Required)
The CDN serves game assets and manifests. It must be running before starting the game:- 3D models:
http://localhost:8080/models/ - Audio:
http://localhost:8080/audio/ - Manifests:
http://localhost:8080/manifests/
PUBLIC_CDN_URL at startup. In development, this defaults to http://localhost:8080, so the CDN must be running.
PostgreSQL Container (Automatic)
PostgreSQL starts automatically when the server runs:Manifest Loading
The server fetches manifests from the CDN at startup: Development:- Skips CDN fetch if local manifests exist in
packages/server/world/assets/manifests/ - Falls back to local files for offline development
- Always fetches from
PUBLIC_CDN_URL/manifests/ - Caches locally with 5-minute TTL
- Logs fetch status and errors
- 25+ JSON files including NPCs, items, recipes, gathering data
- Organized in subdirectories:
items/,gathering/,recipes/ - See Manifest-Driven Design for full list
Testing
Linting
GitHub Actions
The repository includes automated workflows for code quality and documentation:Claude Code Integration
.github/workflows/claude.yml- Responds to@claudementions in issues and PRs for automated assistance.github/workflows/claude-code-review.yml- Automated code review on pull requests.github/workflows/update-docs.yml- Automatically updates documentation when manifest files change
- Comment
@claudein any issue or PR - Claude will analyze the context and provide assistance
- For code reviews, Claude automatically reviews new PRs
Requires
CLAUDE_CODE_OAUTH_TOKEN and MINTLIFY_API_KEY secrets to be configured in repository settings.Common Workflows
Adding a New Feature
- Make changes in appropriate package:
- Game logic:
packages/shared/src/systems/ - UI components:
packages/client/src/ui/(reusable) orpackages/client/src/game/(game-specific) - Server handlers:
packages/server/src/systems/ServerNetwork/handlers/
- Game logic:
- Hot reload applies automatically
- Test in browser at localhost:3333
Adding UI Components
- Create component in
packages/client/src/ui/components/ - Add to barrel export in
index.ts - Import via
@/uialias - Use theme tokens from
useThemeStore
Updating Game Content
- Edit manifest files in
world/assets/manifests/ - Restart server to reload manifests
- Documentation updates automatically via GitHub Actions
Debugging Server
- Check terminal output for errors
- Server logs show WebSocket activity
- Database queries logged in dev mode