A modern web application for tracking and analyzing game download statistics.
stats-web_v2.mp4
- 📈 Real-time download statistics tracking
- 🎨 Beautiful, responsive UI with dark mode support
- 📊 Interactive charts and visualizations
- 🔍 Advanced search functionality with filters
- ⏱️ Period-based statistics (72h, 7d, 30d, all-time)
- 🎮 Detailed game information pages
- 📱 Mobile-friendly design
- 🌐 Public REST API
- 💾 Direct database access for offline analysis
- 📊 Pre-calculated analytics
- 🏆 Real-time rankings
- 📈 Growth rate tracking
- 📦 Content type filtering (Base Games, Updates, DLC)
- 📅 Custom date range filtering
- 📊 Advanced analytics dashboard
- Node.js 18.x or higher
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/ghost-land/Stats-Web.git
cd Stats-Web
- Install dependencies:
npm install
- Place your data files in the
/data
directory.
Run the development server:
npm run dev
Open http://localhost:3000 in your browser.
The project provides a comprehensive REST API for accessing game statistics. All endpoints are publicly available without authentication.
https://your-domain.com
For offline analysis or personal projects, you can download the complete SQLite database:
https://your-domain.com/games.db
- 100 requests per minute per IP
- Analytics data cached for 5 minutes
- Game data cached for 1 hour
- Rankings updated hourly
GET /api/analytics
- Get detailed analytics with various filtersGET /api/stats
- Get global statistics
GET /api/games
- Get all games with statisticsGET /api/games/[tid]
- Get details for a specific gameGET /api/search
- Search games by name or TID
GET /api/rankings/[tid]
- Get rankings for a specific gameGET /api/top/[period]
- Get top games by period
GET /api/uptime
- Get server uptime information
For detailed API documentation, visit /api/docs
in your browser.
All environment variables are configured in ecosystem.config.js
:
NEXT_PUBLIC_API_URL
: Base URL for the APINEXT_PUBLIC_WORKING_JSON_URL
: URL for the working.json fileNEXT_PUBLIC_TITLES_DB_URL
: URL for the titles databaseREINDEX_INTERVAL
: Interval for reindexing data (default: 3600000 - 1 hour)DATA_DIR
: Directory path for game data files
- Install dependencies and build:
# Install Node.js and PM2
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs nginx
sudo npm install -g pm2
# Set up application
cd /var/www/game-stats
npm install
npm run build
# Configure data directory
sudo mkdir -p data
sudo chown -R $USER:$USER data
- Configure PM2 with ecosystem.config.js:
# Start application with PM2
pm2 start ecosystem.config.js
pm2 startup && pm2 save
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For support or questions, please open an issue in the GitHub repository.