boardflow / boardflow-core
Framework-agnostic PHP chess core for move validation, game state management, FEN/PGN handling, and engine integration.
Requires
- php: ^8.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- laravel/pint: ^1.13
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.0
- pestphp/pest: ^3.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-04-11 03:39:29 UTC
README
⚠️ Version v0.0.0 — Work in Progress (WIP)
This package is currently under active development. Breaking changes are expected and the API is not stable yet.
📦 About
Boardflow Core is the foundational package of the Boardflow ecosystem. It provides a pure PHP implementation of chess logic, completely framework-agnostic and designed for extensibility.
The goal of this package is to handle all game rules and state management, while remaining independent from UI layers, frameworks (like Laravel), and chess engines.
🎯 Scope
This package is responsible for:
- ♟️ Chess board representation
- ♜ Piece modeling (types, colors, movement rules)
- ✅ Move validation (legal moves, illegal moves, edge cases)
- 🔁 Game state management (turns, history, undo/redo)
- 👑 Special rules:
- Castling
- En passant
- Promotion
- ⚠️ Game conditions:
- Check
- Checkmate
- Stalemate
- Draw detection
- 📄 FEN parsing and generation
- 📜 PGN parsing and export
🚫 Out of Scope
This package deliberately does not include:
- ❌ UI / rendering
- ❌ Laravel integration
- ❌ Chess engine (Stockfish, etc.)
- ❌ Networking / multiplayer
🔌 Engine Integration (Future-Proof)
Boardflow Core is designed to work with pluggable chess engines via abstraction.
This allows integration with:
- Local engines (e.g. Stockfish via CLI, but to be analysed)
- Remote APIs
- Custom engines (e.g. future
boardflow-engine)
🧱 Philosophy
- Pure PHP, no framework dependencies
- Strict typing and modern PHP (8.2+)
- Decoupled and testable architecture
- Designed for reuse across multiple environments
🛠️ Status
🚧 This project is in early development.
Things that may change:
- Public API
- Class structure
- Naming conventions
- Actually... Everything :D
📚 Roadmap (Initial, to be discussed)
- Board representation
- Piece system
- Move validation engine
- FEN support
- PGN support
- Game state manager
- Engine interface abstraction
🤝 Contributing
Not open for contributions yet — the architecture is still being defined.
📄 License
MIT