Get up and running with GameHub in 5 minutes!
git clone https://github.com/luishidalgoa/GameHub.git
cd GameHub
npm installcp .env.example .env.localEdit .env.local:
DATABASE_URL="file:./gamehub.db"
ADMIN_PASSWORD="MySecurePass123!@#"
NEXT_PUBLIC_APP_URL="http://localhost:3000"The repository does not include a database — you generate it from the Prisma
migrations. This creates prisma/gamehub.db and applies the schema:
npm run db:migrate # creates prisma/gamehub.db + applies all migrations
npm run seed # (optional) add the default platformsIn Docker/production you don't run this by hand: the container applies migrations automatically on start (
prisma migrate deploy), creating the DB in the/datavolume on first boot.
npm run devYou should see:
▲ Next.js 14.2.35
- Local: http://localhost:3000
- Visit
http://localhost:3000 - Click admin icon (top right) or go to
/admin/login - Enter password from
.env.local - Welcome to your game library!
- Place games in folder (e.g.,
/games/psvita/) - Admin → Scan Panel → Add Directory
- Enter path:
/games/psvita/ - Click "Start Scan"
- Games appear automatically!
- Admin → Games → New Game
- Fill in:
- Title: "Game Name"
- Platform: "PSP"
- File path: "/games/mygame.zip"
- Click "Create"
- Done!
# Show all commands + the release process (3 bundles)
npm run help
# Start development
npm run dev
# Build for production
npm run build
# Start production
npm start
# Scan for games
npm run scan
# Open database viewer
npm run db:studioChoose one:
git push
# Go to vercel.com → Import from GitHub
# Add environment variables
# Done!docker build -t gamehub .
docker run -p 3000:3000 \
-e ADMIN_PASSWORD="yourpass" \
-v $(pwd)/gamehub.db:/app/gamehub.db \
gamehub# SSH to server
ssh user@server
# Clone & setup
git clone https://github.com/yourusername/GameHub.git
cd GameHub
npm install
npm run db:migrate
# Configure .env.local
nano .env.local
# Start with PM2
npm install -g pm2
pm2 start "npm start" --name gamehub
pm2 startup
pm2 saveOrganize games for easy scanning:
Games/
├── psvita/
│ ├── Game1.zip
│ └── Game2.zip
├── psp/
│ ├── PSPGame1.iso
│ └── PSPGame2.zip
├── pc/
│ ├── PCGame.zip
│ └── Expansion.zip
Then scan each folder separately in admin panel.
- Go to rawg.io/api
- Get free API key
- Add to
.env.local:RAWG_API_KEY="your_key" - In admin: "Fetch Metadata" on games
Edit .env.local:
ADMIN_PASSWORD="NewPassword123!@#"Restart server. New password works!
# One-time backup
cp gamehub.db gamehub.db.backup
# Restore if needed
cp gamehub.db.corrupted gamehub.db.old
cp gamehub.db.backup gamehub.dbReplace localhost with your IP:
- Find IP:
ipconfig(Windows) orifconfig(Linux/Mac) - Example:
http://192.168.1.100:3000
npm run dev -- -p 3001rm gamehub.db-*
npm run dev- Check directory path is correct
- Verify files exist:
ls -la /path/to/games/ - Check file permissions
- Try:
npm run scan
- Check password in
.env.local - No extra spaces around password
- Restart server after changing
Full technical wiki in docs/:
- 🏗️ Architecture
- 🚀 Deployment — Docker, Apache/SSL, DB migration
- ⚙️ Environment & settings
- 🎮 Scanner · Covers & metadata · Downloads
- 🛒 Switch shop API (Tinfoil/DBI)
- 📊 Metrics, Prometheus & Grafana
- 📚 Database schema · API reference
- Docs: Technical wiki
- Issues: GitHub Issues
Happy gaming! 🎮