A beautiful, interactive Sudoku game built with React and styled with Tailwind CSS. Features a stunning pink gradient design, auto-save functionality, and intuitive gameplay.
- Beautiful UI Design: Elegant pink gradient theme with smooth animations
- Auto-Save: Game state automatically saves and restores
- Multiple Input Methods: Click buttons or use keyboard (1-9, arrows, backspace)
- Game Controls: Play/pause, undo/redo, hints, reset, and new game
- Hint System: Up to 5 hints per game to help when stuck
- Timer: Track your solving time with play/pause functionality
- Validation: Real-time validation with visual feedback for invalid moves
- Responsive Design: Works perfectly on desktop, tablet, and mobile devices
- Keyboard Navigation: Full keyboard support for seamless gameplay
- Click on any empty cell to select it
- Enter numbers 1-9 using the number pad or keyboard
- Use the arrow keys to navigate between cells
- Invalid moves are highlighted in red
- Complete the puzzle by filling all cells with valid numbers
- Use hints (💡) when you're stuck (maximum 5 per game)
- Node.js (v14 or higher)
- npm or yarn
- Clone the repository:
git clone https://github.com/Tripti-09/sudoku-web-app.git
cd sudoku-web-app
cd sudoku- Install dependencies:
npm install
# or
yarn install- Start the development server:
npm start
# or
yarn start- Open http://localhost:3000 to view it in your browser.
src/
├── components/
│ ├── SudokuApp.js # Main app component
│ ├── SudokuBoard.js # Game board component
│ ├── NumberPad.js # Number input buttons
│ ├── GameControls.js # Control buttons (play, pause, etc.)
│ └── GameHeader.js # Header with title and status
├── hooks/
│ ├── useGameState.js # Game state management
│ ├── useKeyboard.js # Keyboard input handling
│ └── useLocalStorage.js # Local storage operations
├── utils/
│ ├── sudokuGenerator.js # Puzzle generation logic
│ ├── sudokuValidator.js # Validation functions
│ └── gameHelpers.js # Helper functions
├── constants/
│ └── gameConstants.js # Game constants and config
└── styles/
└── gameStyles.js # Shared styling utilities
- Puzzle Generation: Algorithmically generated valid Sudoku puzzles
- Difficulty Levels: Easy (35 clues), Medium (45 clues), Hard (55 clues)
- Real-time Validation: Instant feedback on invalid moves
- Auto-completion Detection: Automatically detects when the puzzle is solved
- Responsive Design: Optimized for all screen sizes
- Visual Feedback: Highlighted selected cells and invalid moves
- Smooth Animations: Hover effects and transitions
- Accessibility: Keyboard navigation and focus management
- Auto-Save: Game state persists between sessions
- History System: Undo/redo functionality with move history
- Timer: Accurate time tracking with pause/resume
- Hints: Smart hint system that reveals the correct numbers
- Primary: Pink/Rose gradients (#ec4899, #f43f5e)
- Secondary: Soft pinks and whites with backdrop blur
- Accent: Blue for controls, Yellow for hints, Gray for utilities
- Background: Gradient from pink-50 to rose-50
- Primary Font: System default with fallbacks
- Sizes: Responsive text sizing (sm:text-base, md:text-lg)
- Weight: Semibold for numbers, bold for buttons
- React (v18+) - Frontend framework
- Tailwind CSS - Utility-first CSS framework
- Lucide React - Icon library
- Local Storage - Game state persistence
- SudokuBoard: Renders the 9x9 grid with proper styling
- NumberPad: Provides number input interface
- GameControls: Manages game actions and controls
- GameHeader: Displays timer and game status
- Sudoku Generation: Backtracking algorithm for valid puzzle creation
- Puzzle Creation: Strategic cell removal to create solvable puzzles
- Validation: Real-time constraint checking for rows, columns, and boxes
- Multiple difficulty levels selection
- Daily challenges
- Statistics and achievements
- Theme customization
- Multiplayer mode
- Puzzle sharing
- Custom puzzle import
- Tutorial mode
- Sound effects
- Performance analytics
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Follow the existing code style
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation as needed
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by classic Sudoku puzzles
- Built with modern React patterns
- Styled with Tailwind CSS utilities
- Icons from Lucide React
If you encounter any issues or have questions:
- Open an issue on GitHub
- Check the documentation
- Review existing issues for solutions
If you found this project helpful, please consider giving it a star! ⭐
Happy Sudoku Solving! 🧩✨