A real-time multiplayer card game where players identify misinformation tactics used by fictional social media villains. Built with React, TypeScript, and WebSockets.
This is the client application. It requires the companion server to function:
| Repo | Description |
|---|---|
| super-debunkers (this repo) | React front-end — UI, game interactions, drag-and-drop |
| dfg-server | PartyKit WebSocket server — rooms, scoring, game state |
Both must be running for local development.
- Players join a room from the lobby
- Each round, a fake news card is displayed with a hidden misinformation tactic
- Players drag tactic cards from their hand onto the play area to identify the tactic used
- Once all players are ready, the server scores the round
- A modal sequence reveals results, individual feedback, and the scoreboard
- After several rounds, the player with the highest score wins
- React 19 with TypeScript
- Vite — build tooling and dev server
- PartySocket — WebSocket client for real-time communication
- @dnd-kit — drag-and-drop for card placement
- React Router — client-side routing
- Swiper — carousel components
- Tailwind CSS — utility-first styling
- pnpm — package manager
src/
├── components/
│ ├── atoms/ # Small reusable components (buttons, inputs, backgrounds)
│ ├── molecules/ # Composed components (play area, news cards, scoreboard)
│ ├── organisms/ # Complex sections (game table, modals, player hand)
│ └── templates/ # Full page layouts (home, lobby, game, directions)
├── context/ # React context providers (GameContext, GlobalContext)
├── data/ # Static JSON data (cards, villains, directions)
├── hooks/ # Custom hooks (useGameContext, useWebSocket, useModalFade)
├── services/ # WebSocket service, environment config, profanity filter
├── types/ # TypeScript type definitions
└── utils/ # Message utilities for WebSocket communication
- Node.js 25+
- pnpm 9+
- The dfg-server running locally on port 1999
# Clone the repo
git clone https://github.com/mlenda000/super-debunkers.git
cd super-debunkers
# Install dependencies
pnpm install
# Start the dev server
pnpm devThe client runs on http://localhost:5173 by default and connects to the PartyKit server at 127.0.0.1:1999 in development mode.
| Variable | Default (dev) | Description |
|---|---|---|
VITE_PARTYKIT_HOST |
127.0.0.1:1999 |
PartyKit server host. In production, defaults to dfg-server.mlenda000.partykit.dev |
pnpm buildOutput is written to dist/. The project is configured for deployment on Vercel with SPA rewrites.
| Command | Description |
|---|---|
pnpm dev |
Start Vite dev server |
pnpm build |
Type-check and build for production |
pnpm preview |
Preview production build locally |
pnpm lint |
Run ESLint |
The client communicates with the server exclusively via WebSockets (PartySocket). Key message types:
playerEnters/playerLeaves— join and leave roomsinfluencer— broadcast the current news card to all playersplayerReady/playerNotReady— signal readiness with chosen tacticsendOfRound— trigger server-side scoringscoreUpdate— receive calculated scores from the serverroomUpdate— sync room state (players, deck, round)reconnectState— restore full game state after disconnect
See FLOW_DOCUMENTATION.md for the complete game flow.