Skip to content

Repository files navigation

Β 

planning-poker

Β 

TypeScript Next.js React MIT

Estimate user stories together in real time β€” free, no account required.

Features β€’ Quick Start β€’ How It Works β€’ Development

Β 

Planning Poker β€” eight players around the table, all voted, ready to reveal


🌟 Features

  • πŸ”— Real-time rooms β€” a tiny PartyKit room server on Cloudflare's edge keeps everyone in sync over WebSockets; rooms survive host refreshes and reconnects
  • 🎟 Friendly room codes β€” six-character codes (e.g. PKD8QC) that are easy to read out loud or paste in chat
  • πŸƒ Multiple deck presets β€” Fibonacci (0–21 + ? + β˜•), Numeric, T-shirt (XS–XXL), or a fully custom deck; your favourite is remembered for next time
  • 🎰 Casino-style reveal β€” votes stay face-down on the felt until the host flips them all at once
  • 🎀 Speaker ritual β€” after the reveal, pass the mic: highest vote explains first, lowest second, then the rest; space drives the whole flow
  • ⌨️ Hotkeys β€” 1–9 to vote, space to reveal / next speaker / new round
  • 🀡 A table with a soul β€” a pixel croupier announces rounds and commentates results, a waiter delivers coffee when someone plays β˜•, and a cat wanders by (it purrs if you're lucky)
  • πŸ”Š Subtle sound design β€” synthesized card swishes, reveal flips, consensus chimes; one-click mute, persisted
  • 🎭 Pixel-art avatars β€” DiceBear-generated, selectable on join and changeable mid-session
  • πŸŽ‰ Consensus confetti β€” fires automatically when everyone votes the same value
  • πŸ“± Mobile-friendly & installable β€” a roster layout on phones and a PWA manifest for Add-to-Home-Screen
  • πŸŒ— Dark & light theme β€” toggled with a single click, preference persisted across sessions

πŸš€ Quick Start

# Clone and install
git clone https://github.com/kud/planning-poker.git
cd planning-poker
npm install

# Start the PartyKit room server and the Next.js dev server
npm run party:dev   # terminal 1 β€” ws://127.0.0.1:1999
npm run dev         # terminal 2 β€” http://localhost:3000

Open http://localhost:3000 in your browser.

  1. Click Create room β€” a six-character room code and shareable link are generated instantly.
  2. Share the link (or code) with your team.
  3. Each guest opens the link, picks a name and avatar, and joins.
  4. Everyone votes; the host clicks Reveal to flip all cards simultaneously.
  5. Celebrate consensus with confetti, or discuss and re-vote.

🧩 How It Works

Host    ◄──────────────┐
                       β”‚ WebSockets
Guest 1 ◄───────────────
Guest 2 ◄──────────────┼──► PartyKit room server (Cloudflare edge)
Guest 3 β—„β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    └── authoritative room state

Each room is a stateful PartyKit server running on Cloudflare's edge (free tier). Every participant β€” host included β€” connects over a WebSocket; the server holds the authoritative room state and broadcasts every change to all connections. The deck and host identity are persisted in room storage, so the room survives refreshes and reconnects.

Hosting is a capability, not a page: creating a room generates a secret kept in localStorage, and whoever presents it to the room server gets the host controls. No accounts, no database.

Routes

Route Purpose
/ Landing page β€” create or join a room
/room/[id] The room β€” vote and watch results

Deck Presets

Preset Cards
Fibonacci 0, Β½, 1, 2, 3, 5, 8, 13, 21, ?, β˜•
Numeric 1 (XS), 2 (S), 4 (M), 8 (L), 16 (XL), 32 (XXL)
T-shirt XS, S, M, L, XL, XXL
Custom Comma-separated values of your choice

πŸ”§ Development

Project structure

party/
└── index.ts              # PartyKit room server β€” authoritative state
src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ page.tsx          # Landing β€” create or join
β”‚   └── room/[id]/        # The room view
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ room-view.tsx     # Core voting UI
β”‚   β”œβ”€β”€ participant-card.tsx
β”‚   β”œβ”€β”€ playing-card.tsx
β”‚   β”œβ”€β”€ avatar-picker.tsx
β”‚   β”œβ”€β”€ deck-selector.tsx
β”‚   β”œβ”€β”€ settings-dialog.tsx
β”‚   β”œβ”€β”€ vote-summary.tsx
β”‚   └── ui/               # Base UI primitives
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ use-party-room.ts # WebSocket connection & room actions
β”‚   └── use-share-room.ts # Copy room code / link
└── lib/
    β”œβ”€β”€ decks.ts          # Deck presets & parser
    β”œβ”€β”€ room-code.ts      # Room code generation
    β”œβ”€β”€ types.ts          # Shared TypeScript types
    β”œβ”€β”€ settings.ts       # localStorage persistence
    β”œβ”€β”€ avatar.ts         # DiceBear helpers
    └── utils.ts          # Shared utilities

Scripts

Script Description
npm run dev Start Next.js dev server with HMR
npm run party:dev Start the PartyKit room server locally
npm run party:deploy Deploy the room server to PartyKit
npm run crew -- CODE Inject auto-voting fake users for testing (--count N, --prod)
npm run build Production build
npm run start Serve the production build
npm run lint Run ESLint

Configuration

The client connects to NEXT_PUBLIC_PARTYKIT_HOST when set, and falls back to 127.0.0.1:1999 in development and planning-poker.kud.partykit.dev in production builds.


πŸ— Tech Stack

Package Purpose
Next.js 16 React framework & routing
React 19 UI rendering
PartyKit Real-time room server (WebSockets)
Framer Motion 12 Card flip & flying-card animations
Base UI Unstyled accessible primitives
Tailwind CSS v4 Utility-first styling
DiceBear Pixel-art avatar generation
canvas-confetti Consensus celebration effect
Lucide React Icon set

MIT Β© kud β€” Made with ❀️

About

Estimate user stories together in real time β€” free, no account required. πŸƒ

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages