๐ฏ Darts Game Scorer
A modern, responsive web app for scoring darts games with customizable features and detailed history tracking.
๐ Features
- ๐ฎ Game Modes: Play 301, 501, or 701
- ๐ฏ Double-Out Support: Follows standard finishing rules
- ๐ฅ Multi-Player: Add and manage unlimited players
- ๐จ Customizable UI: Set multiplier colors to your preference
- ๐ Game History: View detailed throw logs for each player
- ๐ฑ Responsive Design: Optimized for desktop, tablet, and mobile
- ๐ Dark & Light Mode: Auto theme switching based on system
- ๐พ Persistent Storage: Game state saved in local storage
๐ ๏ธ Tech Stack
- Next.js โ React framework for frontend rendering
- TypeScript โ Type-safe JavaScript
- Tailwind CSS โ Utility-first CSS styling
- Radix UI โ Accessible, headless UI components
- Lucide Icons โ Consistent and customizable icons
- shadcn/ui โ Beautiful prebuilt UI components
๐งโ๐ป Getting Started
โ
Prerequisites
๐ง Local Development
- Clone the repo:
git clone https://github.com/yourusername/darts-game.git
cd darts-game
- Install dependencies:
npm install --legacy-peer-deps
- Run the dev server:
npm run dev
- Visit
http://localhost:3000
in your browser.
๐ณ Docker Setup
- Build the image:
docker build -t app-darts .
- Run the container:
docker run -p 3000:3000 app-darts
- Visit
http://localhost:3000
๐ฎ How to Use
๐งพ Setup
- Click the โ๏ธ Settings icon
- Add players and select game mode
- (Optional) Set custom multiplier colors
- Click Start Game
๐ฏ Scoring
- Choose a multiplier: ร1, ร2, or ร3
- Tap the number you hit
- Complete your throws or click Finish Round
๐น๏ธ Game Controls
- Reset Round โ Clear current throws
- Next Player โ Advance to the next player
- History Icon โ View throw history
โ๏ธ Edit Scores
- Click the โ๏ธ edit icon next to a player's score to adjust manually
๐งฑ Project Structure
app-darts/
โโโ app/
โ โโโ layout.tsx
โ โโโ page.tsx
โ โโโ globals.css
โโโ components/
โ โโโ ui/
โ โโโ darts-game.tsx
โ โโโ score-input.tsx
โ โโโ game-stats.tsx
โ โโโ player-management.tsx
โ โโโ game-history-sheet.tsx
โ โโโ throw-history.tsx
โ โโโ color-settings.tsx
โ โโโ edit-score-dialog.tsx
โ โโโ theme-toggle.tsx
โโโ lib/
โ โโโ utils.ts
โโโ public/
โโโ next.config.mjs
โโโ tailwind.config.ts
โโโ tsconfig.json
โโโ package.json
โโโ Dockerfile
โโโ README.md
๐ง Technical Details
๐๏ธ State Management
- Uses
useState
& useEffect
- Tracks:
- Player list & scores
- Current player & throws
- Game mode & color prefs
- UI modals/sheets
๐พ Local Storage
- Player data
- Selected game mode
- Color preferences
๐ฆ Production
๐จ Build
npm run build
๐ Deployment
โ
Kubernetes via Flux GitOps (Recommended)
Push your changes to GitHub
Update the deployment in your Flux GitOps repo:
- Create or edit a
Kustomization
and Deployment
or HelmRelease
- Ensure your image is built and pushed via CI
- Optionally configure image automation
Flux will reconcile and deploy to your cluster
๐ See cellexec/flux-gitops for full setup.
๐ ๏ธ Troubleshooting
Issue |
Solution |
โ Dependency errors |
Use --legacy-peer-deps with npm install |
๐ง Build errors |
Use Node.js v18+ |
๐งน Storage bugs |
Clear browser local storage |
๐จ Style glitches |
Check Tailwind setup/config |
โ
Browser Support
- Chrome, Firefox, Safari, Edge (latest)
- iOS Safari & Android Chrome
๐ Game Rules
๐ฏ Double Out (Standard)
Start with 301, 501, or 701
Subtract each roundโs score from your total
To win, a player must:
- Hit exactly 0
- Finish with a double (e.g., outer bull or double ring)
Busts (overshoot or 1 point left) = No score for the round
๐ค Contributing
- Fork the repo
- Create a branch:
git checkout -b feature/amazing-feature
- Commit:
git commit -m "Add amazing feature"
- Push:
git push origin feature/amazing-feature
- Open a Pull Request
๐ License
MIT License โ free to use, modify, and share.