Sudoku
A browser-based Sudoku app with on-device puzzle generation, daily challenges, global leaderboard, hints, notes, and GitHub/Google sign-in. Built with React, TypeScript, and Vite.
A clean, modern Sudoku web app featuring fully client-side puzzle generation, real-time solving assistance, daily challenges, and a persistent global leaderboard with optional sign-in.
How it works
Puzzle generation
Puzzles are generated entirely in the browser using a backtracking algorithm (in lib/sudoku/generator.ts). The generator creates a complete valid solution first, then systematically removes numbers while ensuring the puzzle still has exactly one unique solution. Difficulty levels (Easy / Medium / Hard) control how many clues are left.
Solver & validation
A dedicated solver (lib/sudoku/solver.ts) and validator (lib/sudoku/validator.ts) power hint functionality and win detection. The solver uses efficient backtracking with constraint checking, while the validator ensures every placement follows standard Sudoku rules in real time.
Gameplay features
- Pencil marks / notes mode
- Smart cell highlighting (peers, same-value, selected)
- Timer, hint counter, and scoring system
- Pause/resume
- Daily challenge with streak tracking
Leaderboard & authentication
Completed solves are submitted to a backend (Cloudflare Pages Functions + D1). Scores factor in time and hint penalties. Sign in with GitHub or Google to save personal bests and view global rankings; anonymous play is fully supported with no friction.
Screenshots