An open API service indexing awesome lists of open source software.

https://github.com/vwinck-dev/boardflow-core

A framework-agnostic PHP chess core focused on move validation, game state, and extensible engine integration.
https://github.com/vwinck-dev/boardflow-core

board-game-framework boardflow boardflow-core chess core engine fen pgn pgn-analyzer pgn-parser pgn-reader pgn-viewer

Last synced: 24 days ago
JSON representation

A framework-agnostic PHP chess core focused on move validation, game state, and extensible engine integration.

Awesome Lists containing this project

README

          

# Boardflow Core ♟️

> ⚠️ **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