A modern Web3 gaming platform built with React, Vite, and Firebase. Features include user authentication via Privy, leaderboard management, game integration, and community features.
- Web3 Authentication: Secure login with Privy (Google, Solana wallets)
- Game Integration: Connect with multiple skill-based games
- Leaderboards: Global and game-specific rankings
- Community Features: Activity tracking, tasks, and social engagement
- Responsive Design: Mobile-friendly interface with dark theme
- Real-time Updates: Live leaderboard updates via Firestore
- Frontend: React 19, Vite, Tailwind CSS
- Backend: Node.js, Express
- Database: Firebase Firestore
- Authentication: Privy
- 3D Graphics: Three.js, React Three Fiber
- Deployment: Vercel
- Node.js 20+
- Firebase project
- Privy account (required for authentication)
-
Clone the repository
git clone <repository-url> cd playrush-launcher
-
Install dependencies
npm install cd backend && npm install
-
Environment Configuration
Create
.envfile in root:VITE_FIREBASE_API_KEY=your-firebase-api-key VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com VITE_FIREBASE_PROJECT_ID=your-project-id VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id VITE_FIREBASE_APP_ID=your-app-id VITE_PRIVY_APP_ID=your-privy-app-id VITE_API_BASE_URL=/api
Create
backend/.env:PORT=3002 FIREBASE_SERVICE_ACCOUNT_KEY_PATH=./runner-18abe-firebase-adminsdk-fbsvc-eee2faafd9.json PRIVY_APP_ID=your-privy-app-id PRIVY_APP_SECRET=your-privy-app-secret API_KEY_SALT=your-unique-salt
-
Firebase Setup
- Create Firebase project
- Enable Firestore
- Generate service account key
- Place the JSON file in
backend/directory
-
Privy Setup (CRITICAL - Required for Authentication)
- Go to privy.io and create an account
- Create a new app in the Privy dashboard
- Configure authentication methods (Google, Solana wallets)
- Copy the App ID and App Secret from your Privy app settings
- Update the environment files with your real Privy credentials:
Frontend (.env):
VITE_PRIVY_APP_ID=your-actual-privy-app-id
Backend (backend/.env):
PRIVY_APP_ID=your-actual-privy-app-id PRIVY_APP_SECRET=your-actual-privy-app-secret
⚠️ IMPORTANT: The current Privy credentials are invalid. You must replace them with real credentials from your Privy dashboard for authentication to work.
# Start frontend
npm run dev
# Start backend (in another terminal)
npm run dev:backend
# Or start both
npm run dev:bothnpm run build
npm run preview├── src/
│ ├── components/ # React components
│ ├── scenes/ # 3D scenes
│ ├── firebase.js # Firebase configuration
│ ├── api.js # API utilities
│ └── PrivyAuth.jsx # Authentication provider
├── backend/
│ ├── src/
│ │ ├── config/ # Firebase/Privy config
│ │ ├── controllers/# API controllers
│ │ ├── middleware/ # Auth middleware
│ │ ├── models/ # Database models
│ │ └── routes/ # API routes
│ └── API_DOCUMENTATION.md
├── public/ # Static assets
└── backend/ # Backend server
See backend/API_DOCUMENTATION.md for detailed API information.
- Frontend: Deploy to Vercel/Netlify
- Backend: Deploy to any Node.js hosting (Heroku, Railway, etc.)
If you see errors like "Invalid Privy app ID" or "Invalid or expired token":
- Check Privy Credentials: Ensure your Privy app credentials are correct
- Update Environment Files: Replace placeholder values with real Privy credentials
- Restart Servers: Restart both frontend and backend after updating credentials
- Check Privy Dashboard: Verify your app is active in the Privy dashboard
- 403 Forbidden: Invalid or missing Privy credentials
- ECONNREFUSED: Backend server not running
- 404 Not Found: API routes not properly configured
- CORS errors: Check Vite proxy configuration
# Start frontend only
npm run dev
# Start backend only
npm run dev:backend
# Start both servers
npm run dev:both
# Check backend health
curl http://localhost:3002/health- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is licensed under the MIT License.