Skip to content

donpotts/MyWheel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽก My Wheel

Blazor .NET WebAssembly

๐ŸŒŸ A beautiful, interactive spinning wheel app that makes recipe selection fun and exciting! Built with modern Blazor WebAssembly technology.

๐ŸŒ Live Demo: https://donpotts.github.io/MyWheel/

โœจ Features

๐ŸŽจ Beautiful Animations - Realistic weighted wheel physics with 5-second deceleration
๐Ÿ”Š Dynamic Sound Effects - Progressive ticking that slows down naturally with the wheel
๐Ÿ“ฑ Responsive Design - Perfect experience on desktop, tablet, and mobile
๐ŸŽฏ Smart Selection - Intelligent wheel physics with momentum and realistic stopping
๐Ÿ›‘ Interactive Stop Button - Click the center circle to stop the wheel exactly where you want
๐ŸŒˆ Modern UI - Stunning gradients, emojis, and hover effects
๐Ÿฝ๏ธ 8 Delicious Recipes - Curated selection of amazing dishes to try
๐Ÿค– AI Recipe Generation - Get detailed recipes with daily access codes

๐ŸŽก New Interactive Features

๏ฟฝ Smart Stop Button

  • Red Center Circle: Appears when wheel is spinning
  • Precise Control: Stop exactly where the indicator points
  • Visual Feedback: Glowing red effect with hover animations
  • Real-time Tracking: JavaScript monitors exact wheel position
  • Cancellation System: Properly stops timers and audio

โšก Realistic Wheel Physics

  • 5-Second Duration: Extended timing for better user experience
  • Weighted Deceleration: Starts fast, naturally slows down like a real wheel
  • Dynamic Audio: Ticking starts rapid (80ms) and slows to (300ms intervals)
  • More Rotations: 6-11 full spins for dramatic effect
  • Cubic Bezier Easing: cubic-bezier(0.17, 0.67, 0.12, 0.99) for authentic feel

๐ŸŽจ Enhanced User Experience

  • ๐ŸŽฏ Emoji Integration: Beautiful emojis replace placeholder text throughout
  • ๐Ÿ” Proactive Access: Recipe unlock prompt shows immediately when needed
  • ๐Ÿ›‘ Stop Message: Special "Stopped!" message when manually stopped
  • โšก Improved Feedback: Better visual and audio cues for all interactions

๐Ÿ” Daily Recipe Access System

The wheel features a secure daily access control system for AI recipe generation only:

  • ๐Ÿ†“ Free Wheel Access: Anyone can spin the wheel and select items freely
  • ๐Ÿ—“๏ธ Daily Recipe Codes: Unique codes required only for AI-generated recipes
  • โฐ Time-Limited: 24-hour access for recipe generation from midnight to midnight
  • ๐Ÿ›ก๏ธ Secure: Cryptographically generated codes prevent unauthorized recipe access
  • ๐Ÿ“ฑ Device-Specific: One recipe code per device per day

For Users

  1. ๐ŸŽก Spin the wheel freely - No code needed for basic wheel functionality
  2. ๐Ÿ›‘ Stop anytime - Click the red center circle to stop the wheel exactly where you want
  3. ๐Ÿ” Unlock recipes upfront - See the recipe access prompt immediately if codes are needed
  4. ๐Ÿฝ๏ธ Generate detailed recipes - Enter today's access code to unlock AI-powered recipe generation
  5. โฑ๏ธ Enjoy realistic physics - 5-second weighted wheel with natural deceleration

๐Ÿš€ Quick Start

Prerequisites

๐Ÿƒโ€โ™‚๏ธ Running the App

# Clone the repository
git clone https://github.com/donpotts/MyWheel.git
cd MyWheel

# Run the application
dotnet run --project MyWheelApp.csproj

๐ŸŒ Open your browser and navigate to http://localhost:5234

๐ŸŽฎ How to Play

  1. ๐Ÿ–ฑ๏ธ Click the "Spin Wheel" button to start the magic
  2. โณ Watch the wheel spin with realistic weighted physics (5-second deceleration)
  3. ๐Ÿ›‘ Optional: Click the red center circle to stop exactly where you want
  4. ๐ŸŽ‰ Wait for it to land on your destiny recipe (auto-selected!)
  5. ๐Ÿ” If needed: Unlock recipe access with daily code (prompt shown immediately)
  6. ๐Ÿฝ๏ธ Optional: Click "Get Recipe" for a detailed AI-generated recipe
  7. ๐Ÿ‘ฉโ€๐Ÿณ Start cooking your randomly selected masterpiece!

