The ChainCraft game builder provides the core game design creation, remixing, and simulation capabilities within the ChainCraft ecosystem.
- Node.js 18+ and npm
- Anthropic API key for running tests
# Install dependencies
npm install
# Build project
npm run build-
Copy the example environment file:
cp .env.example .env
-
Add your Anthropic API key to
.env:ANTHROPIC_API_KEY=sk-ant-your-actual-api-key-here
-
Adjust model configurations as needed (defaults are provided)
See Testing with Secrets Documentation for detailed setup instructions.
# Run specific test suites
npm run test:generate
npm run test:action-queues# Schema extraction tests
npm run test:sim:schema-extract
# Transitions extraction tests
npm run test:sim:transitions-extract
# Instructions extraction tests
npm run test:sim:instructions-extract
# Full spec processing pipeline
npm run test:simulation- Testing with Secrets - How to configure API keys and run integration tests
- API Documentation - API endpoints and usage
- Deployment Guide - Production deployment instructions
- Instruction Architecture - Game instruction system design
src/ai/design/- Game design and specification generationsrc/ai/simulate/- Game simulation and runtimesrc/api/- HTTP API interfacessrc/gen/- Code generation utilitiessrc/integrations/- External integrations (Discord, etc.)
# Production build
npm run build
# Development build (includes source maps)
npm run build:dev
# Watch mode
npm run watch# Start API server
npm start
# Start Discord bot
npm run start:discordPlease read our Contributing License Agreement before submitting pull requests.
See SECURITY_LOGGING.md for information about security practices and logging.