Add project README
This commit is contained in:
@@ -1,16 +1,86 @@
|
||||
# React + Vite
|
||||
# Disc Golf Tracker
|
||||
|
||||
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
|
||||
A private, on-device disc golf scorecard app. Log rounds, track your bag, and follow your progress over time — no account or server needed.
|
||||
|
||||
Currently, two official plugins are available:
|
||||
**Live at [dgt.hannu.be](https://dgt.hannu.be)** -> server is not on 247 but app does not need page reloads.
|
||||
|
||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
||||
---
|
||||
|
||||
## React Compiler
|
||||
## Features
|
||||
|
||||
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
||||
### Scoring
|
||||
- Log rounds hole by hole with − / + controls
|
||||
- Scores default to par — tap through a hole without entering a number and par is recorded automatically
|
||||
- Birdie / Eagle / Par / Bogey labels appear in real time (no aces yet!)
|
||||
- Running total vs. par shown throughout the round
|
||||
- Auto-save on every tap — leave mid-round and resume from the Home screen
|
||||
|
||||
## Expanding the Oxlint configuration
|
||||
### Courses
|
||||
- Add courses with custom hole counts (9, 18, or 24) and per-hole par
|
||||
- Saved courses are reusable across rounds
|
||||
- Multiple players per round, roster remembered between sessions
|
||||
|
||||
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and Oxlint's TypeScript related rules in your project.
|
||||
### Bag
|
||||
- Build a disc bag with name, type (Distance Driver, Fairway Driver, Midrange, Putter), and color
|
||||
- Tag which disc was thrown on each hole during play
|
||||
- Per-disc stats: throw count and average score vs. par
|
||||
|
||||
### Stats & History
|
||||
- Leaderboard ranked by average score vs. par across all rounds
|
||||
- Per-player breakdown: eagles, birdies, pars, bogeys with a visual bar
|
||||
- Score trend chart across rounds (line chart per player)
|
||||
- Average score by course
|
||||
- Full scorecard for every finished round with disc usage overlay
|
||||
|
||||
---
|
||||
|
||||
## Tech stack
|
||||
|
||||
- [React](https://react.dev/) — UI
|
||||
- [Vite](https://vite.dev/) — build tool
|
||||
- [Tailwind CSS v4](https://tailwindcss.com/) — styling
|
||||
- [Recharts](https://recharts.org/) — trend charts
|
||||
- [lucide-react](https://lucide.dev/) — icons
|
||||
|
||||
No backend. All data is stored in the browser's `localStorage` — private to the device browser, no account required.
|
||||
|
||||
## About localStorage
|
||||
|
||||
Persistence — survives page reloads and closing the browser. Unlike sessionStorage which clears when the tab closes, localStorage stays until explicitly deleted or the user clears browser data.
|
||||
|
||||
Scope — dgt.hannu.be can only read its own data. Another website cannot read dgt.hannu.be's data and vice versa. Completely isolated per origin.
|
||||
|
||||
Chrome/Edge: install the site as a PWA (Add to Home Screen / Install App). Installed PWAs are treated differently — the browser is less aggressive about clearing their storage.
|
||||
|
||||
---
|
||||
|
||||
## Run locally
|
||||
|
||||
Requires Node.js 20+.
|
||||
|
||||
```bash
|
||||
git clone https://git.hannu.be/dev-hannu/disc-golf-tracker.git
|
||||
cd disc-golf-tracker
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open [http://localhost:5173](http://localhost:5173).
|
||||
|
||||
---
|
||||
|
||||
## Build & deploy
|
||||
|
||||
```bash
|
||||
npm run build # outputs to dist/
|
||||
npm run preview # preview the production build locally
|
||||
```
|
||||
|
||||
The `dist/` folder is plain static files — drop it on any web server or static host (Caddy, Nginx, Netlify, Vercel, GitHub Pages, etc.).
|
||||
|
||||
---
|
||||
|
||||
## Origin
|
||||
|
||||
The app was built as a [Claude](https://claude.ai) artifact and then deployed as a standalone site.
|
||||
The storage layer uses `localStorage` shim so it runs in any browser unchanged.
|
||||
Reference in New Issue
Block a user