πΎ Try it now: courtshuffle.com
Playing Tennis or Pickleball with a big group? Use CourtShuffle to randomly assign courts and partners.
- Choose Format - Supports both singles and doubles play
- Select Courts - Choose the court numbers you'll be playing on
- Add Players - CourtShuffle creates a virtual deck of cards based on your setup
- Draw Cards - Players draw cards to determine their court and partner assignments
- Court Number - The card number (3, 4, 5, etc.) indicates which court to play on
- Partner Matching - Red suits (
β¦οΈ β₯οΈ ) pair together, black suits (β οΈ β£οΈ ) pair together
- Players drawing 3
β¦οΈ and 3β₯οΈ are partners on court 3 - Players drawing 4
β οΈ and 4β£οΈ are partners on court 4 - Players drawing 5
β¦οΈ and 5β οΈ are opponents on court 5
Got a really big group? Share the deck across multiple devices! Everything stays perfectly synchronized - no one will draw the same card twice.
A Progressive Web App (PWA) for managing court-based sports games through card-based player assignments. Built with React 19, TypeScript, and modern web technologies for a seamless mobile and desktop experience.
- Card-based Player Assignment: Dynamic court assignments using a deck of cards
- Progressive Web App: Installable, works offline, mobile-optimized
- Real-time Sync: Optional multi-device synchronization via Convex
- Local-first Architecture: Works perfectly offline with graceful degradation
- Responsive Design: Mobile-first with drawer/dialog adaptive UI
- Court Management: Flexible court configuration and player management
- Game Formats: Support for various court-based sports and formats
- Frontend: React 19 + TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS v4
- State Management: Zustand with persistence
- Backend: Convex (optional real-time sync)
- UI Components: shadcn/ui + Radix UI
- Mobile UI: Vaul (drawer component)
- Icons: Lucide React
- Testing: Vitest + jsdom
- Node.js: Version 18 or higher
- Package Manager: Bun (recommended) or npm/yarn
- Convex Account: Optional, for real-time synchronization features
-
Clone the repository
git clone https://github.com/imathis/court-shuffle.git cd court-shuffle
-
Install dependencies
bun install # or npm install
-
Environment Setup
cp .env.example .env.local
-
Configure Convex (Optional)
- Create a new project at Convex Dashboard
- Update
.env.local
with your Convex URL:VITE_CONVEX_URL="https://your-deployment-name.convex.cloud" CONVEX_DEPLOYMENT=dev:your-deployment-name
- Initialize Convex:
npx convex dev
src/
βββ components/ui/ # shadcn/ui base components
βββ game/ # Game-specific components
β βββ config/ # Settings and configuration
β βββ play/ # Core gameplay components
βββ store/ # Zustand state management
βββ helpers/ # Game logic utilities
βββ hooks/ # Custom React hooks
βββ pages/ # Route components
βββ assets/ # SVG cards and static assets
convex/ # Backend functions (optional)
βββ game.ts # Game synchronization logic
βββ schema.ts # Database schema
βββ crons.ts # Scheduled functions
- Configure Game: Set number of courts and add players
- Start Game: Generate card deck based on configuration
- Draw Cards: Players are assigned to courts via card draws
- Track Progress: Navigate through rounds and manage court status
- Local Mode: Games are stored locally, work offline
- Sync Mode: Games can be shared across devices with real-time updates
- Graceful Degradation: App automatically falls back to local-only if sync fails
- Games can be shared via unique slugs when sync is enabled
- QR codes are generated for easy mobile sharing
- Multiple devices can connect to the same game session
-
Build the project
bun run build
-
Deploy the
dist/
folder to your preferred hosting service:- Netlify
- Vercel
- GitHub Pages
- Any static hosting service
Users can install the app directly from their browser:
- Chrome/Edge: "Add to Home Screen" or "Install App"
- Safari: "Add to Home Screen"
- Firefox: "Install" option in address bar
If using real-time sync features:
-
Deploy to Convex
npx convex deploy --prod
-
Update production environment Update your hosting service with production Convex URL
Variable | Description | Required |
---|---|---|
VITE_CONVEX_URL |
Convex deployment URL | Optional |
CONVEX_DEPLOYMENT |
Convex deployment identifier | Optional |
- Courts: Configurable number of playing courts
- Players: Dynamic player list management
- Formats: Automatic format detection based on player/court ratio
- Cards: Custom card deck generation based on game parameters
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes: Follow existing code style and patterns
- Run tests:
bun run test
- Run linter:
bun run lint
- Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Use existing UI component patterns (shadcn/ui)
- Maintain mobile-first responsive design
- Write tests for new functionality
- Follow conventional commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React and TypeScript
- UI components from shadcn/ui
- Powered by Vite and Tailwind CSS
- Real-time features by Convex
- Icons by Lucide