No description
  • JavaScript 45.9%
  • HTML 37.2%
  • CSS 16.9%
Find a file
2026-01-17 20:49:24 +00:00
public feat: display existing personal best on the win screen when no new record is set. 2026-01-17 12:46:26 +00:00
src feat: Implement core Sudoku game logic, UI components, and project setup. 2026-01-17 11:58:31 +00:00
docker-compose.yml Updated Trilium note header 2026-01-17 20:49:24 +00:00
README.md feat: Implement core Sudoku game logic, UI components, and project setup. 2026-01-17 11:58:31 +00:00

🧩 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

  1. Clone or navigate to the directory:

    cd Sudoku
    
  2. 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 public
    

    Using Node.js (if available):

    npx serve public
    
  3. 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.

  1. Start the container:

    docker-compose up -d
    
  2. 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 the public folder.
  • 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.html and style.css files.

Built with ❤️ by Antigravity. Enjoy the game!