A real-time Planning Poker web application built with the MERN stack (MongoDB, Express.js, React, Node.js) for agile estimation and collaborative story pointing.
- Features
- Tech Stack
- Project Structure
- Quick Start
- Development
- API Documentation
- Deployment
- Contributing
- Real-time Collaboration: Vote on stories simultaneously with your team using Socket.IO
- Voting Timer: β±οΈ Time-box estimation rounds with configurable countdown timers (NEW!)
- Multiple Card Decks: Choose from Fibonacci, T-shirt sizes, Modified Fibonacci, or Powers of 2
- Room Management: Create and join rooms with unique IDs
- Vote Reveal: Synchronized vote revealing and clearing
- Story Management: Add, edit, and manage user stories within rooms
- Responsive Design: Works on desktop and mobile devices with Tailwind CSS
- Modern UI: Clean, accessible design with Tailwind CSS utility classes
- TypeScript: Full type safety across the entire stack
- Monorepo Architecture: Shared types and utilities between client and server
- Node.js with Express.js for the REST API
- Socket.IO for real-time WebSocket communication
- TypeScript for type safety
- In-memory storage (easily replaceable with MongoDB)
- React 18 with TypeScript
- Tailwind CSS for styling and design system
- Vite for fast development and building
- Socket.IO Client for real-time features
- React Query for state management and API calls
- React Router for navigation
- Lucide React for modern icons
- ESLint & Prettier for code quality
- Concurrently for running multiple processes
- Nodemon for development server auto-restart
- VS Code Tasks for integrated development workflow
planning-poker/
βββ packages/
β βββ shared/ # Shared types, utilities, and constants
β β βββ src/
β β β βββ types.ts # TypeScript interfaces and types
β β β βββ constants.ts # Card decks, socket events, validation rules
β β β βββ utils.ts # Shared utility functions
β β β βββ index.ts # Export barrel
β β βββ package.json
β β
β βββ server/ # Express.js backend API
β β βββ src/
β β β βββ index.ts # Server entry point
β β β βββ routes/ # API routes (rooms, stories)
β β β βββ socket/ # Socket.IO event handlers
β β β βββ middleware/ # Express middleware
β β βββ package.json
β β
β βββ client/ # React frontend application
β βββ src/
β β βββ App.tsx # Main React component
β β βββ main.tsx # React DOM entry point
β β βββ pages/ # React pages/routes
β β βββ contexts/ # React contexts (Socket)
β β βββ index.css # Global styles
β βββ index.html # HTML template
β βββ vite.config.ts # Vite configuration
β βββ package.json
β
βββ .vscode/
β βββ tasks.json # VS Code tasks for development
βββ package.json # Root package.json with workspaces
βββ tsconfig.json # Root TypeScript configuration
βββ .eslintrc.cjs # ESLint configuration
βββ .prettierrc # Prettier configuration
βββ README.md # This file
- Node.js 18.0.0 or higher
- npm 9.0.0 or higher
-
Clone the repository
git clone <repository-url> cd planning-poker
-
Install dependencies
npm install
-
Build shared package
npm run build --workspace=packages/shared
-
Start development servers
npm run dev
This will start:
- Backend server on
http://localhost:5000 - Frontend development server on
http://localhost:3000
Create a .env file in packages/server/ based on .env.example:
cd packages/server
cp .env.example .envThe client uses Tailwind CSS for styling with custom configurations:
- Custom color palette based on primary/secondary themes
- Planning poker card components with hover and selection states
- Responsive design utilities for mobile-first development
- Custom animations for card flips and transitions
The Tailwind configuration includes:
- Custom primary/secondary color scales
- Planning poker specific component classes
- Smooth animations for card interactions
# Start both client and server in development mode
npm run dev
# Build all packages
npm run build
# Lint all packages
npm run lint
# Fix linting issues
npm run lint:fix
# Run type checking
npm run type-check
# Clean all build outputs
npm run clean# Server development
npm run dev:server
# Client development
npm run dev:client
# Build specific package
npm run build --workspace=packages/server
npm run build --workspace=packages/client
npm run build --workspace=packages/sharedUse Ctrl+Shift+P β Tasks: Run Task to access:
- Start Development Servers: Runs both client and server
- Build All Packages: Builds the entire monorepo
- Lint All Packages: Runs ESLint across all packages
- Type Check All Packages: Runs TypeScript compiler checks
- Make changes to any package
- Shared package changes: Rebuild shared package if you modify types or utilities
npm run build --workspace=packages/shared
- Server changes: Server will auto-restart with nodemon
- Client changes: Vite will hot-reload automatically
- Shared types/utilities: Add to
packages/shared/src/ - API endpoints: Add to
packages/server/src/routes/ - Socket events: Add to
packages/server/src/socket/socketHandlers.ts - React components: Add to
packages/client/src/ - Always: Update types in shared package when adding new features
GET /api/rooms- Get all roomsGET /api/rooms/:id- Get room by IDPOST /api/rooms- Create a new roomPUT /api/rooms/:id- Update roomDELETE /api/rooms/:id- Delete room
GET /api/stories?roomId=:roomId- Get stories for a roomGET /api/stories/:id- Get story by IDPOST /api/stories- Create a new storyPUT /api/stories/:id- Update storyDELETE /api/stories/:id- Delete story
join_room- Join a planning poker roomleave_room- Leave a roomuser_joined- Broadcast when user joinsuser_left- Broadcast when user leavesroom_updated- Broadcast room state changes
start_voting- Start voting session for a storysubmit_vote- Submit a votevote_submitted- Broadcast that a vote was submitted (without revealing value)reveal_votes- Reveal all votesvotes_revealed- Broadcast revealed votesclear_votes- Clear all votes and start over
# Build all packages for production
npm run build
# Start production server
npm startProduction environment variables:
NODE_ENV=production
PORT=5000
CLIENT_URL=https://your-domain.com
MONGODB_URI=mongodb://your-mongodb-uri
JWT_SECRET=your-jwt-secret-
Traditional VPS/Server
- Build the project
- Copy
distfolders to server - Set up reverse proxy (nginx)
- Configure environment variables
-
Container Deployment (Docker)
- Create Dockerfiles for server and client
- Use multi-stage builds
- Deploy to container platforms
-
Cloud Platforms
- Server: Deploy to Heroku, Railway, DigitalOcean App Platform
- Client: Deploy to Vercel, Netlify, AWS S3 + CloudFront
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run tests and linting
npm run lint npm run type-check npm run build
- Commit your changes
git commit -m 'Add some amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
- Use TypeScript for all new code
- Follow ESLint and Prettier configurations
- Add proper JSDoc comments for public APIs
- Ensure type safety - avoid
anytypes - Write descriptive commit messages
- Add unit tests for utility functions
- Add integration tests for API endpoints
- Test Socket.IO events and real-time features
- Ensure cross-browser compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
- Tailwind CSS for the excellent utility-first CSS framework
- Socket.IO for real-time communication capabilities
- Vite for fast development experience
- TypeScript for bringing type safety to JavaScript
Happy Planning! π―
For questions or support, please open an issue in the repository.