Documentation Index
Fetch the complete documentation index at: https://docs.pcm.game/llms.txt
Use this file to discover all available pages before exploring further.
The Dual-Database Pipeline
PCMTG operates on a fully serverless, event-driven topology within the Google Cloud Platform (GCP)[cite: 438]. Operating a high-speed NoSQL database alongside a rigid relational ledger introduces the classic distributed systems challenge: Eventual Consistency and State Synchronization[cite: 499].1. Live Game State (Firestore - NoSQL)
Firestore is optimized for massive parallel reads and real-time websocket pushes, used strictly for “in-flight” data like the active Poker Tables[cite: 507].2. Core Economy (Neon Postgres - SQL)
The persistent economy requires ACID compliance, ensuring a player cannot spend the same currency twice[cite: 470, 471]. This database handles theCardMasterRegistry and the DynamicExchangeLedger[cite: 471].
3. The Resolution Bridge
The Next.js client never writes directly to Cloud SQL[cite: 502]. Instead, Cloud Scheduler triggers the Cloud RunGameLogicManager, which reads the final Firestore state, calculates the math, opens a secure SQL transaction, and only then updates the Firestore table status[cite: 504, 505].