Skip to content

About

CS2 Anti-Cheat Detection System

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

131 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CS StatSentry ๐Ÿ›ก๏ธ

CS2 Anti-Cheat Detection System - Automated teammate analysis for suspicious player identification.

CI/CD Pipeline License: MIT Docker Swarm

๐Ÿ“‘ Inhaltsverzeichnis

โœจ Features

  • ๐Ÿ” Steam OAuth Authentication - Secure login via Steam OpenID
  • ๐ŸŽฏ Automated Match Analysis - Continuous monitoring of CS2 teammates
  • ๐Ÿšจ Suspicious Player Detection - Advanced scoring algorithm with multiple detection criteria
  • ๐Ÿ“Š Real-time Dashboard - Live updates and comprehensive analytics
  • โšก Background Processing - Celery-powered asynchronous job system
  • ๐Ÿ”„ Auto-Sync - Periodic match synchronization every 30 minutes
  • ๐ŸŽฎ Demo Download Service - Integrated CS2 demo file download service via Steam GC

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   React SPA     โ”‚    โ”‚   FastAPI       โ”‚    โ”‚  PostgreSQL     โ”‚
โ”‚   (Frontend)    โ”‚โ—„โ”€โ”€โ–บโ”‚   (Backend)     โ”‚โ—„โ”€โ”€โ–บโ”‚  (Database)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                     โ”‚                        โ”‚
         โ”‚              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚              โ”‚     Celery      โ”‚โ—„โ”€โ”€โ–บโ”‚     Redis       โ”‚
         โ”‚              โ”‚ (Background)    โ”‚    โ”‚   (Cache)       โ”‚
         โ”‚              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                                             โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚  Demo Service   โ”‚
                        โ”‚   (Node.js)     โ”‚
                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Development Setup

# Clone repository
git clone https://github.com/meinjens/cstatsentry.git
cd cstatsentry

# Start with Docker Compose
docker-compose up -d

# Or use the setup script
./scripts/start.sh

Access Points:

Demo Service Setup

The demo service requires Steam credentials to download CS2 demo files:

# Add to your .env file
DEMO_SERVICE_STEAM_USERNAME=your_steam_username
DEMO_SERVICE_STEAM_PASSWORD=your_steam_password

# Initialize demo service database
./scripts/init-demo-db.sh

๐Ÿ”ง Tech Stack

Component Technology Purpose
Frontend React 18 + TypeScript + Tailwind CSS + pnpm Modern, responsive UI
Backend FastAPI + SQLAlchemy + PostgreSQL High-performance API
Demo Service Node.js + Express + Prisma + Bull CS2 demo downloads
Jobs Celery + Redis Background processing
Auth Steam OpenID + JWT Secure authentication
CI/CD GitHub Actions Automated testing & deployment

๐Ÿ“Š Detection System

StatSentry uses a sophisticated scoring algorithm to identify suspicious players:

Detection Criteria

  • ๐Ÿ†• New Account Analysis - Recent account creation with high performance
  • ๐Ÿ”’ Private Profile Flags - Private profiles with suspicious stats
  • โš ๏ธ VAC History - Previous VAC bans in other games
  • ๐ŸŽฎ Playtime Anomalies - CS2-only accounts with limited game libraries
  • ๐Ÿ“ˆ Performance Spikes - Sudden improvement in gameplay metrics
  • ๐ŸŽฏ Statistical Analysis - Unnatural consistency patterns

Scoring System

  • 0-30: Unlikely to cheat
  • 31-60: Suspicious patterns detected
  • 61-80: Highly suspicious behavior
  • 81-100: Almost certainly cheating

๐Ÿ“ Project Structure

cstatsentry/
โ”œโ”€โ”€ ๐Ÿ”™ backend/              # FastAPI backend
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”‚   โ”œโ”€โ”€ api/             # REST API endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ core/            # Configuration & security
โ”‚   โ”‚   โ”œโ”€โ”€ models/          # SQLAlchemy models
โ”‚   โ”‚   โ”œโ”€โ”€ schemas/         # Pydantic schemas
โ”‚   โ”‚   โ”œโ”€โ”€ services/        # Business logic
โ”‚   โ”‚   โ””โ”€โ”€ tasks/           # Celery background tasks
โ”‚   โ”œโ”€โ”€ alembic/             # Database migrations
โ”‚   โ””โ”€โ”€ tests/               # Backend tests
โ”œโ”€โ”€ ๐ŸŽจ frontend/             # React frontend
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ components/      # Reusable UI components
โ”‚       โ”œโ”€โ”€ pages/           # Application pages
โ”‚       โ”œโ”€โ”€ services/        # API integration
โ”‚       โ””โ”€โ”€ types/           # TypeScript definitions
โ”œโ”€โ”€ ๐ŸŽฎ demo-service/         # CS2 Demo Download Service
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ steam/           # Steam GC integration
โ”‚   โ”‚   โ”œโ”€โ”€ queue/           # Bull download queue
โ”‚   โ”‚   โ”œโ”€โ”€ services/        # Demo & webhook services
โ”‚   โ”‚   โ””โ”€โ”€ routes/          # Express API routes
โ”‚   โ””โ”€โ”€ prisma/              # Database schema
โ”œโ”€โ”€ ๐Ÿ“š docs/                 # Documentation
โ”œโ”€โ”€ ๐Ÿ› ๏ธ scripts/              # Utility scripts
โ”œโ”€โ”€ ๐Ÿณ .github/              # GitHub Actions workflows
โ””โ”€โ”€ ๐Ÿ“‹ docker-compose*.yml   # Docker configurations

โš™๏ธ Configuration

Required Environment Variables

# Steam API (get from https://steamcommunity.com/dev/apikey)
STEAM_API_KEY=your_steam_api_key_here

# Security
SECRET_KEY=your_super_secure_jwt_secret_key

# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/statsentry

# Optional: Leetify API Integration
LEETIFY_API_KEY=your_leetify_api_key_here

See SETUP.md for complete configuration guide.

๐Ÿงช Development

Running Tests

# Backend tests
cd backend && pytest

# Frontend tests
cd frontend && pnpm test

# Integration tests
docker-compose -f docker-compose.test.yml up --abort-on-container-exit

API Documentation

Interactive API documentation is available at:

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

โš ๏ธ Disclaimer

StatSentry is designed for educational and analytical purposes. It only accesses publicly available Steam profile data and does not interact with CS2 game files or memory. Always follow Steam's Terms of Service and use responsibly.

๐Ÿ“– Documentation

๐ŸŽฏ Related Projects

  • Replay Hunter - CS2 Demo Download Service (formerly part of this project)

๐Ÿ†˜ Support


Made with โค๏ธ for the CS2 community

About

CS2 Anti-Cheat Detection System

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages