Back to portfolio
WebappStudy / personal

Vedete & Inițiale (Celebrities & Initials)

A multiplayer web app for TOMAPAN (categories/initial-letter) rounds in private rooms, with an access code, configurable categories, a shared letter, a timer, scoring for unique or duplicate answers, and real-time synchronization between players.

Vedete & Inițiale (Celebrities & Initials)

Core stack

PHP 8.2+
Laravel 12
Eloquent ORM
Laravel Breeze
Laravel SanctumLaravel BroadcastingPusherLaravel EchoInertia.js 2Vue 3TypeScriptVite 6Tailwind CSS 3AxiosZiggySQLitePHPUnit 11

The challenge

The central challenge was coordinating the same match across multiple browsers: access via a private code, room membership, the waiting → active → finished transition, rounds synchronized on the same letter, collecting all participants' answers, and consistent score calculation, while presence and state changes had to be propagated without a full page refresh.

The solution

The solution uses a Laravel 12 monolith with Eloquent for the authoritative game state and Inertia/Vue for the reactive interface. Game, GamePlayer, GameRound, and GameAnswer separate the room, participants, rounds, and answers into relational tables. GameController orchestrates validation, transitions, and scoring, and Laravel Broadcasting events published on Echo/Pusher channels synchronize clients. Presence channels verify membership before subscribing, while the chat uses a separate channel and ephemeral messages.

Notable complexity

Vedete & Inițiale is the portfolio project associated with a multiplayer experiment built on top of the TOMAPAN game. Authenticated users can create a room, choose the number of rounds and the categories used, then share a unique six-character code with other participants. Players join the same room, mark their availability, and watch the group's presence in real time.

When the match starts, the backend becomes the source of truth for the game state: it moves the room from waiting to active, creates the first round, randomly picks a letter from the configured set, and persists the start time. Each round uses the same categories selected when the room was created — countries, cities, mountains, bodies of water, plants, animals, and names — and the interface starts a configurable timer. When time runs out or on manual submission, the answers reach the backend and are persisted per round, user, and category.

The current validation is deliberately simple: the server checks whether the answer starts with the round's letter, without an external dictionary or semantic verification that the word actually exists. Once all remaining players have submitted, valid answers are grouped by category and normalized to lowercase for scoring: a unique answer earns 10 points, and the same answer given by multiple participants earns 5. The cumulative score is kept on the relationship between the game and the player, then the backend closes the round and either creates the next round or marks the game finished.

Synchronization uses Laravel Broadcasting, Echo, and Pusher. The game room is a presence channel authorized server-side only for users who belong to the game, and events transmit the match starting, state changes, and the ready status. The project separately includes a real-time chat for authenticated users, with presence, broadcast messages, and whisper events for the typing indicator; messages are not persisted to the database.

The frontend is built with Vue 3, TypeScript, Inertia, and Tailwind and runs within the same Laravel monolith. Authentication, the profile, and standard account flows come from the Laravel Breeze scaffolding, while the lobby, the game room, the domain models, scoring, and the real-time integration represent the project-specific logic. The available repository is a backup imported as a single commit, so the Git history does not allow chronological reconstruction of the contribution or the implementation stages.

Key results

  • Multiplayer rooms created by authenticated users, with a unique six-character access code
  • Match configuration with 1–10 rounds, selectable categories, and a 30, 60, 90, or 120-second timer
  • Seven available TOMAPAN categories: countries, cities, mountains, bodies of water, plants, animals, and names
  • Separate persistence of games, participants, rounds, and answers via Eloquent models and foreign keys
  • Server-side generation of each round's letter from an explicit letter set
  • Validating the answer's initial before including it in scoring
  • Scoring with 10 points for a unique valid answer and 5 points for a duplicate valid answer
  • Automatic advancement to the next round once all remaining players have submitted
  • Per-game presence channel, authorized based on the user's membership in the room
  • Real-time events for the game starting, state changes, and marking players as ready
  • Separate real-time chat with a list of active users and a typing indicator via whisper events
  • Authentication, registration, email verification, password reset, and profile via the Laravel Breeze infrastructure
  • Frontend build with Vue 3, TypeScript, Vite, and a configured SSR entry

Related projects

Want something similar?

Start with the estimate wizard — answer a few questions and get a realistic price range and timeline.