Hi! I built a neon "wheel of fortune" for giveaways and interactive picks. It saves state, plays synthy sounds, has a demo auto-spin mode, and ships as a PWA. Use it, remix it, enjoy: https://d371l.github.io/asmodeus/
This project was created by d371l. It is OpenSource and freely available for use for any purposes. Feel free to use, modify, and distribute it as needed.
If you found this project useful or interesting, please consider giving it a star on GitHub! It helps others discover the project and shows your appreciation.
- React 18 + TypeScript
- Vite 5
- Tailwind CSS 3 (bundled, no CDN)
- D3 (slice geometry)
- Web Audio API (tick / spin start / win)
- PWA: manifest + service worker (offline cache for the shell)
- Add/remove players, drag-and-drop reordering, preset names button.
- Persists players, history, sound toggle, elimination mode, and demo mode in
localStorage. - Elimination mode: remove winner after spin.
- Demo mode: auto-spins every 8–12s; if the list is empty, it auto-fills a preset.
- Hotkeys:
Space— spin,S— sound,D— demo. Spin button has aria-label; events announced viaaria-live. - Visuals: metallic gradients per slice, winner glow, pointer sparks/beam, confetti.
- PWA installable with icons and offline cache.
npm install— install depsnpm run dev— local dev (Vite)npm run build— production build todist/npm run preview— preview built assets
npm installnpm run dev- Open the URL printed by Vite (usually
http://localhost:5173/).
vite.config.tsusesbase: '/asmodeus/'. Keep it if hosting athttps://<user>.github.io/asmodeus/.- Workflow
.github/workflows/deploy.ymlbuilds and publishesdistto Pages on push tomain.
- Manifest:
public/manifest.webmanifest - Service worker:
public/sw.js(caches core shell and icons) - Icons:
public/icon-192.svg,public/icon-512.svg
- Hotkeys:
Spacespin,Ssound,Ddemo. - Spin button
aria-label; live region announces add/remove and winner. - Inputs/buttons keep focus styles; list is draggable with mouse (keyboard DnD not yet).
App.tsx— app state, spin logic, demo mode, audio, ARIA, SW registration.components/Wheel.tsx— SVG/D3 wheel, winner glow, pointer sparks/beam.components/Controls.tsx— player management, presets, drag-and-drop, modes.components/WinnerModal.tsx— winner dialog with gradient avatar.components/Confetti.tsx— confetti effect.constants.ts— palette and name presets.utils/audio.ts— Web Audio synthesis.public/— PWA assets (manifest, service worker, icons).
This project is licensed under the MIT License. See the LICENSE file for details.