Skip to content

dymackenzie/poopyhead

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Poopyhead

Live: https://poopyhead-mcq8.onrender.com

A real-time multiplayer card game. You create a lobby, share a code, and play. Last player holding cards becomes the Poopyhead.


How It's Played

Each player gets 3 blind face-down cards and a hand. Before play begins, everyone selects 3 cards from their hand to place face-up on top of the blind cards — those 6 form your "table." You draw back up to a full hand.

On your turn, play a card equal to or higher than the top of the pile. Run out of hand cards? Play from your table. Run out of table cards? Flip your blinds and hope for the best.

If you can't beat the pile, you pick it up.

Special cards:

Card Effect
2 Reset — next player can play anything
3 Invisible — constraint underneath persists, acts like a skip-yourself
7 Seven-or-under — next player must play ≤7
8 Skip — stackable; four 8s skip four players
10 Bomb — clears the pile, same player goes again
4-of-a-kind Also a bomb, regardless of rank

Bombs take absolute precedence. Four 8s played? Bomb fires, skips are ignored.


Stack

Backend — Node.js / TypeScript, Express, Socket.io v4
Frontend — React 18, TypeScript, Zustand, Vite, Framer Motion
Infra — npm workspaces monorepo, deployed on Render

The backend is purely in-memory by design (no database required to run). There's a Supabase persistence layer gated behind a PERSISTENCE_ENABLED feature flag for things like leaderboards and async games, but the default experience is stateless and fast.


Tests

186 tests across 9 test files covering the full game lifecycle:

step3  — setup & deal
step4  — move validation
step7  — multiplayer core
step8  — reconnect & session handling
step10 — rematch loop
step11 — security (rate limiting, payload validation)
step12 — release validation

Running Locally

npm install

# Terminal 1 — backend (port 3001)
npm run dev

# Terminal 2 — frontend (port 5173)
cd frontend && npm run dev
npm test -- --run

About

so we can play poopyhead online

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors