{"id":49090871,"url":"https://github.com/alsatianco/spin-the-wheel","last_synced_at":"2026-04-20T18:33:23.488Z","repository":{"id":352395135,"uuid":"1211573428","full_name":"alsatianco/spin-the-wheel","owner":"alsatianco","description":"Local-first random picker wheel and decision spinner for classrooms, raffles, giveaways, teams, and quick decisions.","archived":false,"fork":false,"pushed_at":"2026-04-19T12:22:15.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T12:25:16.417Z","etag":null,"topics":["canvas","classroom-tool","decision-wheel","giveaway","indexeddb","local-first","multilingual","offline-first","picker-wheel","pwa","raffle","random-picker","spin-wheel","vanilla-javascript","web-audio"],"latest_commit_sha":null,"homepage":"https://spin.alsatian.co/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alsatianco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support.css","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-15T14:24:29.000Z","updated_at":"2026-04-19T12:22:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/alsatianco/spin-the-wheel","commit_stats":null,"previous_names":["alsatianco/spin-the-wheel"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/alsatianco/spin-the-wheel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsatianco%2Fspin-the-wheel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsatianco%2Fspin-the-wheel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsatianco%2Fspin-the-wheel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsatianco%2Fspin-the-wheel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alsatianco","download_url":"https://codeload.github.com/alsatianco/spin-the-wheel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsatianco%2Fspin-the-wheel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32059801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","classroom-tool","decision-wheel","giveaway","indexeddb","local-first","multilingual","offline-first","picker-wheel","pwa","raffle","random-picker","spin-wheel","vanilla-javascript","web-audio"],"created_at":"2026-04-20T18:33:22.796Z","updated_at":"2026-04-20T18:33:23.479Z","avatar_url":"https://github.com/alsatianco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Spin the Wheel](https://spin.alsatian.co)\n\nSpin the Wheel is a local-first wheel spinner and random picker for classrooms, raffles, giveaways, live streams, team picks, and quick decisions. It is a static PWA built with HTML, CSS, and vanilla JavaScript modules, with no backend, no accounts, and no build step.\n\nLive site: https://spin.alsatian.co\n\n## Highlights\n\n- Crypto-random winner selection with `crypto.getRandomValues()`\n- Weighted entries, elimination mode, seed mode, tournament mode, manual stop, and mystery wheel mode\n- Save named wheels locally and reopen them later\n- Share full-edit or spin-only wheels through compressed URLs with checksum validation\n- Bulk entry paste, CSV import, wheel export, results CSV export, and audit JSON export\n- Built-in templates, themes, event presets, sounds, celebration effects, and fullscreen mode\n- Offline-ready PWA with install support and a service worker\n- Local-first storage: wheel state and preferences in `localStorage`, saved wheels in `IndexedDB`\n- Multilingual UI with English, Vietnamese, Spanish, Portuguese, French, German, Japanese, Korean, Chinese, and Indonesian\n- Supporting pages for About, Help, Fairness, and Privacy\n\n## Tech Stack\n\n- HTML, CSS, and vanilla ES modules\n- Canvas 2D for wheel rendering and spin animation\n- Web Audio API for tick, spin, and win sounds\n- `crypto.getRandomValues()` for secure winner selection\n- `localStorage` and `IndexedDB` for persistence\n- Service Worker and Web App Manifest for offline support and installability\n\n## Run Locally\n\nBecause the app uses ES modules, root-relative asset paths, and a service worker, serve it from the repository root with a local HTTP server instead of opening `index.html` directly.\n\n### Option 1: Python\n\n```bash\ncd /home/duc/git/spin-the-wheel\npython3 -m http.server 8080\n```\n\nOpen http://localhost:8080.\n\n### Option 2: Node\n\n```bash\ncd /home/duc/git/spin-the-wheel\nnpx serve .\n```\n\nOpen the URL printed by the server.\n\nNo `npm install` is required for the app itself.\n\n## Deployment Notes\n\n- The project currently assumes root deployment at `/`, not a subpath. Asset links, the manifest, and the service worker scope all use root-based paths.\n- If you deploy to a different domain or a forked site, update the canonical, Open Graph, Twitter, and `hreflang` URLs in the HTML pages.\n- Update `SITE_ORIGIN` in `app.js` if the production origin changes.\n- Update `CNAME` if you deploy with GitHub Pages and a custom domain.\n- If you add or remove cached app-shell files, update `APP_SHELL_ASSETS` and bump `CACHE_VERSION` in `sw.js`.\n\n## Project Structure\n\n```text\n.\n|-- index.html            # Main app shell\n|-- app.js                # UI orchestration and event wiring\n|-- wheel-engine.js       # Canvas renderer and spin physics\n|-- state-manager.js      # State persistence and change tracking\n|-- share-codec.js        # Share URL encoding, decoding, and checksum validation\n|-- wheel-library.js      # Saved wheel library stored in IndexedDB\n|-- audio-engine.js       # Web Audio engine\n|-- defaults.js           # Default state, entries, and supported languages\n|-- themes.js             # Theme and visual presets\n|-- templates.js          # Built-in wheel templates\n|-- i18n.js               # Language loading and translation binding\n|-- utils.js              # Shared helpers and storage wrappers\n|-- sw.js                 # Service worker and app-shell cache\n|-- manifest.json         # PWA manifest\n|-- about.html            # Product overview page\n|-- fairness.html         # Randomness and fairness explanation\n|-- help.html             # Feature guide, FAQ, and shortcuts\n|-- privacy.html          # Local-first privacy policy\n|-- support.css           # Styles for About/Help/Fairness/Privacy pages\n|-- support.js            # Shared script for support page localization and metadata\n|-- lang/                 # Translation packs\n```\n\n## How Data Works\n\n- Current wheel state, UI preferences, theme choice, and language selection are stored in the browser.\n- Saved wheel library entries are stored locally in IndexedDB.\n- Shared wheels are encoded into the URL itself, so there is no server-side storage by default.\n- Winner selection happens before animation; the wheel then animates to the selected result.\n\n## Browser Support\n\nThe app targets modern versions of Chrome, Firefox, Safari, and Edge. It depends on these browser features:\n\n- ES modules\n- Canvas 2D\n- Web Audio API\n- `crypto.getRandomValues()`\n- Service Worker\n- IndexedDB\n\n## License\n\nMIT. See `LICENSE`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsatianco%2Fspin-the-wheel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falsatianco%2Fspin-the-wheel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsatianco%2Fspin-the-wheel/lists"}