How rodrigoaguspian/millonario-game works
Project type and purpose
• This is a single-page application (SPA) built with Vue.js that implements a “Who Wants to Be a Millionaire”-style quiz game.
• It has no backend service: all game logic, question data, and audio assets are bundled into the client.
File structure
• Top level:
• package.json, babel.config.js, vue.config.js – configuration for building a Vue SPA
• wrangler.toml – suggests optional deployment to Cloudflare Workers as a static site
• public/
• index.html – SPA entry point
• sounds/ – all audio assets for lifelines and feedback
• questions_template.csv – (unused at runtime; for authoring)
• src/
• main.js, App.vue – app bootstrap and root component
• components/ – individual UI pieces (GameScreen, QuestionDisplay, TimerDisplay, LifelineBar, etc.)
• services/audio-service.js – encapsulates playback logic for the various .mp3 files
• data/questions.js – the question bank loaded at runtime
README
• Standard Vue CLI instructions for serve, build, lint. No external APIs or backends mentioned.
• Confirms purely client-side; uses webpack under the hood to bundle everything.
a. Main components
• End user (player)
• Browser as runtime environment
• Vue SPA
– App.vue (root)
– GameScreen.vue (orchestrates sub-views)
– QuestionDisplay.vue, TimerDisplay.vue, PrizeScale.vue, LifelineBar.vue, OptionButton.vue
• Data layer (questions.js)
• Audio service (audio-service.js)
• Static assets (public/index.html, CSS, sounds)
• Build & deploy pipeline (npm scripts → webpack → dist → hosting or Cloudflare Worker)
b. Relationships and interactions
• Player interacts via browser UI
• App.vue loads question data into GameScreen
• GameScreen passes current question to QuestionDisplay & OptionButtons
• TimerDisplay receives tick events from GameScreen logic
• LifelineBar triggers audio cues & game-state changes via audio-service
• audio-service reads .mp3 assets and exposes play/stop methods
• npm build bundles all src/ and public/ files into a /dist folder for deployment
c. Architectural patterns & design principles
• Component-based UI (Vue) – each UI piece is a reusable component
• Service abstraction for side effects (audio playback)
• Data-driven UI – questions are loaded from a JS module
• Single responsibility per component
d. Key technologies
• Vue.js (SPA framework)
• Webpack (bundling, via Vue CLI)
• JavaScript modules (ESM)
• Cloudflare Workers (optional static-site hosting, wrangler.toml)
• npm scripts for build, serve, lint