Skip to content

Repository files navigation

EigenInteractive

EigenInteractive Server

The server half of EigenInteractive: a server-authoritative engine for turn-based multiplayer games on Cloudflare Workers.

Identity, lobbies, the authoritative game loop, timing, ratings, social features, bots, push notifications, and deep links are built in. A game supplies one TypeScript GameModule containing its schemas and rules.

The Flutter app framework lives in eigen-flutter.

Start a game

The recommended flow creates a Cloudflare Worker and Flutter application together:

pnpm create eigen-game my-game
# or
npm create eigen-game@latest my-game

The scaffold installs published npm and pub.dev dependencies; it does not clone the engine repositories. Teams using separate Worker and application repositories can consume the same public packages and contract artifact directly.

Follow the quickstart or manual setup guide for both approaches.

Packages

Package Use it to
@eigeninteractive/rules Define the game module, payload schemas, hooks, observations, ratings, and bots
@eigeninteractive/server Compose and deploy the Cloudflare Worker
@eigeninteractive/testkit Test rules, emit game-contract.json, and validate twin fixtures

@eigeninteractive/kernel is an engine-internal package. Games should use the rules, server, and testkit APIs instead of importing the kernel directly.

One game becomes one Worker by passing its module and bindings to createEngine(...). The module's default export is the handoff:

// src/module/index.ts
import type { GameModule } from "@eigeninteractive/rules";
import { rulesV1 } from "./v1/rules";

export default {
  versions: { 1: rulesV1 },
} satisfies GameModule;

The Worker emits the module's Standard JSON Schemas and validated twin fixtures as game-contract.json. eigen_flutter turns that artifact into immutable Dart payloads and typed rules bases.

Reference implementation

examples/rps is the Rock–Paper–Scissors Worker. It demonstrates simultaneous hidden commitments, per-seat observations, contract generation, bots, and integration testing in the real Workers runtime.

It is engine source, not application scaffolding. A generated game consumes the published packages without cloning this workspace.

Documentation

Working on the engine

  • CONTRIBUTING.md: local setup, tests, generated artifacts, Changesets, cross-repository changes, and pull requests.
  • MAINTAINERS.md: registry setup, release operations, secrets, deployment, and failure recovery.
  • docs/blockers.md: upstream limitations forcing a temporary workaround, across every EigenInteractive repository.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages