A cross-game analytics and coaching platform that helps competitive gamers track performance, identify patterns, and improve through data-driven insights.
- Marvel Rivals - Hero shooter stats via community APIs
- Valorant - Agent stats via Henrik API
- Clash Royale - Trophy/battle stats via Supercell API
- Brawl Stars - Brawler stats via Supercell API
- Steam Library - Import and track your full game library
- Natural-language insights - Turns your raw stats into a personalized read: when you play best, when you tilt, your strongest/weakest skill areas, and one concrete focus for the week
- Graceful AI fallback - Uses OpenAI for insights, then falls back to a deterministic rules engine, so insights render even with no API key configured
- Today's Performance - Real-time win rate, K/D/A, and time played
- Session Intelligence - Best time of day, optimal session length, tilt detection
- Skill Domains - Cross-game metrics (Mechanics, Aggression, Vitality, etc.)
- Character Breakdown - Per-hero/agent performance stats
- Rank Tracking - Historical rank progression with sparkline charts
- Daily Quests - Verifiable stat-based challenges (1 free, 3 for Pro)
- Streaks & Milestones - Track win streaks and achievement progress
- Shareable Rewards - Badge + share card generation for completed quests
- Real-time Sync - Manual refresh + auto-refresh on stale data
- Background Polling - Scheduled in-process stat ingestion every 30 min (BullMQ + Redis wired in for a dedicated worker at scale)
- Subscription System - Stripe integration for Pro tier ($4.99/mo)
- Error Monitoring - Sentry for frontend errors in production
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, React 18, Tailwind CSS, Framer Motion |
| Backend | Fastify, Prisma ORM, PostgreSQL |
| Queue | BullMQ, Redis (Upstash) |
| Storage | S3-compatible (MinIO local, Cloudflare R2 production) |
| Auth | Email/Password, Google & Discord OAuth, Steam OpenID |
| Payments | Stripe Checkout + Customer Portal |
| Monitoring | Sentry |
| Deployment | Vercel (web), Render (API), Neon (DB) |
tactix/
├── apps/
│ ├── web/ # Next.js dashboard
│ └── mobile/ # Expo React Native (minimal)
├── services/
│ └── api/ # Fastify API + Prisma + BullMQ worker
├── packages/
│ └── shared/ # Shared Zod schemas and types
├── docker-compose.yml # Local Postgres + Redis + MinIO
└── render.yaml # Render deployment config
- Node.js 22+ (the test runner globs test files, which needs Node 21+)
- pnpm 9+
- Docker (for local infrastructure)
pnpm docker:upThis starts:
- PostgreSQL (port 5432)
- Redis (port 6379)
- MinIO S3 (port 9000, console 9001)
pnpm installcp .env.example .envRequired variables:
JWT_SECRET- Any secure random stringDATABASE_URL- Postgres connection stringREDIS_URL- Redis connection stringGOOGLE_CLIENT_ID/GOOGLE_CLIENT_SECRET- For OAuth
Game API keys (optional for testing):
SUPERCELL_API_KEY- For Clash Royale / Brawl StarsHENRIK_API_KEY- For ValorantSTEAM_WEB_API_KEY- For Steam library import
pnpm --filter @tactix/api db:generate
pnpm --filter @tactix/api db:migrateTerminal 1 - API:
pnpm --filter @tactix/api devTerminal 2 - Worker (optional):
pnpm --filter @tactix/api worker:devTerminal 3 - Web:
pnpm --filter @tactix/web dev- Web: http://localhost:3000
- API: http://localhost:3001
- API Health: http://localhost:3001/health
- Connect GitHub repo to Vercel
- Set root directory to
apps/web - Add environment variables:
NEXT_PUBLIC_API_BASE_URLNEXT_PUBLIC_SENTRY_DSNNEXT_PUBLIC_STRIPE_PAYMENT_URL(optional)
- Use
render.yamlfor infrastructure-as-code - Or manually create:
- Web Service for API (
services/api) — also runs the periodic poll in-process - (Optional) Background Worker (
worker:start) to offload polling/jobs at scale
- Web Service for API (
- Add all API environment variables
- Neon recommended for serverless Postgres
- Run migrations:
pnpm --filter @tactix/api db:migrate
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /me |
Current user info |
| GET | /me/library |
Game library with stats |
| GET | /dashboard |
Full dashboard data |
| GET | /dashboard/coach |
AI Coach insights (AI or rules-based) |
| POST | /ingest/refresh |
Trigger stat sync |
| POST | /link/marvel |
Link Marvel Rivals account |
| POST | /link/valorant |
Link Valorant account |
| POST | /link/supercell |
Link Clash Royale / Brawl Stars |
| GET | /quests |
Daily quests |
| POST | /billing/checkout |
Stripe checkout session |
| POST | /webhooks/stripe |
Stripe webhook handler |
See .env.example for the full list. Key variables:
# Core
JWT_SECRET=
DATABASE_URL=
REDIS_URL=
# OAuth
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
STEAM_WEB_API_KEY=
# Game APIs
SUPERCELL_API_KEY=
HENRIK_API_KEY=
# Stripe (optional)
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
STRIPE_PRICE_ID_MONTHLY=
# AI Coach (optional — degrades to a deterministic rules engine)
OPENAI_API_KEY=
OPENAI_MODEL=gpt-4o-mini
# Owner-only debug endpoints (comma-separated emails)
ADMIN_EMAILS=
# Monitoring
SENTRY_DSN=Unit tests cover the pure analytics logic (skill scoring math, quest progress
evaluation, session detection, and time/day/length bucketing). They use Node's
built-in test runner via tsx — no extra dependencies.
pnpm --filter @tactix/api testA GitHub Actions workflow (.github/workflows/ci.yml) runs on every push/PR to
main: it installs dependencies, generates the Prisma client, typechecks
shared, api, and web, then runs the API unit tests.
This project was built with assistance from Claude (Anthropic's AI assistant). Claude helped with:
- Authentication - Email/password accounts alongside Google & Discord OAuth, with brute-force-throttled login
- Brand & UI - A cohesive design system (the "Steel Star" mark, Chakra Petch type, custom palette) and a top-tab dashboard navigation
- Data ingestion - A resilient Valorant pipeline over the Henrik API: automatic region detection, request rate-limiting, and paginated history backfill
- Analytics & coaching - Cross-game skill scoring, session intelligence, daily quests, and an AI coach that degrades gracefully to a deterministic rules engine
- Shareable rewards - Server-side SVG → PNG badge and share-card generation
- Reliability - In-process background polling, daily-cached coach reports, and unit tests over the core analytics, auth, and rendering logic
The collaborative workflow involved iterating on features through conversation, with Claude providing code suggestions and fixes that were reviewed and integrated into the codebase.
Private - All rights reserved.