Skip to content

imran31415/putty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Putty - 3D Golf Putting Simulator

Live Demo License: MIT TypeScript React Native Expo

A professional-grade 3D golf putting simulator built with React Native and Expo. Putty helps golfers improve their putting skills through physics-based calculations, interactive 3D visualizations, and comprehensive green reading assistance.

๐ŸŽฎ Try the Live Demo

โœจ Features

๐ŸŽฏ 3D Putting Simulation

  • Real-time physics-based ball trajectory calculations
  • Interactive 3D green visualization with Three.js
  • Animated putt path preview with break and slope analysis
  • Professional-grade putting mechanics simulation

๐Ÿ“ Comprehensive Input System

  • Distance measurement (feet/yards/paces with custom configurations)
  • Grade/slope percentage input (uphill/downhill)
  • Break percentage and direction analysis
  • Green speed (Stimpmeter reading) integration
  • Multiple putting style support (straight back, arc, etc.)

๐Ÿ—บ๏ธ Advanced Green Mapping

  • Pre-configured professional course greens in GeoJSON format
  • 2D overhead view with precise ball placement
  • Automatic break/slope calculation from position
  • Dynamic hole location indicators
  • Heat map overlays for green speed visualization

๐Ÿงฎ Physics Engine

  • Advanced putt calculation algorithms considering:
    • Distance, slope, and break
    • Green speed and grain effects
    • Environmental factors
  • Recommended aim point calculation
  • Suggested putt strength analysis
  • Success probability estimation

๐Ÿ—๏ธ Architecture & Technology Stack

Core Technologies

  • Framework: React Native with Expo (v53+)
  • Language: TypeScript for type safety
  • 3D Graphics: Three.js with React Three Fiber
  • Physics: Custom physics engine with Cannon.js integration
  • State Management: Zustand for lightweight, scalable state
  • UI Components: React Native with custom design system

Cross-Platform Support

  • ๐Ÿ“ฑ Mobile: Native iOS and Android apps via Expo
  • ๐Ÿ’ป Web: Progressive Web App with full feature parity
  • ๐Ÿ–ฅ๏ธ Desktop: Desktop apps through Expo's platform support
  • โ˜๏ธ Cloud: Containerized deployment with Docker and Kubernetes

3D Rendering Pipeline

React Three Fiber โ†’ Three.js โ†’ WebGL
     โ†“
Custom Shaders โ†’ Physics Engine โ†’ Visual Output
     โ†“
Cross-platform rendering optimization

State Architecture

Zustand Store
โ”œโ”€โ”€ Putt Configuration (distance, break, slope)
โ”œโ”€โ”€ 3D Scene State (camera, lighting, models)
โ”œโ”€โ”€ Green Data (maps, hole positions, speeds)
โ””โ”€โ”€ User Preferences (units, putting style)

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ and Yarn
  • Expo CLI (npm install -g @expo/cli)
  • For mobile development: iOS Simulator or Android Emulator

Installation

git clone https://github.com/yourusername/putty.git
cd putty/putty-app
yarn install

Development

# Start development server
yarn start

# Run on specific platforms
yarn ios          # iOS Simulator
yarn android      # Android Emulator
yarn web          # Web browser

Testing

yarn test         # Run Playwright E2E tests
yarn test:watch   # Interactive test UI
yarn lint         # Code linting
yarn typecheck    # TypeScript validation
yarn ci           # Full CI pipeline

๐Ÿ›๏ธ Project Structure

putty-app/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/          # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ Visualization/   # 3D rendering components
โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard/       # Main dashboard UI
โ”‚   โ”‚   โ”œโ”€โ”€ Background/      # 3D scene backgrounds
โ”‚   โ”‚   โ””โ”€โ”€ Layout/          # App layout components
โ”‚   โ”œโ”€โ”€ services/           # Business logic layer
โ”‚   โ”‚   โ””โ”€โ”€ calculations/   # Physics and math engines
โ”‚   โ”œโ”€โ”€ store/              # Zustand state management
โ”‚   โ”œโ”€โ”€ types/              # TypeScript definitions
โ”‚   โ”œโ”€โ”€ constants/          # App configuration
โ”‚   โ””โ”€โ”€ utils/              # Helper functions
โ”œโ”€โ”€ tests/                  # E2E test suites
โ”œโ”€โ”€ assets/                 # Images, 3D models, fonts
โ”œโ”€โ”€ k8/                     # Kubernetes deployment
โ””โ”€โ”€ web/                    # Web-specific assets

๐Ÿงช Testing Strategy

Multi-Platform Testing

  • End-to-End: Playwright testing across Chrome, Firefox, Safari
  • Mobile Testing: iOS Safari and Android Chrome simulation
  • Unit Tests: Jest with React Native Testing Library
  • 3D Rendering: Custom Three.js testing utilities

Quality Assurance

  • Code Coverage: 80%+ overall, 95%+ for critical paths
  • Performance: 60fps 3D rendering on mobile devices
  • Cross-browser: Full compatibility testing
  • Accessibility: WCAG 2.1 AA compliance

๐Ÿณ Deployment

Docker

# Build container
docker build -t putty-app .

# Run locally
docker run -p 3000:3000 putty-app

Kubernetes

cd k8
kubectl apply -f .

Production Build

yarn build:web    # Web production build
eas build --platform all  # Mobile app builds

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run the full test suite: yarn ci
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ† Acknowledgments

  • Built with React Native and Expo
  • 3D graphics powered by Three.js and React Three Fiber
  • Physics calculations inspired by professional putting research
  • Course data formats based on industry-standard GeoJSON

๐Ÿ“ž Support


๐ŸŽฏ Improve your putting game with precision, science, and beautiful 3D visualization.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages