Added all new changes from main github repo.
This commit is contained in:
1 parent
564975d0e3
commit
449ef46c84
30 files changed
+2288
-524
No files matched your search
@@ -219,3 +219,30 @@ npm run build
|
||||
# Clean temporary files
|
||||
npm run clean
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 9. Clean Deployment & Data Integrity Rules
|
||||
|
||||
To guarantee enterprise-grade data hygiene and tour-level integrity, PinPoint Golf enforces strict separation between development testing and production deployment:
|
||||
|
||||
### 1. Mock Data Elimination in Production
|
||||
- **Server Store**: In production (`NODE_ENV=production` or `ENABLE_MOCK_DATA!=true`), the database manager `src/server/db.ts` suppresses demo accounts (`usr_demo_golfer`) and seeded community golfers (`user_seed_*`). Only real registered users and scorecards exist.
|
||||
- **Client App**: The client initializes rounds state to an empty list `[]` instead of pre-seeding `SAMPLE_ROUND`. The "Load Dev Sample Round" button is stripped in production builds (`import.meta.env.PROD`).
|
||||
|
||||
### 2. Authentication-Gated Features
|
||||
The following features are exclusively unlocked for registered golfers:
|
||||
- **Community Benchmarks & Leaderboards**: Public comparison of handicap, FIR%, GIR%, putts, and scrambles against peers.
|
||||
- **Career Achievements & Trophies**: 22 tier-ranked achievements across scoring, accuracy, and short game.
|
||||
- **Satellite GPS Rangefinder**: Real-time Google Maps satellite flyover, Front/Center/Back green distance calculation, pin targeting, and shot distance measurement.
|
||||
- *Guests & Unauthenticated Users*: Can start rounds, view course scorecards, and check local play, but receive clear in-app prompts to sign in or create a free account to unlock GPS, community leaderboards, and trophies.
|
||||
|
||||
### 3. Achievement Lifecycle Rules
|
||||
- **Empty Initial State**: New registered users start with zero achievements unlocked (`unlockedIds: []`).
|
||||
- **Finalization Requirement**: Achievements are never awarded during live play; they are evaluated and awarded **strictly upon finishing and saving a completed round** (`isCompleted: true`).
|
||||
|
||||
### 4. Round Immutability & Deletion Workflow
|
||||
- **Confirmation Modal**: Clicking "Finalize & Save Round" triggers `SaveRoundModal`, showing a complete scoring summary and an explicit warning that the round will be permanently locked.
|
||||
- **Post-Save Immutability**: Once saved (`isCompleted: true`), hole scores and statistical inputs are locked against modification.
|
||||
- **Deletion Only**: The only permitted post-save action on a finalized round is deletion from the golfer's history with confirmation.
|
||||
|
||||
Reference in new issue
Block a user