Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghost-land/stats-web
Tinfoil download statistics for NX Server
https://github.com/ghost-land/stats-web
javascript nx statistics typescript
Last synced: about 2 months ago
JSON representation
Tinfoil download statistics for NX Server
- Host: GitHub
- URL: https://github.com/ghost-land/stats-web
- Owner: ghost-land
- License: gpl-3.0
- Created: 2024-11-05T15:48:41.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-22T21:38:38.000Z (about 2 months ago)
- Last Synced: 2024-11-22T22:29:37.147Z (about 2 months ago)
- Topics: javascript, nx, statistics, typescript
- Language: TypeScript
- Homepage: https://stats.ghostland.at
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Game Stats Website 📊
A modern web application for tracking and analyzing game download statistics for NX Server.
https://github.com/user-attachments/assets/0cd9f3c3-e986-46ec-a2af-36aff6a3c1ab
## ✨ Features
- 📈 Real-time download statistics tracking
- 🎨 Beautiful, responsive UI with dark mode support
- 📊 Interactive charts and visualizations
- 🔍 Search functionality
- ⏱️ Period-based statistics (72h, 7d, 30d, all-time)
- 🎮 Detailed game information pages## 🚀 Prerequisites
- Node.js 18.x or higher
- npm or yarn package manager## 💻 Installation
1. Clone the repository:
```bash
git clone https://github.com/ghost-land/Stats-Web.git
cd Stats-Web
```2. Install dependencies:
```bash
npm install
```3. Create a `.env.local` file in the root directory:
```env
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:3000# Data Sources
NEXT_PUBLIC_WORKING_JSON_URL=https://raw.githubusercontent.com/ghost-land/NX-Missing/refs/heads/main/data/working.json
NEXT_PUBLIC_TITLES_DB_URL=https://raw.githubusercontent.com/ghost-land/NX-Missing/refs/heads/main/data/titles_db.txt# Indexer Configuration (1 hour in milliseconds)
REINDEX_INTERVAL=3600000
DATA_DIR=/path/to/your/data/directory
```4. Place your data files in the `/data` directory.
## 🛠️ Development
Run the development server:
```bash
npm run dev
```Open [http://localhost:3000](http://localhost:3000) in your browser.
## 🌐 Deployment
1. Install dependencies and build:
```bash
# 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
```2. Configure Nginx and start services:
```bash
# Start application with PM2
pm2 start npm --name "game-stats" -- start
pm2 startup && pm2 save
```## 🔧 Environment Variables
- `NEXT_PUBLIC_API_URL`: Base URL for the API
- `NEXT_PUBLIC_WORKING_JSON_URL`: URL for the working.json file
- `NEXT_PUBLIC_TITLES_DB_URL`: URL for the titles database
- `REINDEX_INTERVAL`: Interval for reindexing data (default: 3600000 - 1 hour)
- `DATA_DIR`: Directory path for game data files## 📝 License
This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.