Real-time virtual trading game for pump.fun tokens. Players get $1000 worth of vSOL, trade live coins via a server-authoritative bonding curve, climb the leaderboard, and earn real SOL payouts.
Lovable (frontend) Home PC (backend)
www.virtual-pump.fun play.virtual-pump.fun
| |
| HTTPS API + WSS WebSocket |
+------- Cloudflare proxy -----------+
|
+-----------------+----------------+
| |
nginx :18080 cloudflared
/api -> rest-api :4001 (outbound tunnel)
/ws -> game-ws :4000
|
+-----------+-----------+
| |
rest-api.js game-ws.js
(HTTP API) (WebSocket)
\__________ __________/
\/
Redis
|
ingestion.js
(pulls from Helius
and PumpPortal)
- Frontend: React, Vite, hosted on Lovable
- Backend: Node.js (Express, ws, ioredis)
- Live data: Helius (Solana RPC + WebSocket), PumpPortal (pump.fun trades)
- Storage: Redis
- Edge: Cloudflare (DNS + proxy + tunnel)
.
├── backend/
│ ├── ingestion.js # PumpPortal + Helius listeners → Redis
│ ├── game-ws.js # WebSocket fanout to browser clients
│ ├── rest-api.js # HTTP API (auth, trades, account, etc.)
│ ├── cleanup.js # Periodic Redis cleanup
│ ├── reset-users.js # One-shot user reset utility
│ ├── package.json
│ └── .env.example # Template — copy to .env
├── frontend/
│ ├── src/
│ │ ├── App.jsx # Main React app
│ │ ├── api.js # REST API client
│ │ └── ws.js # WebSocket client wrapper
│ └── package.json
└── infra/
├── nginx.conf # Production nginx config
└── cloudflared.yml # Cloudflare Tunnel config (template)
# 1. Install Redis (Docker or native)
docker run -d -p 6379:6379 redis:alpine
# 2. Backend
cd backend
npm install
cp .env.example .env
# Edit .env with your Helius API key + JWT_SECRET
npm run dev # runs ingest, ws, api concurrently
# 3. Frontend (in another terminal)
cd frontend
npm install
npm run dev
# Open http://localhost:5173The production deployment runs on a Windows home PC behind Cloudflare Tunnel:
- Backend services run as Windows services via NSSM
- Redis runs in Docker Desktop with auto-start
- nginx routes
/api/*and/ws/*to local Node services - cloudflared establishes an outbound tunnel to Cloudflare → exposes
play.virtual-pump.fun - Frontend is hosted on Lovable at
www.virtual-pump.fun
See infra/ for nginx and tunnel configs.
# Backend
npm run dev # all three services in one terminal
npm run ingest # just ingestion.js
npm run ws # just game-ws.js
npm run api # just rest-api.js
npm run cleanup # dry-run of stale-data cleanup
npm run cleanup:execute # actually delete stale data
npm run reset-users # dry-run user wipe
npm run reset-users:execute # actually wipe users + leaderboard
npm run nuke-coins # delete all coin dataSee backend/.env.example for the full list. Required:
JWT_SECRET— random 64-char hexHELIUS_ENHANCED_WSS— Helius transactionSubscribe URL with API keyALLOWED_ORIGINS— comma-separated frontend originsREDIS_URL— defaults toredis://localhost:6379
Private / proprietary.