8 Commits

Author SHA1 Message Date
Philip 5a12341d4c feat: Implement host authentication and settings management
Introduces a new authentication flow for the host, requiring a password to access host-specific features. This commit also adds a dedicated settings section within the host view, allowing administrators to configure essential application parameters such as the API key for AI question generation and the join URL for players.

The backend has been updated to include a new `settings` table in the database to persist these configurations. The Gemini service is refactored to accept the API key as a parameter, enhancing flexibility and security. UI components like `HostView` and `App.tsx` are modified to integrate the new authentication and settings management functionalities.

Key changes include:
- Password-based authentication for host access.
- A new settings interface for API key and join URL management.
- Database schema update with a `settings` table.
- Refactoring `geminiService` to accept API key.
- UI adjustments for login and settings screens.
2026-01-30 16:13:39 -08:00
Philip c5cf88491f feat: Integrate join URL and QR code for player access
Adds a dynamic join URL and QR code displayed on the spectator view and host dashboard. This allows players to easily join the quiz session by scanning the QR code or navigating to the provided URL.

The `joinUrl` is now managed within the `GameContext` and exposed to relevant components. The spectator view uses this URL to generate the QR code, while the host view displays it for easy access. This enhances the onboarding experience for new players and simplifies session management.
2026-01-28 19:01:34 -08:00
Philip 1939574e0f feat: Migrate to Vite build tool and lazy load components
This commit updates the project to use Vite as the build tool, replacing the previous configuration. It also implements lazy loading for the HostView, PlayerView, and SpectatorView components to improve initial load performance.

The spectator view's fastest buzzer calculation has been refactored for clarity and type safety.

Dependencies have been updated to include Vite and its React plugin. The import maps in index.html have also been adjusted to reflect the new build tool.
beta
2026-01-28 18:44:20 -08:00
Philip 77cc74a7c3 fix: Use type for type imports and literal types
Refactor `types.ts` to use `as const` for `GamePhase` and explicitly define the `GamePhase` type. This improves type safety and clarity. Additionally, update imports in other files to use `type` for type-only imports, further enhancing type safety and preventing potential runtime issues.
2026-01-28 18:07:31 -08:00
Philip ee4f3766cd feat(gemini): Add API key validation and error handling
Includes a check for the presence of the API key before initializing the Gemini AI client. Logs an error and returns an empty array if the API key is not found, preventing runtime errors and providing clearer feedback.
2026-01-28 17:49:18 -08:00
Philip c8ef03a27b feat: Update dependencies and import maps
Upgrades React to v19.2.4 and adjusts ESM import maps to ensure correct versioning and loading. Also, removes redundant API key check in geminiService.ts as it's handled at build time.
2026-01-28 17:45:32 -08:00
Philip 7cdd75ea83 feat: Initialize QuizMaster Live project
This commit sets up the foundational structure for the QuizMaster Live application. It includes:
- Initializing a new Vite project with React and TypeScript.
- Configuring project dependencies and build tools (Vite, TypeScript).
- Defining core application types for game state, players, questions, etc.
- Setting up basic Tailwind CSS for styling and defining custom animations.
- Integrating with the Google Gemini API for AI-powered question generation.
- Configuring environment variables for API keys and defining the application's metadata.
- Adding a README with setup instructions and local development guide.
2026-01-28 17:11:29 -08:00
Philip 61870f121f Initial commit 2026-01-28 17:11:10 -08:00