TeamManager API Server — iRacing OAuth broker and team data connector
  • Go 86.3%
  • Shell 13.1%
  • Dockerfile 0.6%
Find a file
Jarvis 4f2d7e3cf7
Some checks failed
02-ci / Lint & Static Analysis (push) Has been cancelled
02-ci / Test (race detection) (push) Has been cancelled
02-ci / Documentation Coverage (push) Has been cancelled
fix: cleanup stale directory before clone
2026-05-19 16:56:19 +02:00
.github chore: add CI/CD workflows — triage, CI, review, audit, dependency tracking 2026-05-07 02:08:47 +02:00
cmd/server feat: wire HTTP router for auth endpoints with full dependency injection 2026-05-19 08:09:34 +02:00
config/projects chore: add CI/CD workflows — triage, CI, review, audit, dependency tracking 2026-05-07 02:08:47 +02:00
docs docs: add deployment guide, update .env.example, fix .gitignore 2026-05-19 07:21:34 +02:00
internal fix(iracing): correct OAuth endpoints and secret masking from keeper reference 2026-05-19 08:36:15 +02:00
scripts fix: cleanup stale directory before clone 2026-05-19 16:56:19 +02:00
.dockerignore feat: add Dockerfile, docker-compose, Caddyfile and .dockerignore 2026-05-19 07:19:04 +02:00
.env.example docs: add deployment guide, update .env.example, fix .gitignore 2026-05-19 07:21:34 +02:00
.gitignore docs: add deployment guide, update .env.example, fix .gitignore 2026-05-19 07:21:34 +02:00
AGENTS.md feat: initial scaffolding — DDD architecture, contracts, issue map, Go module 2026-05-06 22:03:16 +02:00
docker-compose.yml fix: harden deploy.sh — remove embedded Caddy, wire to VPS Caddy, fix DB path 2026-05-19 10:02:31 +02:00
Dockerfile fix: update base image to golang:1.25 for go.mod compatibility 2026-05-19 16:55:46 +02:00
go.mod feat(auth): add SQLite persistent stores for OAuth state, tokens, connections 2026-05-19 08:04:47 +02:00
go.sum feat(auth): add SQLite persistent stores for OAuth state, tokens, connections 2026-05-19 08:04:47 +02:00
README.md feat: add VPS deployment script and update README 2026-05-19 08:12:27 +02:00

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 management
  • iracing — iRacing API client abstraction, data normalization
  • sync — Historical import orchestration, job management
  • team — Future: team management, member roles
  • health — 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.