Warning
Replaced by Frontbox Feb 2026
A TypeScript library for controlling pinball machine hardware, organized as a monorepo with separate packages for the core library and examples.
@jspin/core- Core library for pinball machine hardware control@jspin/examples- Example implementations and demos
-
Install dependencies for all packages:
npm install
-
Build all packages:
npm run build
-
Run the examples:
npm run start:examples
- Build all packages:
npm run build - Run tests:
npm run test - Start examples:
npm run start:examples - Development mode for examples:
npm run dev:examples - Clean build artifacts:
npm run clean
packages/
├── jspin-core/ # Core library
│ ├── src/
│ │ ├── hardware/ # Hardware abstraction layer
│ │ ├── commands/ # Hardware commands
│ │ ├── modules/ # Game modules
│ │ └── __tests__/ # Tests
│ └── package.json
└── jspin-examples/ # Example implementations
├── src/
│ └── basic-example.ts
└── package.json
- Hardware Abstraction: Control LEDs, switches, coils, and I/O networks
- State Management: Define and manage machine states
- Module System: Create reusable game logic modules
- Command System: Send commands to hardware controllers
- Event Handling: React to switch events and state changes
The examples package contains sample implementations showing how to use the core library:
- Basic Example: Demonstrates LED control and module activation based on machine state
- Switch Example: Shows how to handle switch events and respond to button presses
- LED Animation Example: Demonstrates creating animated LED sequences and effects
# Run different examples
npm run start:basic # Basic LED control example
npm run start:switch # Switch handling example
npm run start:led # LED animation example
# Development mode (with file watching)
npm run dev:basic # Watch basic example
npm run dev:switch # Watch switch example
npm run dev:led # Watch LED animation example