Game Pointer is a containerized scoring platform with a React frontend, a Node.js/Express backend, and an Nginx reverse proxy. The backend stores data in MongoDB and exposes a JSON API under /api.
- Role-based login (ADMIN, ORGANIZER, VOLUNTEER)
- User, team, and task management
- Scoring workflows with leaderboards
- Audit logs and user history tracking
- Nginx terminates TLS and routes
/apirequests to the backend - The backend listens on port 3001 and connects to MongoDB
- The frontend is served through Nginx and calls the API via
/api
- Create a
.envfile in the repo root:
MONGO_URI_TEST=mongodb://your-mongo-host:27017/game_pointer
JWT_SECRET=replace_with_a_long_random_secret
INITIAL_ADMIN_PASSWORD=change_me_admin
INITIAL_USER_PASSWORD=change_me_user
PORT_BACKEND=3001
PORT_FRONTEND=3000- Build and start:
docker compose up --build- Open the app:
- HTTPS entrypoint:
https://localhost - API via proxy:
https://localhost/api/health
Note: The default Nginx config enforces HTTPS and references real domain certificates. For local development, update nginx/default.conf to match your environment or run the frontend and backend directly (see below).
MONGO_URI_TEST: MongoDB connection string used by the backendJWT_SECRET: Secret used to sign JWT tokensINITIAL_ADMIN_PASSWORD: Password for the default admin accountINITIAL_USER_PASSWORD: Password for the default organizer accountPORT_BACKEND: Backend port (default: 3001)PORT_FRONTEND: Frontend port used for CORS (default: 3000)
On startup, the backend ensures these demo accounts exist:
- Admin: username
Gothar az admin, password fromINITIAL_ADMIN_PASSWORD - Organizer: username
Gothar a user, password fromINITIAL_USER_PASSWORD
The frontend is hardcoded to call /api on the same origin. If you run the frontend on localhost:3000 without Nginx, you must add a dev proxy or update the API base URL in the frontend code.
- Start MongoDB and set
MONGO_URI_TESTin your environment. - Backend:
cd backend
npm install
npm start- Frontend:
cd frontend
npm install
npm startGET /api/health- health checkPOST /api/login- login and JWT issuanceGET /api/users- user management (admin only)GET /api/tasks- task management (admin only)GET /api/teams- team management (admin only)GET /api/scores- score listing (admin only)GET /api/leaderboard/teams- team leaderboardGET /api/audit-logs- audit trailGET /api/user-history/all- user history
.
|- docker-compose.yml
|- README.md
|- backend/
| |- Dockerfile
| |- package.json
| |- server.js
|- frontend/
| |- Dockerfile
| |- package.json
| |- src/
|- nginx/
| |- default.conf