What's The Point
A web app for tracking predictions and points in TV/movie challenges with friends.
Features
- 🔐 Register/login with email and password (JWT authentication)
- 🎬 Create challenges for shows/movies with TMDB integration
- 📝 Make and validate predictions with friends
- 🏆 Leaderboards (per-challenge and global)
- 👥 Friend system for easy invitations
- 📱 Mobile-first, modern dark UI
Tech Stack
- Frontend: React 18, React Router, Vite
- Backend: Node.js, Express
- Database: MariaDB
- Auth: JWT with bcrypt
- APIs: The Movie Database (TMDB) with caching
- Deployment: Docker, self-hosted via Gitea + Portainer
Getting Started
Prerequisites
- Docker & Docker Compose
- TMDB API Key (free from https://www.themoviedb.org/settings/api)
Local Development
-
Copy environment file:
cp backend/.env.example backend/.env -
Add your TMDB API key to
backend/.env:TMDB_API_KEY=your_actual_key_here -
Build and start all services:
docker compose up --build -
Access the app:
- Frontend/App: http://localhost:4000
- Database: localhost:3306
The database will auto-initialize with the required schema on first run.
Production Deployment
-
Update
prod-compose.ymlwith your environment variables:- Set a strong
JWT_SECRET - Set a strong
DB_PASSWORD - Add your
TMDB_API_KEY
- Set a strong
-
The Gitea workflow (
.gitea/workflows/rebuild-prod.yaml) will:- Build the Docker image
- Push to your registry
- Deploy via Portainer API
-
Environment variables for Gitea secrets:
PROD_ENV: Base64-encoded.envfile with production valuesPORTAINER_TOKEN: Your Portainer API token
How It Works
User Flow
- Register/Login - Create an account or sign in
- Create Challenge - Search for a TV show or movie via TMDB
- Invite Friends - Add participants by username/email
- Make Predictions - Submit your predictions about the show
- Validate Predictions - Approve or invalidate others' predictions (not your own)
- Track Points - View leaderboards and profiles
Key Features
- TMDB Integration: Search shows/movies with autocomplete, cached for 7 days
- Friend System: Dedicated friends page + auto-friends from challenge participation
- Leaderboards: Per-challenge and global rankings
- Profile Stats: Total points, pending predictions, challenges created/joined
- Responsive Design: Mobile-first with dark theme
API Endpoints
Auth
POST /api/auth/register- Register new userPOST /api/auth/login- Login userGET /api/auth/me- Get current user
Challenges
GET /api/challenges- List user's challengesGET /api/challenges/:id- Get challenge detailsPOST /api/challenges- Create new challengePOST /api/challenges/:id/invite- Invite usersPOST /api/challenges/:id/respond- Accept/reject invitation
Predictions
GET /api/predictions/challenge/:id- List predictionsPOST /api/predictions- Create predictionPOST /api/predictions/:id/validate- Validate/invalidate
Friends
GET /api/friends- List friendsGET /api/friends/search- Search usersPOST /api/friends/request- Send friend requestPOST /api/friends/respond- Accept/reject requestGET /api/friends/requests- Pending requests
Leaderboard
GET /api/leaderboard/challenge/:id- Challenge leaderboardGET /api/leaderboard/global- Global leaderboardGET /api/leaderboard/profile/:id?- User profile stats
TMDB
GET /api/tmdb/search?q=query- Search shows/movies
Database Schema
- users - User accounts
- challenges - TV/movie challenges
- challenge_participants - Challenge memberships
- predictions - User predictions
- friendships - Friend relationships
- tmdb_cache - Cached TMDB API responses
License
MIT
Description
Silly game to keep track of scores when predicting events of movies, tv shows or anything else you can think of.
Languages
JavaScript
95.2%
CSS
4.2%
Dockerfile
0.4%
HTML
0.2%