Back to Projects
🎯

StratForge AI

AI-powered Counter-Strike 2 tactical intelligence platform

Next.jsTypeScriptPrismaVercelVitestAI/LogicCS2
Next.js + TS
Stack
Prisma ORM
Database
Vercel
Deployment
99.4% TS
Language

Project Overview

StratForge AI is a full-stack Next.js application that gives CS2 players access to professional-level tactical intelligence. The platform analyzes game state — map position, economy, round phase — and surfaces optimal strategies using deterministic logic and adaptive recommendation models. Features include CS2 radar maps with precise callout zone overlays (mapped to 1024×1024 radar coordinates), team profile management, round outcome workflow tracking, and a Vitest-driven test suite.

The Problem

CS2 players lack accessible, structured access to professional-level tactical knowledge. Strategies exist in videos and coaching sessions but not in a queryable, real-time format.

The Solution

Built a Next.js platform that encodes professional CS2 tactical logic as deterministic game-state analysis, making professional-level strategy recommendations available in real time based on map, economy, and round phase inputs.

Key Highlights

  • Real-time CS2 strategy recommendations using deterministic game-state analysis
  • Economy prediction and adaptive learning for round-phase-aware suggestions
  • CS2 radar maps with precisely remapped callout zone overlays (1024×1024 coordinates)
  • Team profile management with secure database-backed storage via Prisma
  • Round outcome workflow tracking and history
  • Vitest test suite covering round outcome workflows
  • Deployed and live on Vercel at strat-forge-ai.vercel.app
  • TypeScript throughout (99.4% of codebase)

Data / Request Flow

⚛️
Next.js
App Router
🔌
API Routes
Middleware
🧠
Strategy
Engine
🗃️
Prisma ORM
Database
🚀
Vercel
CI/CD

System Architecture

01.Frontend: Next.js App Router with TypeScript, shadcn/ui components
02.Backend: Next.js API routes with middleware-based authentication
03.Database: Prisma ORM with schema migrations (prisma/)
04.CS2 maps: radar images with precise callout zone coordinate mappings
05.Testing: Vitest for round outcome workflow integration tests
06.Deployment: Vercel with automatic CI/CD on push

Code Spotlight

Real snippets from the codebase demonstrating key engineering decisions.

strategy.engine.ts
typescript
1interface RoundState {
2  teamMoney:  number;
3  enemyMoney: number;
4  roundPhase: 'pistol' | 'eco' | 'buy' | 'force';
5  mapPosition: CalloutZone;
6  aliveCount:  number;
7}
8
9// Deterministic strategy recommendation
10function recommendStrategy(state: RoundState): TacticalRecommendation {
11  const { teamMoney, enemyMoney, roundPhase, aliveCount } = state;
12
13  // Economy analysis
14  if (teamMoney < ECO_THRESHOLD)
15    return { buy: 'eco', rifles: 0, reason: 'Save for full buy' };
16
17  if (enemyMoney < RIFLE_THRESHOLD && roundPhase !== 'pistol')
18    return { buy: 'force', rifles: Math.min(aliveCount, Math.floor(teamMoney / RIFLE_COST)) };
19
20  // Map-position aware strategy
21  const calloutSuggestions = getCalloutStrategy(state.mapPosition, aliveCount);
22  return { buy: 'full', rifles: aliveCount, callouts: calloutSuggestions };
23}

Challenges & How I Solved Them

1

Precisely remapping callout zones to actual 1024×1024 radar image pixel coordinates

2

Designing deterministic strategy logic that accounts for economy, map position, and round phase

3

Building a data model flexible enough to represent all CS2 map callouts and team compositions

4

Balancing real-time performance with complex tactical analysis logic

Results

  • Live production deployment on Vercel at strat-forge-ai.vercel.app
  • CS2 radar maps with accurate callout zone overlays for major maps
  • Secure team profile system backed by Prisma database migrations
  • Vitest test suite covering core round outcome workflows

Future Improvements

Add AI/ML model trained on professional match data for adaptive recommendationsIntegrate CS2 Steam API for live match state ingestionAdd economy tracker with buy/eco/force recommendationsBuild community strategy submission and voting systemAdd user accounts with match history and strategy bookmarks