Fairway
Scorecard and round analysis
Recent rounds
All roundsPortfolio project
Fairway is a full-stack side project built to practice modern React patterns — from type-safe data storage to server-side AI integration. Every design and architecture decision is intentional.
Stack
What this demonstrates
API key security
The Anthropic API key never touches the browser. All AI calls go through a Next.js server route — the key lives only in .env.local.
End-to-end type safety
One Zod schema defines HoleScore and Round. It validates form input, localStorage reads, and the API request body — no type drift.
Data visualization
Per-hole score charts, putting heat maps, GIR/fairway bars, and a multi-round trend line — all Recharts with score-to-par normalization.
Structured AI prompting
AI receives hole-by-hole data and returns a Zod-validated JSON coaching report with three training priorities and actionable drills.
Offline-first persistence
No backend, no auth. Rounds live in localStorage. AI analyses are cached per round — the API is called once and the result reused.
Mobile-first UX
Touch-optimized scorecard entry with stepper buttons and Y/N toggles. Fixed bottom nav, responsive charts, live running totals while scoring.