How think-and-dev/cartesi-boardgame works
Main Components
a) Core Framework Layer:
• Game Engine (src/core/)
• State Management System
• Turn Order Management
• Flow Control
b) Client Layer:
• React Client (packages/react.ts)
• React Native Client (packages/react-native.ts)
• Debug Interface (src/client/debug/)
• Transport System (src/client/transport/)
c) Server Layer:
• Game Server (src/server/)
• Authentication System (src/server/auth.ts)
• Database Adapters (src/server/db/)
• Transport Handlers (src/server/transport/)
d) Blockchain Integration Layer:
• Cartesi Virtual Machine (CVM) Integration
• Cartesify Transport (src/client/transport/cartesify-transport.ts)
• Move Validation System
e) Plugin System:
• Events Plugin
• Random Number Generator
• Immer Integration
• Logging System
Component Relationships
[Client Layer] ←→ [Transport Layer] ←→ [Server Layer]
• ↕
• [Blockchain Integration Layer]
• ↕
• [Core Framework Layer]
• ↕
• [Plugin System]
Technical Details
• Socket.IO connections for real-time communication
• Database adapters (SQLite, In-memory, Flatfile)
• AI/Bot integration points
• Debug interface connections
• Authentication flow
Implementation Notes
• Clear labels for each component
• Version information and supported platforms
Key Workflows to Highlight
a) Game Move Flow:
Client → Transport → CVM Validation → State Update → Broadcast
b) State Synchronization:
Server State → Transport Layer → Multiple Clients
c) Plugin Integration:
Core Framework ← Plugin System → Game Implementation
Remember to include:
• Version compatibility notes
• Required dependencies
• Integration points with Cartesi
• Supported client platforms
• Database options
• Authentication methods
This will provide a clear understanding of how traditional board game logic interfaces with blockchain technology while maintaining the framework's ease of use.