La Mubi’s type system is defined centrally inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dlampatricio/lamubi/llms.txt
Use this file to discover all available pages before exploring further.
src/types/game.ts and shared across the game store, API route, and UI components. Understanding these types is the fastest way to trace how a game session flows from lobby configuration through active play to the final result screen.
Full Source
GameMode
| Value | Description |
|---|---|
'charades' | Teams take turns acting out movies. Scored by correct guesses within a time limit. |
'impostor' | All players receive a movie, but one or more impostors get a different film. Players give clues and vote to identify the impostor. |
ImpostorState
revealing
Role cards are shown to players one at a time. Each player sees whether they are an innocent or an impostor.
revealIndex advances on each call to nextReveal() until all players have been shown their card.word_wait
The word round. Each player in sequence gives a single clue word relating to their assigned movie. Innocents and impostors receive different films, so clue words may subtly diverge.
debate
A timed open discussion phase. Players argue over who the impostor might be. The
debate_timer counts down; the host can end debate early with stopDebate().voting
The host selects a player to eliminate. Calls
eliminatePlayer(index) or skipElimination() to resolve the vote.Team
Mad Max and La La Land).
Display name for the team, shown on score screens and the acting handoff screen. Editable via
updateTeamName().Cumulative count of correct guesses for this team in the current session. Incremented by
correctGuess() and reset by resetScores() or resetGame().Ordered roster of players on this team. The player at
current_player_index is the active actor for the current round.Points to the player in
players whose turn it is to act. Advanced by nextTeam() after each round, cycling back to 0 when it reaches the end of the roster.Player
Team.players. In Impostor mode, they live in the top-level players array on the store.
The player’s display name, shown on role-reveal cards and the voting screen.
Movie
GET /api/movies and stored in the movies queue and current_movie on the game store.
TMDB movie ID. Uniquely identifies the movie and can be used to construct a TMDB or Letterboxd URL.
The movie’s primary title as returned by TMDB.
The TMDB poster path segment (e.g.
"/9cqNxx0GxF0bAY4bpuPKOsO88cI.jpg"). Prepend https://image.tmdb.org/t/p/w500 to form a complete image URL.Four-digit release year (e.g.
"1994"), extracted from TMDB’s release_date field.TMDB audience rating formatted to one decimal place (e.g.
"8.7").Plot synopsis from TMDB. Optional — present on all movies returned by
/api/movies, but typed as optional for flexibility when constructing Movie objects manually.Array of genre name strings (e.g.
["Drama", "Crime"]). Populated by the /api/movies detail-enrichment step.Director’s name sourced from the movie’s TMDB credits crew.
undefined when no director credit is present in the response.GameStore
GameStore is the complete interface of useGameStore — it unifies every state field and every action method into a single typed object. You will not typically reference GameStore directly in component code; instead, destructure what you need from the useGameStore() hook.
For the full inventory of state fields and action signatures, see the Game Store reference.