Skip to content

Repository files navigation

Tee Time Optimizer

React TypeScript Vite Zustand

Tee Time Optimizer is a sophisticated, data-driven web application designed to solve a classic combinatorial scheduling dilemma: how do you perfectly balance overlapping tee times to maximize group chemistry, equalize cumulative course handicaps, and distribute shared equipment efficiently?

Built to automate golf outings, this application serves as a fully-fledged algorithmic optimization engine and Generative AI simulator, stylized with a bespoke, data-dense sportsbook aesthetic.

🚀 Live Demo

Available at: tee-time-optimizer.vercel.app


🎯 Core Features

1. Multi-Variate Combinatorial Optimization

Instead of randomly shuffling players, the platform utilizes a continuously resolving Compatibility Index scoring engine. Users configure dynamic weights to calculate interactions across:

  • Handicap Parity: Ensures no group is overly stacked or overwhelmingly novice.
  • Pace of Play: Groups players who share similar golf abilities to prevent pacing bottlenecks.
  • Relational Familiarity: Users define a dynamic matrix mapping who knows who, giving the algorithm the power to force unfamiliar players into mixer scenarios or keep best friends paired.
  • Intra-Cart Equipment Distribution: Algorithmically flags and pairs players who require shared club sets within the same golf carts.

2. Generative AI Simulator (xAI Grok API)

The platform integrates cutting-edge Generative UI via the x.ai inference API. By pushing the mathematically optimized groups into the LLM, the application returns a dynamically structured "Tee Time Simulation." The AI streams live chemistry analysis and generates mathematically-plausible sportsbook prop bets based entirely on the parsed player attributes and bios.

3. Advanced State Management

Locally powered by Zustand, the application fluidly maintains a deeply nested global state of player profiles, relationship matrices, and live calculation outputs without leaning on prop-drilling or Context bottlenecking. API tokens remain session-only and are strictly scrubbed from persistence.

4. File I/O Engine

  • Headless parsing of dynamically mapped CSV rosters directly into typed internal state.
  • One-click exportation of optimized groupings and cart-pairings as universally compatible Markdown summaries or .csv sheets.

🛠️ Technical Architecture & Stack

  • Core: React 19 + TypeScript for absolute strict type-safety across component boundaries.
  • Build Tool: Vite for instantaneous HMR and lightning-fast production bundling.
  • State Management: Zustand for localized, slice-based state resolution.
  • Styling Architecture: Custom CSS methodology utilizing centralized CSS Variable tokens, complex Flex/Grid layouts, and targeted @media constraints to guarantee pixel-perfect rendering from 4k monitors down to narrow mobile viewports.
  • Deployment: Vercel automatically bound to the core GitHub branch for frictionless CI/CD edge hosting.

💻 Getting Started Locally

To run the application locally, clone this repository and follow the steps below:

Prerequisites

  • Node.js (v18+)

Installation

  1. Install module dependencies
npm install
  1. Start the local development server (Vite)
npm run dev
  1. Run a Simulation Note: To access the Generative Tee Time Simulator, you will need to input a valid ephemeral x.ai API Key via the UI dashboard prior to executing the operation.

🧠 Design Philosophy

The application was structurally designed to mimic high-end financial terminals and modern sportsbooks. Eschewing basic component libraries, it employs a heavy dark-mode contrast, strict visual hierarchies, monospace data typography, and fluid CSS micro-animations to bring the mathematics to life. It serves as a playground for algorithm design, AI generative integration, and complex React state handling.

About

A dynamic, high-performance Golf Group Optimizer. Uses a sportsbook-style Generative UI and algorithm-driven Compatibility Index to determine the ultimate tee time pairings based on skill, vibe, and loadouts.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages