screen
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
index.ts
https://max123--012e69a237ff11f0bcab9e149126039e.web.val.run
A comprehensive real-time pickleball scoring system for managing games across multiple courts and sites.
- Multi-Site Management: Support for 2 sites with 10 courts each
- Real-Time Scoring: Live score updates with proper pickleball rules
- Game Management: Create, start, and manage pickleball games
- Point Logging: Detailed point-by-point history with popup view
- Audience View: Public real-time score display for spectators
- Responsive UI: Modern design that works on all devices
- Games to 11 points (win by 2)
- Tournament games to 15 or 21 points
- Proper serving rotation and side switching
- Score calling format: "Server Score - Receiver Score - Server Number"
βββ backend/
β βββ database/
β β βββ migrations.ts # Database schema
β β βββ queries.ts # Database operations
β βββ routes/
β β βββ games.ts # Game management API
β β βββ scoring.ts # Scoring operations API
β β βββ static.ts # Static file serving
β βββ index.ts # Main server entry point
βββ frontend/
β βββ components/
β β βββ App.tsx # Main application
β β βββ GameBoard.tsx # Court overview
β β βββ ScoreKeeper.tsx # Scoring interface
β β βββ AudienceView.tsx # Public score display
β β βββ PointLog.tsx # Point history popup
β βββ index.html # Main HTML template
β βββ index.tsx # Frontend entry point
β βββ style.css # Custom styles
βββ shared/
βββ types.ts # Shared TypeScript types
- Admin Interface: Create and manage games across courts
- Scorer Interface: Real-time scoring with point logging
- Audience View: Public display for spectators
- Point History: Detailed game logs with popup view
GET /api/games
- List all active gamesPOST /api/games
- Create new gamePUT /api/games/:id/score
- Update game scoreGET /api/games/:id/points
- Get point historyGET /audience/:courtId
- Public audience view
- WebSocket connections for live score updates
- Automatic score synchronization across all viewers
- Real-time point logging and history