This is the backend server for the Maveli Runner endless runner game. It provides RESTful APIs for user authentication, secure high-score submissions, and leaderboard retrieval using Node.js, Express.js, and Supabase.
- API endpoints for authentication, scores, and leaderboard
- Supabase Auth (JWT) integration
- PostgreSQL + Row-Level Security for fair, secure storage
- Production-ready configuration with
.envsecrets
-
Clone the repository:
git clone https://github.com/tkmfoss/maveli-runner-server.git cd maveli-runner/Maveli_Game_Server -
Install dependencies:
npm install -
Environment variables: Add a
.envfile:SUPABASE_URL=your_supabase_url SUPABASE_KEY=your_supabase_anon_key -
Run locally:
npm run dev # or npm startBy default, the API runs on http://localhost:5000
backend/
├── node_modules/
├── routes/
│ ├── game.js
│ ├── auth.js
├── package.json
├── package-lock.json
├── .env
├── vercel.json
└── server.js
POST /api/auth/signupPOST /api/auth/loginPOST /api/scoreupdateGET /api/leaderboard
Deployable on Vercel, Render, Railway, or similar Node hosts. Set environment variables in your platform’s dashboard.