Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ CS2Hub โ€“ Full Stack Counter-Strike 2 Esports Analytics Platform

HTML CSS JavaScript Node.js Express.js Vercel Render


๐ŸŒ Live Demo

๐Ÿ”— Frontend

https://cs-2-hub-five.vercel.app

๐Ÿ”— Backend API

https://cs2hub-backend.onrender.com

๐Ÿ“‚ GitHub Repository

https://github.com/Veekshith18/CS2HUB


๐Ÿ“‘ Table of Contents


๐Ÿ“Œ Overview

CS2Hub is a full-stack Counter-Strike 2 esports analytics platform inspired by professional esports websites like HLTV and VLR.gg.

It provides users with:

  • Upcoming match schedules
  • Match results
  • Team rankings
  • Team profiles
  • Player profiles
  • Tournament information
  • Global search
  • Responsive UI

The project uses an Express.js backend to securely communicate with the PandaScore API while keeping API keys hidden from the client.

To improve backend efficiency, server-side caching using node-cache has been implemented, reducing redundant API requests and improving response time.


โœจ Features

Feature Status
Upcoming Matches โœ…
Match Results โœ…
Team Rankings โœ…
Team Profiles โœ…
Player Profiles โœ…
Tournament Pages โœ…
Match Details โœ…
Global Search โœ…
Responsive Design โœ…
Express.js Backend Proxy โœ…
Secure Environment Variables โœ…
Server-side Response Caching โœ…

๐Ÿ–ผ๏ธ Screenshots

๐Ÿ  Home โ€“ Live Matches

Home


๐ŸŽฎ Match Details

Match Details


๐ŸŒ Team Rankings

Rankings


๐Ÿ‘ฅ Team Profile

Team Profile


๐Ÿ‘ค Player Profile

Player Profile


๐ŸŽฏ Players Page

Players


๐Ÿ† Tournament Page

Tournament


๐Ÿ” Global Search

Global Search


๐Ÿ“ฑ Mobile Responsive Design

Mobile


๐Ÿ› ๏ธ Tech Stack

Frontend

  • HTML5
  • CSS3
  • JavaScript (ES6)
  • Fetch API

Backend

  • Node.js
  • Express.js
  • node-cache

API

  • PandaScore API

Deployment

  • Vercel
  • Render

Version Control

  • Git
  • GitHub

๐Ÿ—๏ธ Project Architecture

CS2Hub
โ”‚
โ”œโ”€โ”€ backend
โ”‚   โ”œโ”€โ”€ server.js
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ prisma/
โ”‚   โ”œโ”€โ”€ .env
โ”‚   โ””โ”€โ”€ .gitignore
โ”‚
โ”œโ”€โ”€ css
โ”‚   โ””โ”€โ”€ style.css
โ”‚
โ”œโ”€โ”€ js
โ”‚   โ””โ”€โ”€ script.js
โ”‚
โ”œโ”€โ”€ screenshots
โ”‚
โ”œโ”€โ”€ index.html
โ”‚
โ””โ”€โ”€ README.md

๐Ÿ”„ Request Flow

Browser
    โ”‚
    โ–ผ
Frontend (HTML/CSS/JavaScript)
    โ”‚
Fetch API
    โ–ผ
Express.js Backend
    โ”‚
Check Cache
    โ”‚
โ”œโ”€โ”€ Cache Hit
โ”‚      โ”‚
โ”‚      โ–ผ
โ”‚ Return Cached JSON
โ”‚
โ””โ”€โ”€ Cache Miss
       โ”‚
       โ–ผ
 PandaScore API
       โ”‚
       โ–ผ
Store Response in Cache
       โ”‚
       โ–ผ
Return JSON to Frontend
       โ”‚
       โ–ผ
Update UI

๐Ÿ“ก API Endpoints

Endpoint Description
GET /api/upcoming Upcoming matches
GET /api/results Match results
GET /api/teams Teams list
GET /api/players Players list
GET /api/team/:id Team details
GET /api/match/:id Match details

๐Ÿ’ก Engineering Highlights

  • Built a secure Express.js backend proxy to protect PandaScore API credentials.
  • Implemented server-side response caching using node-cache to reduce redundant API requests and improve backend performance.
  • Developed reusable UI components for matches, players, teams, and tournaments.
  • Implemented asynchronous API communication using Fetch API.
  • Designed a fully responsive user interface for desktop and mobile devices.
  • Organized frontend and backend into modular components for maintainability.
  • Deployed the frontend on Vercel and backend on Render.

๐Ÿšง Challenges

  • Protecting API keys from exposure in the frontend.
  • Handling PandaScore API rate limits.
  • Implementing server-side caching for improved performance.
  • Managing asynchronous API requests and error handling.
  • Building reusable UI components across multiple pages.
  • Ensuring responsive layouts across different screen sizes.

๐Ÿš€ Running Locally

1๏ธโƒฃ Clone Repository

git clone https://github.com/Veekshith18/CS2HUB.git

2๏ธโƒฃ Install Backend Dependencies

cd backend
npm install

3๏ธโƒฃ Create .env

PANDASCORE_TOKEN=YOUR_PANDASCORE_API_KEY

4๏ธโƒฃ Start Backend

npm start

5๏ธโƒฃ Start Frontend

Open index.html using Live Server or any browser.


๐Ÿ”ฎ Future Improvements

  • User authentication
  • Favorite teams and players
  • Match notifications
  • Historical player analytics
  • Redis-based distributed caching
  • Dark/Light mode
  • Advanced tournament analytics
  • Additional esports titles

๐Ÿ‘จโ€๐Ÿ’ป Developer

Swarnapudi Veekshith


โญ Support

If you found this project useful, consider giving it a โญ on GitHub!

About

VLR.gg-inspired CS2 esports tracking platform built with HTML, CSS and JavaScript.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages