A modern, blockchain-powered multiplayer card game platform featuring intelligent AI opponents, decentralized match verification, and a flexible asset-based game system.
Experience the future of multiplayer card gaming with blockchain verification, intelligent AI opponents, and seamless cross-platform gameplay.
๐ฎ Play Now | ๐ Visit Website
Ocentra Games is a next-generation multiplayer card game platform that combines:
- Solana Blockchain for decentralized match state and escrow management
- Local & Cloud AI for intelligent opponents powered by LLMs
- Asset-Based Game System for flexible, data-driven game modes
- Event-Driven Architecture for clean domain separation
- Web3 Integration for true ownership and verifiable gameplay
We're building a platform where game rules, AI behavior, and game modes are all data-driven assets, making it easy to create, modify, and deploy new games without code changes.
- Claim - High-stakes strategic card collection with psychological warfare
- Three Card Brag - Fast-paced British card game with hand rankings
- Texas Hold'em - Classic poker with blockchain verification
- More games coming...
- Local LLMs - Run AI models directly in the browser (Transformers.js)
- Cloud LLMs - Support for OpenAI, OpenRouter, LM Studio, and more
- Chain of Thought - AI reasoning is captured and verifiable
- Personality-Based - Each AI has distinct playing styles
- Solana Integration - Match state stored on-chain via Anchor program
- Decentralized Escrow - Player funds held securely on-chain
- Verifiable Matches - Full match records stored in Cloudflare R2
- Leaderboard Snapshots - Top 100 players recorded on-chain
- Asset-Based System - Games defined as
.assetfiles (Unity ScriptableObject pattern) - Event-Driven - Clean separation between UI, Engine, Solana, and AI domains
- Phase-Based Development - Systematic, spec-driven implementation
- Multiplayer-First - All games use multiplayer architecture, even single-player (1 human + AI)
- React 19 + TypeScript + Vite
- Zustand for state management
- React Query for data fetching
- EventBus for cross-domain communication
- Solana - On-chain game state and escrow
- Anchor Framework - Rust-based Solana program
- Web3.js + Anchor Client - TypeScript integration
- Transformers.js - Local LLM inference in the browser
- Multiple Providers - OpenAI, OpenRouter, LM Studio, Native
- Model Manager - Dynamic model loading and switching
- Cloudflare Workers - Backend API and match coordination
- Cloudflare R2 - Off-chain full match record storage
- Durable Objects - Stateful match coordination
- IndexedDB - Local caching and persistence
- Vitest - Unit testing
- Playwright - E2E testing
- Anchor Tests - Solana program testing
- TypeScript - Full type safety
๐ Start Here: docs/ocentra/REPO-MINDMAP.md - Complete repository structure overview
- Documentation Hub - Main documentation index
- Solana Integration - Blockchain architecture and implementation
- Game Rules - Rules for Claim, Three Card Brag, Texas Hold'em
- Game Mode System - Asset-based game mode architecture
- AI System - LLM integration and prompt construction
- Architecture - Event-driven domains and UI structure
- Libraries - Core library documentation
- Game Mode Assets - Phases 1-6: Asset system implementation
- Rules Assets - Phase 7: Rules asset system
- AI Integration - Phase 8: AI integration with assets
- Solana Phases - Phases 1-10: Blockchain implementation
- Node.js 22+
- Rust (for Solana program)
- Anchor Framework (for Solana development)
- Cloudflare Account (for R2 storage)
-
Clone the repository
git clone <repository-url> cd ocentra-games
-
Install dependencies
npm install
-
Set up environment
cp .env.example .env # Edit .env with your configuration -
Start development server
npm run dev
The game will be available at
http://localhost:3000 -
Run Solana tests (in separate terminal)
cd Rust/ocentra-games anchor test
๐ฎ Try it now: game.ocentra.ca
๐ Visit our website: ocentra.ca
For detailed setup instructions, see:
- Local Development Guide - Complete setup walkthrough
- โ Solana Program - Complete Anchor program with match lifecycle, escrow, and leaderboards
- โ Event-Driven Architecture - EventBus system connecting UI, Engine, Solana, and AI domains
- โ Game Engine - Core game logic, rules, state management
- โ AI System - Local and cloud LLM integration with chain of thought
- โ Match Recording - Canonical serialization and verification
- โ Cloudflare Infrastructure - Worker API and R2 storage
- โ UI Framework - React components and pages for Claim and Three Card Brag
- โ Test Infrastructure - Comprehensive test suite (unit, integration, E2E)
- ๐ง Asset-Based Game System - Migrating from code-based to asset-based game modes
- ๐ง Rules Asset System - Extracting rules into separate
.assetfiles - ๐ง Game Editor - Visual editor for creating and editing game assets
- ๐ง Additional Games - Texas Hold'em implementation
- ๐ More Card Games - Bridge, Spades, Hearts, Rummy variants
- ๐ Tournament System - Organized competitions and brackets
- ๐ NFT Integration - Card collections and ownership
- ๐ Mobile Apps - Native iOS and Android via Capacitor
- ๐ Social Features - Friends, chat, spectating
Unlike traditional game servers, Ocentra Games uses Solana blockchain for match state and escrow. This means:
- No Central Server - Match state is stored on-chain
- Transparent Rules - Game logic is verifiable on-chain
- Player Ownership - Funds held in smart contracts, not our wallets
- Censorship Resistant - No single point of failure
AI opponents use chain of thought reasoning that's captured and stored:
- Transparent Decisions - See why AI made each move
- Reproducible Games - Replay matches with same AI behavior
- Fair Play - AI reasoning is auditable
- Research Platform - Perfect for AI research and development
Games are defined as data assets, not code:
- No Code Changes - Create new games by adding
.assetfiles - Rapid Iteration - Modify game rules without redeploying
- User-Generated Content - Players can create and share game variants
- Unity-Like Workflow - Familiar ScriptableObject pattern for game developers
Every game uses multiplayer architecture, even single-player:
- Consistent Codebase - Same code path for all games
- Easy Scaling - Add AI or human players seamlessly
- Unified State - One state management system for everything
- Future-Proof - Easy to add new player types (AI, human, spectator)
Built with openness in mind:
- Documentation-First - Comprehensive, spec-driven documentation
- Phase-Based Development - Clear roadmap and milestones
- Modular Design - Easy to extend and customize
- Developer-Friendly - Clean architecture and patterns
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CLIENT LAYER โ
โ React UI โ EventBus โ Game Engine โ AI System โ
โ โ โ โ โ
โ WebRTC P2P Solana Client Local LLM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BLOCKCHAIN LAYER โ
โ Solana Network (Anchor Program) โ
โ - Match State PDAs โ
โ - Escrow Accounts โ
โ - Leaderboard Snapshots โ
โ - Game Registry โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STORAGE LAYER โ
โ Cloudflare R2 (Hot Storage) โ
โ - Full Match Records โ
โ - Chain of Thought โ
โ - Match History โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key Principle: All cross-domain communication is event-driven via EventBus
- UI Domain - React components and pages
- Engine Domain - Game logic and state
- Solana Domain - Blockchain integration
- AI Domain - LLM integration
- Languages: TypeScript, Rust, JavaScript
- Total Lines of Code: ~50,000+ (estimated)
- Games: 3 (Claim, Three Card Brag, Texas Hold'em)
- AI Providers: 4+ (OpenAI, OpenRouter, LM Studio, Native)
- Test Coverage: Comprehensive (unit, integration, E2E)
- Documentation: 100+ markdown files, spec-driven
We welcome contributions! Please see our contributing guidelines:
- Read the Documentation - Start with REPO-MINDMAP.md
- Follow the Phases - Check Phases for implementation roadmap
- Code Style - Follow ESLint + Prettier rules
- Write Tests - Add tests for new functionality
- Update Docs - Keep documentation in sync with code
This repository is public for transparency and educational purposes, but the codebase is not open source.
All code, documentation, and assets in this repository are proprietary and remain the intellectual property of Ocentra AI. See LICENSE for full terms.
Key Restrictions:
- โ You may view and study the code for learning purposes
- โ You may NOT copy, modify, distribute, or use commercially
- โ Unauthorized use is strictly prohibited
For licensing inquiries or collaboration opportunities, please contact us at ocentra.ca.
- ๐ฎ Play Now: game.ocentra.ca - Live game platform
- ๐ Website: ocentra.ca - Official website
- ๐ฆ GitHub Repository: ocentra/ocentra-games - Source code
- ๐ข GitHub Organization: ocentra - Other projects
- ๐ Documentation: docs/ocentra/
- ๐ฆ Solana Program: Rust/ocentra-games/
- โ๏ธ Cloudflare Worker: infra/cloudflare/
- ๐ผ LinkedIn Company: Ocentra AI - Official company page
- ๐ผ LinkedIn: Sujan Mishra - Project creator
Built with:
- Solana - Blockchain infrastructure
- Anchor - Solana framework
- React - UI framework
- Transformers.js - Local ML inference
- Cloudflare - Infrastructure
- And many other amazing open-source projects
Last Updated: 2025-01-20
Status: Active Development
Version: 0.1.0-alpha
