Thanks for your interest in improving Snake Game! This guide keeps contributions simple and consistent.
- Open issues (bugs, ideas, questions)
- Improve UI/UX (canvas visuals, accessibility, responsiveness)
- Add features (power-ups, obstacles, themes, touch controls)
- Refactor/cleanup and small fixes
- Docs (README, comments, examples)
git clone https://github.com/debugfest/snake-game.git
cd snake-game
npm install
npm run devUseful scripts:
npm run dev # Start dev server (Vite + HMR)
npm run build # Production build
npm run preview # Preview build
- Fork the repo and create a feature branch:
git checkout -b feat/short-description # or fix/short-description, docs/short-description - Make focused changes and commit with clear messages:
- type(scope): short summary
- Example:
feat(game): add pause/resume with P key
- Push your branch and open a Pull Request (PR).
- TypeScript + React 18
- Prefer readable names, small components/hooks, early returns
- Keep comments only for non‑obvious logic
- Tailwind CSS for styling around the canvas UI
- No unused variables/parameters (ESLint is strict)
- Components under
src/components/ - Hooks under
src/hooks/ - Game helpers and constants under
src/utils/ - Types under
src/types/
- Runs locally:
npm run dev - Lints clean:
npm run lint - Type checks:
npm run typecheck - No unrelated file changes
- Screenshots/GIFs for visual changes (optional but helpful)
- Description explains the why + what
Please include:
- What happened vs. expected behavior
- Steps to reproduce
- Environment (OS, browser)
- Screenshots/GIFs if visual
By contributing, you agree your contributions are licensed under the repository’s MIT license.
Thanks again for helping make Snake Game better!