Add complete Hanabi multiplayer web app with GitHub Pages deployment - #1
Merged
Conversation
- Workflow builds on push to main, injects VITE_FIREBASE_* from repo secrets - Vite base set to /hanabi/ for the GitHub Pages project site URL - Switch BrowserRouter → HashRouter so /game/:id links survive hard refresh To activate: Settings → Pages → Source: GitHub Actions Then add the 6 VITE_FIREBASE_* secrets under Settings → Secrets → Actions. https://claude.ai/code/session_01NjQtiaF6QdQc9KWj1N8xUW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full multiplayer Hanabi implementation + CI/CD to GitHub Pages.
onSnapshotmain, injects Firebase config from repo secrets, deploys tohttps://risingwolf21.github.io/hanabi/Before merging — required setup
1. Enable GitHub Pages
Settings → Pages → Source → GitHub Actions2. Add Firebase secrets
Settings → Secrets and variables → Actions → New repository secretAdd all 6 secrets (values from your Firebase project's web app config):
VITE_FIREBASE_API_KEYVITE_FIREBASE_AUTH_DOMAINVITE_FIREBASE_PROJECT_IDVITE_FIREBASE_STORAGE_BUCKETVITE_FIREBASE_MESSAGING_SENDER_IDVITE_FIREBASE_APP_ID3. Firebase project setup (if not done yet)
Architecture
src/lib/types.tssrc/lib/gameEngine.tssrc/lib/firebase.ts,src/lib/firestore.tssrc/hooks/useAuth.ts,src/hooks/useGame.tssrc/components/lobby/src/components/game/(9 components)src/App.tsx— HashRouter for GitHub Pages compatibilityTest plan
https://risingwolf21.github.io/hanabi/— lobby loads/hanabi/#/game/ABCDEF→ reconnects correctly (HashRouter)https://claude.ai/code/session_01NjQtiaF6QdQc9KWj1N8xUW
Generated by Claude Code