- JavaScript 45.9%
- HTML 37.2%
- CSS 16.9%
| public | ||
| src | ||
| docker-compose.yml | ||
| README.md | ||
🧩 Premium Sudoku
A feature-rich, ultra-premium Sudoku game built with a No-Build Architecture using Preact, HTM, and CSS Variables. Designed for a sleek, responsive experience with zero dependencies required for local development.
✨ Features
- 3 Difficulty Levels: Dynamically generated puzzles for Easy, Medium, and Hard modes.
- Intelligent Input: Support for both mouse/touch and physical keyboard (including Numpad).
- Advanced Note Taking:
- Toggle Note Mode via UI or hold Shift while typing.
- Smart Note Clearing: Correct answers automatically remove conflicting notes in the same row, column, and 3x3 box.
- Mistake Tracking: 3 lives system with visual error feedback (red flash and shake animations).
- Timer & Personal Bests: Tracks completion time and saves high scores for each difficulty in your browser's local storage.
- Pause & Hide: Anti-cheat functionality that completely hides the board when the game is paused.
- Premium Aesthetics: Curated dark mode theme with glassmorphism overlays and smooth CSS animations.
🚀 Getting Started
Prerequisites
This project uses Modern ES Modules (ESM). You do not need Node.js or npm installed to run or develop this project. You only need a simple web server.
Running Locally
-
Clone or navigate to the directory:
cd Sudoku -
Start a local server: Since the project uses ES Modules, it must be served via HTTP (it cannot be opened as a raw file due to CORS restrictions on modules).
Using Python (Standard on Linux/Mac):
python3 -m http.server 8000 --directory publicUsing Node.js (if available):
npx serve public -
Play: Open your browser and navigate to
http://localhost:8000.
Running with Docker
If you prefer using Docker, a docker-compose.yml is provided to serve the game using an Nginx container.
-
Start the container:
docker-compose up -d -
Access the game: Navigate to
http://localhost:8080.
🛠 Tech Stack
- Core Engine: Preact (using the No-Build/ESM distribution).
- Markup: HTM (Hyperscript Tagged Markup) for JSX-like syntax without a transpiler.
- Styling: Pure CSS with Custom Properties (CSS Variables).
- Animations: CSS Keyframes + Canvas Confetti for victory celebrations.
- Logic: Custom backtracking algorithm for valid puzzle generation and validation.
📁 Project Structure
public/: Contains the static assets served by the web server.index.html: The main entry point containing the game engine, state management, and UI components.style.css: The "Design System" containing all HSL color tokens and visual styling.
docker-compose.yml: Docker configuration for serving thepublicfolder.src/: (Legacy/Reference) Original modular structure for Preact components.
🌍 Hosting
Because this is a static site with no build step, you can host it anywhere for free:
- GitHub Pages: Push the files and enable "Pages" in repository settings.
- Vercel / Netlify: Connect your repo; no build command required.
- S3 / Basic Web Server: Simply upload the
index.htmlandstyle.cssfiles.
Built with ❤️ by Antigravity. Enjoy the game!