One Grudge ID per human · many characters · account bag shared across games.
Auth via id.grudge-studio.com · player state on Railway Postgres.
Solana wallet + GBUX live on Railway account scope (not character). Phantom external or Crossmint custodial.
Sign in to load Railway wallet status.
Friends, DMs, groups, and fleet server chat keyed to Grudge ID account (not character). Same social graph in every game. History stays on Railway Postgres.
Canonical 3D scene / map / effects editor. Loads ObjectStore definitions + R2 assets.
Open Forge with SSO-friendly return to this hub via ?from=grudge.studio.
Canonical production origins (not Vercel deploy-hash URLs). Forge + games + studio tools first; Puter apps secondary.
Production endpoints (do not invent parallel SSOT)
This hub (grudge.studio) same-origin /api/* rewrites to Railway + ID.
| ROLE | HOST | SSOT | NOTE |
|---|---|---|---|
| Hub (grudgeDot) | grudge.studio | Portal | Accounts · wallet · Treaty · Forge entry · deploy map |
| Auth | id.grudge-studio.com | JWT / SSO | /login?redirect_uri= → Railway auth impl |
| Game data | grudge-api-production-0d46.up.railway.app | Postgres | characters · account bag · island · wallet · treaty |
| Forge editor | forge.grudge-studio.com | Studio | 3D scene/map/effects · ObjectStore + R2 |
| Definitions | objectstore.grudge-studio.com/api/v1 | JSON | recipes, items, races — not player state |
| Binaries | assets.grudge-studio.com | R2 | icons, GLB, audio, grudge-fleet.js |
| AI | ai.grudge-studio.com | Workers | + Puter AI (user-pays) |
Retired / never use as player SSOT
| BAD | WHY | USE INSTEAD |
|---|---|---|
| api.grudge-studio.com | Split-brain — not Railway characters | same-origin /api/* → Railway |
| MySQL 8 on VPS | Legacy docs only | Railway Postgres |
| D1 for islands/chars | Asset registry only | Railway home_islands |
| Puter KV as sole truth | Cache only | Railway + optional KV mirror |
| *.vercel.app deploy hashes | Per-deploy instances | stable *.grudge-studio.com aliases |
Scope matrix (account vs character)
Live product links
Deploy this hub (grudgeDot → grudge.studio)
??? Backend Services (Docker Compose)
| SERVICE | CONTAINER | PORT | URL |
|---|---|---|---|
| Grudge Identity | grudge-id | 3001 | id.grudge-studio.com |
| Wallet Service | wallet-service | 3002 | (internal only) |
| Game API | Railway | — | grudge-api-production-0d46 |
| AI Gateway | CF Worker | — | ai.grudge-studio.com |
| Account / chars | Railway | — | /api/account · /api/characters |
| Command Hub | Vercel | — | grudge.studio (grudgeDot) |
| Forge | Vercel | — | forge.grudge-studio.com |
| Colyseus WS | Railway | — | wss://grudge-api-production-0d46… |
| Postgres | Railway | — | characters · account · islands SSOT |
| ObjectStore | Worker | — | objectstore.grudge-studio.com |
?? Core Dependencies
| PACKAGE | PURPOSE | LAYER |
|---|---|---|
| Node.js 20 | Runtime for all backend services | Backend |
| Express.js 4 | REST API framework for all services | Backend |
| Socket.IO 4.7 | WebSocket � /game, /crew, /global, /pvp namespaces | Backend |
| pg / drizzle | Railway Postgres — player SSOT | Backend |
| ioredis | Redis 7 client � rate limiting, pub/sub, caching | Backend |
| jsonwebtoken | JWT auth (issued by grudge-id, verified everywhere) | Backend |
| bcryptjs | Password hashing for local auth | Backend |
| Colyseus | Multiplayer game server framework (headless-server) | Game Server |
| BabylonJS | 3D engine for game clients | Frontend |
| React 19 | UI framework for Vercel-deployed frontends | Frontend |
| Three.js | 3D rendering for web game clients | Frontend |
| Web3Auth | Solana wallet authentication (JWKS-verified) | Auth |
| @solana/web3.js | Solana blockchain interaction | Web3 |
| Crossmint SDK | Server-side custodial wallets + cNFT minting | Web3 |
?? Infrastructure & DevOps
| TOOL | PURPOSE | STATUS |
|---|---|---|
| Docker Compose | Container orchestration for all services | ACTIVE |
| Coolify | Self-hosted PaaS on VPS (deploy management) | ACTIVE |
| Traefik | Reverse proxy � TLS termination, routing | ACTIVE |
| Cloudflare Workers | Edge compute � site, dashboard, R2 CDN, auth-gateway | ACTIVE |
| Cloudflare R2 | S3-compatible object storage for game assets | ACTIVE |
| Cloudflare KV | Edge key-value � status caching, rate limiting | ACTIVE |
| Vercel | Frontend deployments (all game clients + apps) | ACTIVE |
| GitHub Actions | CI/CD � lint, test, deploy on push | ACTIVE |
| PM2 | Process manager for non-Docker Node services | AVAILABLE |
| Wrangler CLI | Cloudflare Worker deploy tool | ACTIVE |
?? AI & Tooling
| SERVICE | USE CASE | INTEGRATION |
|---|---|---|
| Claude (Anthropic) | Character generation, story AI, code assist | Server-side API |
| Gemini (Google) | AI console, NPC dialogue, fast inference | Server-side API |
| OpenAI / DALL-E | Image generation for characters, islands | Server-side API |
| Puter AI | Client-side AI (user-pays model, $0 cost) | Client SDK |
| Meshy / Tripo | Text-to-3D voxel model generation | Server-side API |
| Twilio Verify | SMS OTP for phone authentication | Server-side API |
?? Game Server Stack
| COMPONENT | PURPOSE | PORT / URL |
|---|---|---|
| Colyseus Server | Authoritative multiplayer rooms (combat, islands) | 7777 (internal) |
| Socket.IO /game | Island rooms � real-time player movement, events | ws.grudge-studio.com |
| Socket.IO /crew | Crew chat + coordination | ws.grudge-studio.com |
| Socket.IO /global | Server-wide broadcasts (kills, claims, events) | ws.grudge-studio.com |
| Socket.IO /pvp | PvP matchmaking + arena state | ws.grudge-studio.com |
| Redis Pub/Sub | Cross-process event bridge for WS namespaces | 6379 (internal) |
| ObjectStore API | Static game data (weapons, armor, recipes, races) | GitHub Pages |
?? Auth Providers
| PROVIDER | ENDPOINT | STATUS |
|---|---|---|
| Email / Password | POST /auth/login + /auth/register | LIVE |
| Discord OAuth | GET /auth/discord ? callback | LIVE |
| Google OAuth | GET /auth/google ? callback | LIVE |
| GitHub OAuth | GET /auth/github ? callback | LIVE |
| Web3Auth (Phantom) | POST /auth/wallet | LIVE |
| Puter Cloud | POST /auth/puter | LIVE |
| Phone SMS (Twilio) | POST /auth/phone-send + /phone-verify | LIVE |
| Guest (Device ID) | POST /auth/guest | LIVE |
| SSO Cookie | GET /auth/sso-check | LIVE |