Files
2026-03-09 14:58:48 -07:00

2.5 KiB

Backend TODO

Phase 1 — MVP (Prototype)

  • Set up TMDB proxy service (protect API key from client exposure)
  • Movie search endpoint (GET /api/v1/movies/search?q=)
  • Person search endpoint (GET /api/v1/persons/search?q=)
  • Movie credits endpoint (GET /api/v1/movies/:id/credits)
  • Person movie credits endpoint (GET /api/v1/persons/:id/movie-credits)
  • Movie details endpoint (GET /api/v1/movies/:id)
  • Person details endpoint (GET /api/v1/persons/:id)
  • Response caching with Redis (TMDB data doesn't change frequently)
  • Rate limiting with ThrottlerModule
  • Health check endpoint
  • Basic error handling and logging

Phase 2 — Scoring & Polish

  • Game session creation endpoint (POST /api/v1/games)
  • Game session retrieval endpoint (GET /api/v1/games/:id)
  • Score calculation service (base + chain + time + obscurity - penalties)
  • Game completion endpoint (POST /api/v1/games/:id/complete)
  • Prisma migrations for GameSession model
  • Input validation with class-validator across all endpoints

Phase 3 — Daily Challenge & Social

  • Daily challenge generation service (BFS shortest path via TMDB data)
  • Daily challenge queue job (BullMQ + RabbitMQ for background processing)
  • Daily challenge endpoint (GET /api/v1/daily-challenges/today)
  • Daily challenge history endpoint (GET /api/v1/daily-challenges)
  • Leaderboard endpoints (GET /api/v1/leaderboards/daily, weekly, all-time)
  • Leaderboard entry submission (POST /api/v1/leaderboards)
  • User authentication (JWT + passport-local for login, passport-jwt for protected routes)
  • User registration endpoint (POST /api/v1/auth/register)
  • User login endpoint (POST /api/v1/auth/login)
  • User profile endpoint (GET /api/v1/users/me)
  • Streak tracking service
  • Prisma migrations for DailyChallenge, LeaderboardEntry models

Phase 4 — Multiplayer & Expansion

  • Versus mode matchmaking (WebSocket gateway or RabbitMQ-based)
  • Real-time game sync for versus mode
  • Difficulty tier configuration and movie pool management
  • Achievement/badge system (define achievements, track progress, award)
  • User profile CRUD (update display name, avatar)
  • Global leaderboard aggregation (daily, weekly, all-time)
  • Admin endpoints for challenge curation and moderation
  • Prisma migrations for Achievement, UserAchievement models
  • PII field encryption audit (ensure @encrypted annotations on sensitive data)
  • API documentation with Swagger (complete all endpoint descriptions)