Containerised microservices backend for the SixByFive TCG platform. Each domain runs as an independently deployable Node.js/Express service coordinated by Docker Compose.
# Clone and enter the repo
git clone <repo-url>
cd tcg-runtime
# Copy and fill in secrets
cp env/.env.shared env/.env.shared.local
# edit env/.env.* files with real values
# Build and start all services
docker compose -f infra/compose/docker-compose.yml up --build -d
# Tail logs
docker compose -f infra/compose/docker-compose.yml logs -fThe public entry point is the Gateway at http://localhost:4010.
| Service | Port | Responsibility |
|---|---|---|
| Gateway | 4010 | GraphQL API — single entry point for clients |
| Auth | 4011 | Registration, login, OAuth, 2FA, sessions |
| Catalog | 4012 | Cards, sets, pricing data |
| Collections | 4013 | User collections, wishlists, binders |
| Marketplace | 4014 | Listings, offers, orders, escrow |
| Trading | 4015 | P2P card trades |
| Notifications | 4016 | In-app notifications and email |
| Media | 4017 | File uploads and image serving |
| Realtime | 4018 | WebSocket & SSE push events |
| Payments | 4019 | Subscriptions and transaction ledger |
| Worker | 4020 | Background cron jobs |
| Users | 4021 | User profiles and account management |
Services communicate over the internal Docker network using http://<container-name>:<port>. Only the Gateway is exposed publicly.
| Doc | Description |
|---|---|
| Architecture — Services | Service map, port list, dependency graph |
| Architecture — Database Ownership | Which service owns which DB tables |
| Architecture — Environment Variables | All env vars and their defaults |
| API — Auth | Auth service routes (register, login, 2FA…) |
| API — Marketplace | Listings, offers, orders, Stripe escrow |
| API — Payments | Subscription plans and billing |
| API — Realtime | WebSocket / SSE connection guide |
| API — Internal | Service-to-service internal endpoints |
| Runbook — Local Development | Running services locally without Docker |
| Runbook — Deployment | Deploying to a Linux VPS |
| Runbook — Incident & Restart | Service recovery procedures |
- Database: MySQL running on the host (
host.docker.internal:3306) - Cache / Pub-Sub: Redis container on port 6379
- Payments: Stripe Billing + Connect Express
- Shipping: EasyPost API
- Auth providers: Google Sign-In, Discord OAuth
- Image processing: Sharp (in media-service)
tcg-runtime/
├── apps/ # Service source code (one directory per service)
├── packages/ # Shared libraries (config, logger, database, contracts…)
├── env/ # Environment variable files (gitignored secrets)
├── infra/
│ └── compose/ # docker-compose.yml
└── docs/ # This documentation