Skip to content

Latest commit

 

History

History
111 lines (75 loc) · 2.36 KB

README.md

File metadata and controls

111 lines (75 loc) · 2.36 KB

game-builder

The ChainCraft game builder provides the core game design creation, remixing, and simulation capabilities within the ChainCraft ecosystem.

Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Anthropic API key for running tests

Installation

# Install dependencies
npm install

# Build project
npm run build

Environment Setup

  1. Copy the example environment file:

    cp .env.example .env
  2. Add your Anthropic API key to .env:

    ANTHROPIC_API_KEY=sk-ant-your-actual-api-key-here
  3. Adjust model configurations as needed (defaults are provided)

See Testing with Secrets Documentation for detailed setup instructions.

Running Tests

Unit Tests (No API Key Required)

# Run specific test suites
npm run test:generate
npm run test:action-queues

Integration Tests (Requires API Key)

⚠️ Note: Integration tests make real API calls and may incur costs.

# 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

Documentation

Project Structure

  • src/ai/design/ - Game design and specification generation
  • src/ai/simulate/ - Game simulation and runtime
  • src/api/ - HTTP API interfaces
  • src/gen/ - Code generation utilities
  • src/integrations/ - External integrations (Discord, etc.)

Development

Building

# Production build
npm run build

# Development build (includes source maps)
npm run build:dev

# Watch mode
npm run watch

Running Locally

# Start API server
npm start

# Start Discord bot
npm run start:discord

Contributing

Please read our Contributing License Agreement before submitting pull requests.

Security

See SECURITY_LOGGING.md for information about security practices and logging.