TeamManager API Server — iRacing OAuth broker and team data connector
- Go 86.3%
- Shell 13.1%
- Dockerfile 0.6%
| .github | ||
| cmd/server | ||
| config/projects | ||
| docs | ||
| internal | ||
| scripts | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| AGENTS.md | ||
| docker-compose.yml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
TeamManager Server
TeamManager Server is an iRacing OAuth broker and historical data connector for the Strategy Desktop client ecosystem. It serves as the authoritative data source for iRacing account linking, token management, and historical data synchronization.
Architecture
Internet → VPS:443 → Caddy (auto-TLS) → teammanager-server:8080 (Docker-internal only)
This project follows Domain-Driven Design (DDD) with hexagonal architecture. See docs/architecture/ddd-architecture.md for details.
Bounded Contexts
auth— OAuth broker, token custody, pairing flow, session managementiracing— iRacing API client abstraction, data normalizationsync— Historical import orchestration, job managementteam— Future: team management, member roleshealth— Health checks, diagnostics
API Endpoints
| Method | Path | Description |
|---|---|---|
GET |
/health |
Health check |
GET |
/auth/iracing/start?pairing_token=X |
Start OAuth flow → redirect to iRacing |
GET |
/auth/iracing/callback?code=X&state=X |
iRacing OAuth callback |
GET |
/auth/iracing/status?pairing_token=X |
Connection status |
POST |
/auth/iracing/disconnect?pairing_token=X |
Disconnect iRacing account |
Full API contract: docs/contracts/teammanager-iracing-connector.md
Development
Prerequisites
- Go 1.21+
- Docker & Docker Compose
Local Development
# Clone
git clone https://github.com/Bio1988/teammanager-server.git
cd teammanager-server
# Run directly
DATABASE_URL="file::memory:?cache=shared" go run ./cmd/server/main.go
# Or via Docker
cp .env.example .env
docker compose up -d
# Health check
curl http://localhost:8080/health
Build & Test
go build ./...
go vet ./...
go test ./...
Deployment
See docs/deployment.md for full deployment documentation.
Quick Deploy to VPS
# Prerequisites:
# 1. DNS: api.teammanager.cc → VPS public IP
# 2. .env with IRACING_CLIENT_SECRET on VPS
./scripts/deploy.sh
Deployment Status
| Component | Status |
|---|---|
DNS api.teammanager.cc |
⏳ Pending — A record to VPS public IP needed |
| Docker containers | ⏳ Ready to deploy |
| Let's Encrypt TLS | ⏳ Automatic once DNS is configured |
| iRacing Client Secret | ⏳ Must be set in .env on VPS |
Configuration
See .env.example and docs/deployment.md.
Required: IRACING_CLIENT_SECRET must be set for OAuth to work.
Contributing
See AGENTS.md for repository rules.
Related Projects
- strategy-desktop — The desktop client