OhMyGame
OhMyGame is the open-source studio for making games with AI. Design, build, playtest, and publish games in one app, with your own model keys.
real-time multiplayer poker
Translation pending
GamesGo · TypeScriptGitHub @evanofslackOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Real time multiplayer poker application powered by go, react, and websockets
Can run from a prebuilt container, evanofslack/go-poker:latest, with Postgres to keep tables
across restarts:
services:
go-poker:
image: evanofslack/go-poker:latest
restart: unless-stopped
ports:
- 8080:8080
environment:
DATABASE_URL: postgres://poker:poker@postgres:5432/poker?sslmode=disable
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: poker
POSTGRES_PASSWORD: poker
POSTGRES_DB: poker
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "poker"]
interval: 2s
retries: 15
volumes:
postgres:
DATABASE_URL picks where tables are kept:
postgres://user:pass@host:5432/db: Postgressqlite:/data/poker.db: a SQLite file; mount a volume at its directoryTables are saved between hands and on shutdown. A graceful restart carries on mid-hand; a crash goes
back to the end of the last hand, which is then dealt again. Closed tables are kept for
RETAIN_DAYS (default 30) and then deleted.
The same store keeps an audit of what each connection did and tried, refused messages included, with
its IP: for settling disputes, never shown to players. Entries outlive their table and are deleted
after AUDIT_RETAIN_DAYS (default 30).
ADMIN_ADDR (off by default) serves a read-only admin page at /admin on its own address: open
tables, who is behind each name with their IP, and the audit. It has no login, so keep it off the
internet and reach it over an SSH tunnel (ssh -L 2113:localhost:2113 host) or a private network
such as Tailscale. Outside Docker, set ADMIN_ADDR=127.0.0.1:2113. In Docker, the container has to
listen on every interface, so set ADMIN_ADDR=:2113 and publish the port on the host's loopback
only:
ports:
- 8080:8080
- 127.0.0.1:2113:2113
environment:
ADMIN_ADDR: ":2113"
The public port never serves it. With just start it's at localhost:3000/admin, and with just serve at
localhost:2113/admin.
Prometheus metrics are served at /metrics on a separate port, METRICS_ADDR (default :2112, or set it empty to turn off).
| metric | labels | |
|---|---|---|
poker_connections | open websockets | |
poker_tables | state: active, ended | open tables |
poker_players | kind: human, bot | seated players |
poker_limit | limit: conns, conns_per_ip, tables, tables_per_ip, messages | configured limits |
poker_limit_hits_total | limit | connections, tables or messages refused by a limit |
poker_hands_total | hands dealt | |
poker_tables_closed_total | reason: empty, ended, idle, shutdown | tables closed |
poker_seat_grace_total | outcome: reconnected, expired | dropped players who came back or lost their seat |
poker_slow_client_drops_total | clients dropped for falling behind | |
poker_panics_total | panics recovered while handling a message | |
poker_save_errors_total | tables or audit batches that failed to save | |
poker_audit_dropped_total | audit entries dropped for a full queue or a failing store | |
poker_save_seconds | how long saving a table took |
Plus the standard go_* and process_* metrics.
Run the go server and next dev server with hot reload (needs go, node and just):
just start
Then open http://localhost:3000. Run just check for the same checks as CI, or just to list all recipes. Or build and run the production image from local code:
docker compose -f docker-compose-dev.yaml up --build