๐Ÿ—๏ธ Project Architecture

๐Ÿ“ MyWheel/
โ”œโ”€โ”€ ๐Ÿ“„ Pages/Home.razor           # ๐ŸŽก Main wheel component
โ”œโ”€โ”€ ๐Ÿ“„ Pages/Configuration.razor  # โš™๏ธ Wheel customization
โ”œโ”€โ”€ ๐Ÿ“„ Pages/AccessCode.razor     # ๐Ÿ” Daily code entry (for recipes only)
โ”œโ”€โ”€ ๐Ÿ“„ Pages/AdminCodes.razor     # ๐Ÿ‘จโ€๐Ÿ’ผ Admin code management
โ”œโ”€โ”€ ๐Ÿ“ Services/
โ”‚   โ”œโ”€โ”€ ๐Ÿ› ๏ธ WheelConfigurationService.cs
โ”‚   โ”œโ”€โ”€ ๐Ÿ” DailyCodeService.cs    # Recipe access control logic
โ”‚   โ”œโ”€โ”€ ๐Ÿค– RecipeService.cs       # AI recipe generation
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ IRecipeService.cs      # Recipe service interface
โ”œโ”€โ”€ ๐Ÿ“ Models/
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ WheelConfiguration.cs
โ”‚   โ”œโ”€โ”€ ๐Ÿ” DailyCode.cs          # Access control models
โ”‚   โ””โ”€โ”€ ๐Ÿฝ๏ธ Recipe.cs              # Recipe data model
โ”œโ”€โ”€ ๐Ÿ“ wwwroot/
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ css/app.css           # Stunning animations & styles
โ”‚   โ”œโ”€โ”€ โšก js/wheel.js            # Wheel physics & sound magic
โ”‚   โ”œโ”€โ”€ ๐ŸŒ index.html            # Entry point
โ”‚   โ””โ”€โ”€ ๐Ÿ“ฑ manifest.json         # PWA configuration
โ””โ”€โ”€ ๐Ÿ“ฑ Layout/                   # App shell & navigation

๐Ÿฝ๏ธ Recipe Collection

๐ŸŽฏ Slot ๐Ÿฅ˜ Recipe ๐ŸŒŸ Difficulty
1 ๐Ÿ• Pizza Margherita โญโญ
2 ๐Ÿ› Chicken Curry โญโญโญ
3 ๐ŸŒฎ Beef Tacos โญโญ
4 ๐Ÿ Pasta Carbonara โญโญ
5 ๐ŸŸ Salmon Teriyaki โญโญโญ
6 ๐Ÿฅฌ Vegetable Stir Fry โญ
7 ๐Ÿฅ— Greek Salad โญ
8 ๐Ÿฐ Chocolate Cake โญโญโญโญ

๐Ÿ› ๏ธ Tech Stack

Technology Purpose Version
Blazor Frontend Framework .NET 9
C# Backend Logic C# 13.0
CSS3 Physics Animations CSS3 + Cubic Bezier
JavaScript Real-time Tracking Web Audio API + RequestAnimationFrame
WebAssembly Runtime Latest
Semantic Kernel AI Integration Latest

โš™๏ธ Technical Improvements

๐ŸŽฏ Real-time Wheel Tracking

  • RequestAnimationFrame: Precise rotation tracking during animation
  • Cancellation Tokens: Proper async operation management
  • CSS-JS Sync: Perfect synchronization between visual and logic layers
  • Memory Management: IDisposable implementation for cleanup

๐Ÿ”Š Advanced Audio System

  • Web Audio API: Programmatic sound generation
  • Dynamic Timing: Progressive tick rates based on wheel speed
  • Audio Context: Proper initialization and state management
  • Cross-browser: Fallback support for older browsers

๐Ÿš€ Deployment

GitHub Pages

The app is automatically deployed to GitHub Pages. The daily code system works seamlessly in production for recipe access.

Local Development

  1. Clone the repository
  2. Run dotnet run from the solution directory
  3. Wheel works immediately

๐Ÿ“ง Contact for Recipe Codes or Support

Don Potts
๐Ÿ“ฎ Email: Don.Potts@DonPotts.com


Made with โค๏ธ using Blazor WebAssembly

Spin freely, cook with access! ๐ŸŽก๐Ÿฝ๏ธ

About

๐ŸŒŸ Interactive spinning wheel app that makes recipe selection fun and exciting!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published