This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
bun install # Install dependencies (runs warmup:wasm post-install)
bun run build # Full workspace build via turbo
bun run build:packages # Build only @dojoengine/* packages
bun run dev # Watch mode for all packages (20 concurrent)bun run test # Run all tests
bun run test --filter=@dojoengine/state # Single package
bun test packages/state/src/__tests__/state.test.ts # Single bun test file
bunx vitest run path/to.test.ts --filter "suite" # Vitest single fileUses Biome (4 spaces, 80 cols, double quotes, trailing commas, semicolons).
bun run lint # Auto-fix lint issues
bun run lint:check # Check only
bun run format # Auto-fix formatting
bun run format:check # Check onlyBun workspace monorepo with Turbo orchestration. Packages in /packages/:
- @dojoengine/sdk - Main SDK: Torii clients, message signing, schema-aware queries (web/node builds)
- @dojoengine/core - DojoProvider (Starknet RPC wrapper), world contract interactions, ABI compilation
- @dojoengine/grpc - gRPC streaming subscriptions to Torii indexer via protobuf
- @dojoengine/internal - Shared utilities: schema parsing, query builders, pagination, tokens
- @dojoengine/state - Zustand & RECS stores for entity subscriptions
- @dojoengine/react - React hooks and RxJS bindings
- @dojoengine/create-burner - Burner wallet hooks for local testing
- @dojoengine/create-dojo - CLI scaffolding for new Dojo projects
Key external deps: starknet (^9.4.2), @dojoengine/torii-wasm/torii-client (1.8.2), zustand, effect.
- Keep imports grouped: external → blank line → workspace (
@dojoengine/*) → blank line → relative - Biome organizeImports is disabled; maintain manual grouping
- Explicit return types for exported APIs when inference is unclear
- Avoid
any; use generics and discriminated unions - Error handling: guard clauses, rethrow with context, no silent catches
- Tests must be deterministic; clean up observables/subscriptions
bun run lintbun run formatbun run test- Create changeset:
bun run changeset