GameHub is a React-based browser game collection with a single UI and multiple classic games.
- React 19
- React Router
- Tailwind CSS
- CRACO
- Lucide React
- Tic-Tac-Toe
- Checkers
- Chess
- Minesweeper
- Snake
- Flappy Bird
- 2048
- Memory Matching
- Tower of Hanoi
GameHub/
├── frontend/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── contexts/
│ │ ├── games/
│ │ ├── hooks/
│ │ ├── lib/
│ │ └── pages/
│ └── package.json
├── api/
├── tests/
├── package.json
└── README.md
- Node.js 18+
- npm
From the project root:
npm installInstall frontend dependencies:
npm --prefix frontend installRun from project root:
-
Start dev server:
npm start
-
Build frontend:
npm run build
-
Run tests:
npm test
- Snake:
W/A/S/Dto move,Enterto start - Flappy Bird:
Wor click to jump/start - 2048: Arrow keys
- Other games: Mouse-driven controls
- The project is currently frontend-focused.
- Keyboard handlers include default-scroll prevention for gameplay keys where needed.
This app can be deployed as a static frontend build (for example on Vercel, Netlify, or GitHub Pages).
This repository includes a root vercel.json configured for the current project layout:
- Install command:
npm --prefix frontend install - Build command:
npm run build - Output directory:
frontend/build - SPA rewrite to
index.htmlfor React Router routes
- Push your latest code to GitHub.
- In Vercel, click Add New Project and import this repository.
- Keep the project root as repository root (do not set
frontendas root). - Vercel should automatically use values from
vercel.json. - Click Deploy.
npm i -g vercel
vercel
vercel --prod- Ensure Install Command is not set to
npm start. - Use
npm --prefix frontend installas install command. - Re-run deployment after updating project settings.
Contributions are welcome through issues and pull requests.
MIT (or your preferred license if you add one in this repository).