Charge the pile. Hold the Senior seat. Sweep all 52 — or it's a draw.
A custom strategic 4-player card game with full online multiplayer, bots, replays, and statistics.
Live at https://trumpcard.online
- Single-player with Easy / Normal / Hard bots and a 60-second turn timer
- Online multiplayer with room codes, friend invites, and spectator mode
- Reconnect — drop mid-match and your seat is held; rejoin with your full hand restored
- Guest mode — play instantly with no account; upgrade later and keep your history
- Match replays — every match is recorded and replayable move-for-move
- Statistics — win rates, average collection size, favorite trump suit, match duration
- Accessibility — color-blind deck, reduced motion, larger text, keyboard support
Requires Docker.
cd infra/docker
docker compose up --build- Game:
http://localhost - API health:
http://localhost/api/health
cd services/trump_card
npm test # unit tests — banking + engine logic (no server needed)
npm run test:rooms # integration — requires server running on :3001
npm run test:social # integration — requires server running on :3001Deployed to AWS EC2 (eu-north-1, Stockholm) across two instances:
| Instance | Purpose | Stack |
|---|---|---|
| App server | Game backend + frontend | Node.js, nginx, SQLite |
| Monitoring server | Observability | Prometheus, Grafana, node-exporter |
- Terraform provisions EC2 instances, security groups, and Elastic IPs — details
- Ansible installs Docker and deploys containers from
ghcr.io— details - GitHub Actions runs tests, builds images, scans for CVEs, and auto-deploys on every push to
main - Prometheus + Grafana monitor app metrics and EC2 OS metrics across both instances — details
- Game Rules — full rules, Senior seat, collections, KHOTI
- Backend — API reference, database schema, environment variables
- Multiplayer — room architecture, socket events, reconnect, guest mode
- AWS Infrastructure — Terraform, EC2, Elastic IP
- Ansible Deployment — Docker deployment, playbooks
- Monitoring — Prometheus, Grafana, metrics
| Layer | Choice |
|---|---|
| Frontend | React 19 + TypeScript + Vite |
| Backend | Node.js + Express + Socket.io |
| Database | SQLite via node:sqlite |
| Auth | JWT + bcryptjs |
| Containers | Docker + Docker Compose |
| Orchestration | Kubernetes (Amazon EKS) + Helm |
| CI/CD | GitHub Actions → Ansible/Helm → EC2/EKS |
| Monitoring | Prometheus + Grafana |
| Infrastructure | Terraform + AWS EC2, EKS, RDS, Lambda, and SNS |