8000 GitHub - gandazgul/daybook: Twelve daily logic puzzles, offline play, guided tutorials, and unlimited practice. Built with Phaser, TypeScript, Vite, and Deno. · GitHub
[go: up one dir, main page]

Skip to content
gandazgulPublic

About

Twelve daily logic puzzles, offline play, guided tutorials, and unlimited practice. Built with Phaser, TypeScript, Vite, and Deno.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Daybook

A quiet collection of fourteen daily logic puzzles, with unlimited practice, guided tutorials, and offline play. Built with Phaser 3, TypeScript, Vite, and Deno 2; the puzzle boards, illustrations, menus, and controls are drawn in the game engine.

Play Daybook · MIT License

  • A fresh daily collection: one puzzle of each kind, a rotating featured game, and a calendar showing started and completed days.
  • Unlimited practice: generate another puzzle whenever you want, independently of daily progress.
  • Install and play offline: a phone-friendly PWA with on-device puzzle generation and locally saved daily progress.
  • Learn the rules: first-visit tutorials for all fourteen games, replayable from each puzzle page. Every tutorial starts with a finished example; highlights explain each rule.
  • Two kinds of hints: preview one revealed move or an explained logical deduction in any daily or practice puzzle. Hints run locally and work offline.
  • Comfortable night play: warm paper and dim night themes, larger readable labels, gentle touch feedback, and an optional timer. Completed puzzles remain visible beside or above the next-puzzle controls.
  • No account, points, or streaks: solving time is recorded, with no leaderboard, sounds, or cross-device profile.

Playfields sit directly on the background without an outer rounded container. Both Sudokus use nearly full-width phone boards, larger digits, and 2px gaps between cells and 4px gaps between 3 × 3 boxes, with no solid grid lines or outer frame. Killer retains its larger cage totals and clear dashed cage outlines. Phaser renders at device pixel density (up to 3×) for clear text and lines on phone screens.

The games

Game Goal Board
Pipes Rotate pipes to connect every tile and endpoint to the water source without leaks 5 × 5–9 × 9
Atoms Match each atom's required bonds using one or two lines between adjacent atoms; connect the whole network 4 × 4
Regional Queens Place one queen per row, column, and region; queens cannot touch, even diagonally 6 × 6–8 × 8
Shikaku Cover the grid with one clue per rectangle; match optional areas and square, wide, or tall shape clues 6 × 6–8 × 8
Number Path Visit numbered dots in order along one path that fills every square exactly once 5 × 5
Balance Place three of each shape per row and column, with no three consecutive identical shapes; satisfy = and × clues 6 × 6
Sets Find exactly three different sets: each feature must be all the same or all different across three cards 8 cards
Dosun-Fuwari Place one supported balloon and one supported weight in each region 6 × 6
Nurikabe Make numbered islands of exact sizes, with one clue each, surrounded by connected water with no solid 2 × 2 water blocks 5 × 5–9 × 9
Akari Illuminate every white square with bulbs; bulbs cannot shine on each other; satisfy neighboring-bulb counts on black squares 6 × 6
Five Cells Partition the grid into connected groups of five; clues count bordering sides, including the outer frame 5 × 5
Mosaic Shade squares so every clue matches the shaded cells in its surrounding 3 × 3 area, including itself 6 × 6
Mini Sudoku Place 1–6 once in each row, column, and 2 × 3 box; one difficulty with at most ten starting digits 6 × 6
Battleships Find a fleet of straight ships from row/column totals; ships never touch, even diagonally 6 × 6 or 8 × 8
Galaxies Divide the grid into connected regions with one circle each, symmetric under a half-turn around that circle 5 × 5 or 7 × 7
Sudoku (practice) Place 1–9 once in each row, column, and 3 × 3 box 9 × 9
Killer Sudoku Follow Sudoku rules and satisfy cage totals, without repeating digits inside a cage 9 × 9

Sets uses muted sage, clay and lavender cards with three shapes, counts and fills. Each generated board is exhaustively checked to contain exactly three sets among its eight unique cards; every card participates, and one card is shared by two sets. Found cards stay available. Tap a found trio below the board to review it. Smart hints explain the four feature checks; reveals record one new set after preview.

Five Cells and Mosaic are practice-only in current collections. Akari replaces Five Cells in the daily slot from September 14, 2026. Older calendar dates retain Five Cells and its saved progress; Mosaic never counts toward daily completion. All seventeen games are available in practice. Regular 9 × 9 Sudoku leaves the daily collection from October 4, 2026; earlier dates and practice keep it unchanged.

Completion is checked against each game's rules. Battleships, Mini Sudoku, Galaxies, Sudoku, Killer Sudoku, Regional Queens, Shikaku, Balance, Mosaic, Dosun-Fuwari, Nurikabe, Five Cells, Akari, and rated Pipes have solver-checked unique solutions. Original Pipes, Atoms, and Number Path are generated from valid constructions and accept any valid solution.

Regional Queens uses the regional placement rules, so queens do not attack along an entire chess diagonal. Balance does not require different rows to have unique patterns. Atoms connects only orthogonally adjacent grid cells. Mosaic is a gentler Fill-a-Pix variant: numbered squares start with their correct shading locked; empty marks on other squares are optional aids and unshaded squares can stay blank. Unused Dosun-Fuwari squares can stay blank.

Quality guards reject Shikaku boards where every rectangle is immediately forced, Dosun-Fuwari boards solved just by filling each ceiling and floor, and Mosaic boards with fewer than four shaded cells left to find. Bounded fallbacks satisfy the same checks and have unique solutions. These guards apply to practice and daily boards from September 12, 2026; earlier daily layouts and saved progress stay unchanged. Mosaic is available in practice and does not count toward daily completion.

Shikaku practice boards and daily boards from September 20, 2026 favor blocks at least two cells wide and tall, covering at least 75% of the grid. Rectangles have 2–9 cells; thin strips are limited to two or three cells as fillers, and single-cell regions are excluded. At most one rectangle has nine cells. Layouts are staggered: four rectangles never meet at a corner, and no straight internal border spans the board. At least half the clues have multiple candidate rectangles before the other clues resolve them, and every puzzle has a unique solution. The bounded fallback meets the same checks. Earlier daily boards stay unchanged.

Akari generates 6 × 6 boards with connected lines of light blocked by black squares. Every board has one solution and at least four bulbs to find. Generation and clue removal both verify uniqueness; a bounded, verified fallback keeps generation available offline. Numbered black squares constrain orthogonally adjacent bulbs, including zero clues. Unnumbered walls only block light. Lit cells use a warm tint; conflicting bulbs and impossible numbered clues turn red. Optional X notes are never required for completion. Smart hints explain clue counts, illuminated exclusions, and the only remaining place that can light a square; reveal hints show one bulb or clearing move.

New Nurikabe Easy and Original boards and Easy practice boards contain at most one single-square island, including fallback boards. Published boards keep their original clues and saved progress; the September 25–October 4 snapshots may still have up to two.

Nurikabe Easy and Original boards from September 11, 2026, and new Easy practice boards include at least one island larger than 1, including the generation fallback. Earlier daily boards remain unchanged to preserve saved progress. All new boards still have a solver-checked unique solution.

The additional rules references are Nikoli's Dosun-Fuwari, Nurikabe, and Five Cells, and Akari. Daybook's generators, wording, and Phaser drawings are independently implemented.

Install and play offline

Daybook is an installable Progressive Web App. Open it online once and wait for Available offline beneath the collection. Every puzzle is generated on your device, so today's collection, practice, and the calendar work without a connection after the app is cached. Progress remains in localStorage; there is no account or server download needed for each day's puzzles.

  • Android / Chrome: use Install Daybook below the collection, or the browser's Install app menu item.
  • iPhone / iPad: open the site in Safari, use Share → Add to Home Screen, and keep Open as Web App enabled if shown. (Apple's installation guide)
  • Open the installed app online once too, and check for Available offline before leaving your connection. Browser and installed-app storage can be separate, so check your progress there.

The production build generates a versioned service worker that caches the complete app shell and install icons. It never caches health checks or third-party requests. Updates download in the background when online, on returning to the app, and once a minute while it is visible. A complete new shell activates immediately; the app saves the open puzzle and reloads into the new release. The same daily or practice puzzle reopens with its entries, notes and elapsed time. Old app caches are removed only after the new shell has downloaded successfully; failed downloads keep the working offline version. HTML, service-worker and other unversioned responses forbid browser/CDN caching; hashed game assets stay cacheable. Existing installations from before this updater may need one online refresh to start using it. Saved puzzle progress is preserved across updates. Clearing browser/site data also removes the offline cache and progress, and browsers may evict stored data when device space is low.

Installation requires HTTPS (localhost also works for testing). Development mode does not register a service worker, keeping local edits fresh. To test offline support, run deno task build followed by deno task start, open port 8000 online, wait for the offline-ready message, then disconnect and reopen the app. See MDN's caching guide.

Guided rules tutorials

Each game's first visit on a device opens a short, step-by-step tutorial. Daily and practice share the same per-game flag in local storage (daybook:tutorials:v1:<kind>). Finishing or skipping marks that tutorial as seen; leaving before either lets it appear again next time. The Tutorial button on every puzzle page replays it, including completed puzzles.

Every tutorial starts with a labeled finished example on a separate board, so players can see the goal before learning the rules. Each following step explains a rule or control and highlights its relevant cells, clues, regions or edges. Nurikabe also uses teaching boards to show allowed corner touches and forbidden patterns, then returns to the current puzzle. Other games return to the current board after the finished example. Tutorials never read the current puzzle’s solution, suggest a move, or edit progress. Solving time pauses throughout. Use Previous/Next, the arrow keys, or Enter to advance; Skip or Escape returns to the puzzle. The board stays visible beside or above the instructions, in either theme. If local storage is unavailable, the seen flag lasts for the current session only.

Hints

The Hint button on every unfinished daily and practice puzzle offers two choices:

  • Smart hint: applies logical rules to the visible clues and current entries, explains one forced placement or elimination, and highlights the relevant squares. It never reads the hidden answer. Existing entries and optional marks are treated as assumptions; detected contradictions are explained. When the implemented rules cannot prove a deduction, it says so.
  • Reveal move: shows one cell, bond, boundary, rectangle, or path step from a generated solution. This is explicitly an answer reveal. Games with multiple solutions may have other valid moves. Any required path backtracking or replacement of overlapping rectangles is described first.

Both choices show a proposed move on a preview board before Apply move changes progress. Close returns without edits. Applying a move creates one undo step while the puzzle remains unfinished, prunes conflicting Sudoku notes, saves daily progress, and checks completion. Solving time pauses while hints are open. Hints are computed on the device, work offline, and require no prewritten puzzles, AI service, account, or network calls.

Logical rules include Sudoku singles and cage totals, Mosaic clue counts and overlapping areas, Queens exclusions, Balance constraints, pipe orientation constraints, bond capacity, Shikaku rectangle candidates, legal path continuations, island boundaries, supported pieces, possible five-square groups, and Akari illumination and neighboring-bulb counts. They do not yet constitute a complete logical solver for every position.

Daily collection and practice

  • Each local calendar date deterministically seeds each puzzle. The same date, game, difficulty, and generator version produce the same board on every device.
  • Dosun-Fuwari, Nurikabe, and Five Cells join daily collections from September 9, 2026. Earlier dates show eight daily games. September 9–10 show eleven; Sets joins the daily collection on September 11, 2026. Akari replaces Five Cells on September 14, keeping twelve daily games. All fourteen games are available in practice, including Five Cells and Mosaic. Mosaic never counts toward the daily total. Existing saved puzzle identifiers are unchanged.
  • From October 4, 2026, Mini Sudoku replaces regular Sudoku; Galaxies and Battleships join the daily collection, bringing it to fourteen games. Earlier lineups and published puzzle files are preserved. Mini Sudoku and Killer Sudoku close the daily collection; regular Sudoku remains in practice.
  • The featured game rotates through the kinds available on that date. Puzzles generate on demand, so an unattended server needs no cron job.
  • The calendar allows past dates and prevents future-day play. A day is complete when all games available on that date are finished. Partial completion and started days have markers.
  • Practice uses a fresh random seed on every opening and never changes the daily calendar. Practice state exists only for the current browser session.
  • Entries, pencil notes, completion timestamps, and accumulated solving seconds are saved in localStorage. Daily progress resumes after reload. Undo/redo history is session-only. There is no cross-device sync or server-side profile.
  • Time stops on completion, while a hint, tutorial, pause, rules, or settings dialog is open, while the tab is hidden, and when leaving the puzzle. A hidden tab requires resuming.
  • At midnight, the collection updates to the new day; an open puzzle stays on its original date so current work is not interrupted.

Published boards are fixed JSON snapshots in src/archive/, covering every date from September 1–October 5, 2026, all fourteen kinds, Original boards, and every difficulty supported at capture time. The calendar starts in September 2026. Archived boards and their daily default difficulties load from this bundled data, including offline; later dates and practice use only the current generators. Old generator implementations and date-based quality switches have been removed. The existing daybook:v1:progress storage keys remain unchanged, so entries, notes, time, and completion survive.

Before a future generator or template-bank change, use the currently published, unchanged source and run deno task archive YYYY-MM-DD through the latest date players can already access. Include tomorrow when time zones or a rollout crossing midnight could expose it. This appends daily snapshots with the source Git revision, never overwrites existing ones, and refreshes the import index. Then edit the current generator, run the checks, and ship the snapshots with the change. The command refuses to export new days after source edits. No daily server job or growing collection of historical algorithms is needed; only the small puzzle data accumulates. Missing published archived boards fail to load rather than silently regenerate against a different algorithm. Newly introduced Shikaku and Nurikabe variants are available as alternatives on older dates. Published alternatives absent from the initial daily snapshots are frozen separately in src/archive/alternatives.json; the archive command captures these before a bank changes, without replacing existing boards or daily files. Easy alternatives preserve the frozen Original board.

Clearing browser data also clears your puzzle history. If storage is blocked, the collection shows that progress is temporary.

Completed puzzles remain visible, with the success message and next-puzzle button beside the board on desktop or below it on smaller screens.

Difficulty

Pipes, Shikaku, Nurikabe, Number Path, Regional Queens, Balance, Sudoku, and Killer Sudoku support Easy / Medium / Hard in daily play and practice. From September 19, 2026, the daily defaults are:

Game Daily default Easy Medium Hard
Pipes (from October 5) Medium 5 × 5, neighboring-pipe deductions 7 × 7, network connectivity deductions 9 × 9, candidate contradiction trials
Shikaku (from October 2) Hard 6 × 6, classic numbered rectangles 7 × 7, mixed number/shape clues 8 × 8, mostly shape-only clues
Nurikabe (Medium from October 3; Hard on October 2) Medium 5 × 5, at most one 1-cell island 7 × 7, at most one 1-cell island 9 × 9, one or two 1-cell anchors
Number Path (from September 25) Hard 5 × 5, 6 dots 7 × 7, 12 dots 7 × 7, 12 dots and 10 walls
Regional Queens Hard 6 × 6, single available squares 7 × 7, combined unit exclusions 8 × 8, candidate contradiction trials
Balance Hard Direct shape counts, triples, and = / × clues Compatible row and column patterns Candidate contradiction trials
Sudoku Easy Naked and hidden singles Naked pairs and locked candidates Candidate contradiction trials
Killer Sudoku Easy Singles and last-cell cage sums Cage combinations, pairs, and locked candidates Candidate contradiction trials

Pipes defaults to 7 × 7 Medium from October 5, 2026. Earlier dates keep Original, and existing Original saves and explicit difficulty choices still resume without changing the board. All three levels keep the familiar rotation and source highlighting; wrapping is not included. Easy solves from board boundaries and neighboring pipe shapes; Medium requires additional network deductions (connections that are the only route between sections, or that would isolate a section); Hard additionally requires candidate contradiction trials. Each level has 32 original, solver-verified unique templates, varied by rotation/reflection and fresh scrambling. Every template has at least two orientations fixed by the boundary, and at least 40% of tiles start rotated away from their solution. These are ratings under the implemented deductions, not measured human solving times. Smart hints use visible shapes and the same deductions, without reading the answer. The offline authoring script is scripts/build-pipes-bank.ts; archive published boards before replacing its bank. New rated alternatives are available on historical dates without changing their Original boards.

Nurikabe Easy (5 × 5) and Medium (7 × 7) contain at most one 1-cell island; Hard (9 × 9) contains one or two, providing starting anchors. Two Hard anchors are separated by at least five orthogonal steps. Other Medium islands contain 2–5 cells, with at least one of size 4 or 5; other Hard islands contain 2–6 cells, with at least one of size 5 or 6. These limits apply to new dates beyond the archive and new practice boards; published daily boards keep their previous layouts, including their old singleton counts. The daily defaults to Medium from October 3; explicit difficulty choices and saved progress are retained. Completing any level still earns the day's credit. At least 70% of Medium/Hard clues initially allow more than one connected island shape. These are structural difficulty profiles, not ratings based on human solving times or a guarantee that a particular advanced technique is required. Each level has 32 original, verified templates, rotated/reflected and varied by up to four bounded, uniqueness-checked clue relocations. Failed or exhausted checks revert to the verified template. The solver grows islands from their clues and checks both water connectivity and the no-pool rule. scripts/build-nurikabe-bank.ts authors the templates offline; archive published boards before replacing its output. Original archives and saves remain available.

Number Path levels increase the board size and introduce walls that the path cannot cross. Walls leave a complete solution available; hints and saved paths respect them. Original daily boards through September 24, 2026 remain unchanged. Its levels describe board features, not solver ratings.

Shikaku keeps its current numbered generator as Easy. Medium and Hard use square (equal sides), wide (strictly wider than tall), tall (strictly taller than wide), and unrestricted clues. The unrestricted symbol is two overlapping squares and permits any rectangle, including a square; it never permits an irregular shape. A clue may have a number, a shape, or both. Numbered clues fix the area; shape-only clues leave the area to be deduced from neighboring regions and coverage. Every rectangle contains exactly one clue, and every cell must be covered exactly once.

Medium withholds at least 30% of areas; Hard withholds at least 60%, on a larger board. These levels describe board size and available information, rather than a claimed logical technique rating. Each starts from one of 32 verified templates per level, rotates/reflects (swapping tall and wide when needed), and tries at most 12 clue-position edits that preserve uniqueness and at least half the clues having multiple initial rectangle choices. Bounded exact-cover checks explicitly reject search-budget exhaustion. The existing staggered-partition preferences remain: areas 2–9, at most one nine-cell block, at least 75% block coverage, small strip fillers, no full-board seams or four-way corners. The authoring tool is scripts/build-shikaku-bank.ts.

Shape symbols and a legend appear on the board. Illegal drawings explain the mismatched area or orientation. Smart hints combine clue reach and shared coverage without reading the answer, and reveal hints still place one whole rectangle. Tutorials show a separate finished shape-clue example. Original archived Shikaku boards remain playable; Easy uses those same number-only boards as alternatives on archived dates. Medium/Hard alternatives are newly introduced rather than existing published boards. From October 2 the daily default is Hard; an existing Original save still resumes.

Balance stays 6 × 6; regular Sudoku and Killer Sudoku stay 9 × 9. Their ratings, and those for Queens, describe the logical techniques required, not measured human solving times. Rating solvers use visible constraints only, never the stored answer. Every rated board has a unique solution; Hard needs at least one candidate trial beyond Medium deductions, using contradiction proofs without recursive guessing.

From September 25, 2026, Easy Sudoku and Killer Sudoku are calibrated for relaxed play. Regular Sudoku targets 42 starting digits, at least 6 immediately available single-candidate cells, and at least 2 rows, columns, or boxes with just one blank. Killer targets 36 starting digits, at least 6 direct opening moves, and at least 4 multi-cell cages with just one blank. The generator removes digits only while the entire board remains solvable with single-candidate cells and last-cell cage totals; it may retain extra givens to keep those guarantees. Each board still has one solution. This applies immediately to new practice boards; older daily boards and saves, along with Medium and Hard generation, retain their existing behavior.

Queens starts from 16 verified boards per level, changes connected region boundaries while checking uniqueness and rating, then rotates, reflects, and relabels regions. The three number/shape games start from 24 verified boards per game and level, apply rule-preserving symmetries, and make bounded clue edits that retain the exact rating. Sudoku also permutes digits, bands, stacks, and rows/columns within them. Killer only uses grid symmetries and digit complementing, preserving connected cages and their sums. The offline authoring tool is scripts/build-difficulty-bank.ts; it writes to a separate output file. Before changing published banks or algorithms, snapshot all accessible dates with the archive command above. The difficulty-v1 seed namespace stays stable; historical board data preserves saved identities without retaining the old algorithm.

Open a daily puzzle and use Easy / Medium / Hard · Change to choose another level. Each date and level keeps its own board, entries, notes, time, and completion. Finishing any level earns that game's daily credit and counts toward the day's achievement; finishing more levels still counts once. Resetting an unfinished or completed level does not erase credit earned at another level. The last chosen level resumes for that date. Tomorrow starts with that game's default, independently of the chosen level today or in practice.

Published Queens picks from September 15–18 retain their original date-seeded levels. Earlier Queens dates and pre-September-19 dates for the other three games retain their Original boards, with rated levels available as alternatives. Existing Original saves also resume after an update, even on a newer date. Original boards are not retroactively labeled as a rated tier.

Practice asks for a level before opening these eight games, remembers it separately for each game, and keeps it for Another of these. Practice progress remains session-only and separate from the daily calendar. The difficulty chooser pauses the timer; auto-update snapshots include the current level. Smart hints explain their supported deductions and can report that no deduction was found on harder boards; Reveal move remains available at every level.

Night play and controls

Night mode is selected on first use between 7 pm and 7 am, using the device's clock. The header theme button switches between warm paper and dim night colors; your choice is remembered. The timer is visible by default. Hide it by tapping it or using puzzle settings; when hidden, no placeholder is shown and solving time is still recorded. Settings let you show it again and reset the current board. No flashing effects, celebration animations, sounds, leaderboards, streaks, or urgency cues are used. Touches receive a brief, muted ring that gently expands and fades. With the system’s reduced-motion setting, this becomes a stationary highlight.

  • Sudoku / Killer: tap a cell, then use the keypad or 1–9. N toggles notes; Backspace/Delete clears. Fixed clues cannot be edited. Conflicting digits are highlighted without revealing the answer. Drag across cells to select several and automatically enable notes. A keypad digit adds that note to every selected empty cell, or removes it when they all already contain it. Existing answers and fixed clues stay intact during bulk note entry. Each batch is one undo step. Tap a cell or use an arrow to return to a single selection; turning notes off also selects one cell. Automatically enabled notes return to number entry when the selection drops to one or no cells. Notes that were already enabled stay on. Placing an answer removes notes that conflict with written numbers in the same row, column, box, or Killer cage. Undo restores the entry and its removed notes together. Double-tap or double-click a cell with exactly one note to fill its number, even with notes on. Digits with nine placed copies turn gray and cannot be entered from the keypad or keyboard; clearing or undoing an entry enables them again.
  • Pipes: tap to rotate clockwise.
  • Atoms: tap midway between two atoms to cycle no bond → one line → two lines. With a keyboard, select an atom with arrows, then Shift + an arrow cycles its bond.
  • Regional Queens: click or tap to mark a large X. Drag from an empty cell to add Xs, or from an X to erase Xs. The starting cell sets the mode for the entire stroke. Double-click or double-tap to place a queen. Tap a mark to clear it. Dragging preserves queens and is undone as one action. With a keyboard, arrows select and Space cycles the marks.
  • Sets: tap three cards to check them, tap again to deselect. Find three distinct trios; cards can be reused. Keys 1–8 toggle cards, arrows move focus, Space selects, Backspace clears selection.
  • Balance / Mosaic: tap to cycle an editable cell’s three states. Mosaic’s numbered squares have fixed shading; only the unnumbered squares are editable. It finishes when shaded squares satisfy every clue; empty marks are optional. Mosaic clues turn red for excess shading, or for too little shading once their whole neighborhood is decided. Untouched areas stay neutral; edges count only on-board cells.
  • Shikaku: drag between opposite corners, or tap two corners. Tap a placed rectangle to remove it. Releasing outside the grid or canvas finishes at the last cell reached on the grid. Invalid rectangles are rejected with a short message.
  • Number Path: drag or tap adjacent cells. Tap an earlier path cell to backtrack.
  • Dosun-Fuwari: tap to cycle balloon → weight → empty. Rocks are fixed; unused squares stay blank. Balloons are white balloon shapes; weights are black with a wider base, in both themes. Arrows and Space work too.
  • Nurikabe: tap to cycle sea → island dot → clear. Numbered cells are fixed land. Mark all other cells to finish; arrows and Space also work.
  • Five Cells: tap an internal grid edge to add/remove a border. Drag along grid lines to draw or erase several borders as one undoable action. The outer frame is fixed. With a keyboard, arrows select a cell and Shift + an arrow toggles its shared border. Groups of five gain a tint.
  • Akari: tap a white square to cycle bulb → X note → empty, or select with arrows and press Space. Black squares are fixed. Bulbs light their row and column until a wall; Xs are optional.
  • All puzzles: U or Ctrl/Cmd+Z undoes; Ctrl/Cmd+Shift+Z redoes. Escape pauses. Arrows select cells and Space activates them. Tab cycles menu controls; Enter activates the focused control. Wheel or touch-drag scrolls the collection.

The layout adapts to phones and desktop windows. Region letters supplement color. Canvas controls have keyboard navigation and a live text announcement region; this is not yet a full screen-reader grid interface.

Run locally

Install Deno 2, then:

deno install --frozen
deno task dev

Open Daybook locally. The development server uses port 5198 with strict port checking. To select a different port:

deno task dev --port 5200
deno task check  # TypeScript and lint
deno task test   # Generation, uniqueness, validation, dates, and persistence
deno task build  # Checked, optimized production build
deno task start  # Production server on port 8000

Host with a container

podman build --format docker -t daybook .
podman run --rm --name daybook --read-only --cap-drop=ALL \
  --security-opt=no-new-privileges --memory=256m -p 8000:8000 daybook

Open Daybook on port 8000. compose.yaml is also available for Compose-compatible tooling.

To build on Apple Silicon for an amd64 host, add --platform linux/amd64 to the build command. Tag the resulting image for your registry and push it using podman push.

For Kubernetes, expose container port 8000 through a Service and your HTTPS Ingress. Use /healthz for readiness and liveness probes. The server supports running as UID/GID 1000 with a read-only filesystem and all Linux capabilities dropped. A 256 MiB memory limit passed the container smoke test, including amd64 emulation on Apple Silicon.

The multi-stage image builds with Deno, then runs a small dependency-free Deno static server as a non-root user. Compose makes the filesystem read-only and drops Linux capabilities. /healthz is the health endpoint. Put your normal HTTPS reverse proxy in front for a public domain. There are no backend data volumes or scheduled generation jobs to maintain. PORT configures the server's listen port; Compose's published port must match if you change it.

Structure

  • src/main.ts: Phaser scenes, responsive engine UI, input, themes, and timers.
  • src/puzzles.ts: deterministic generators, constraint solvers, validators.
  • src/extra-puzzles.ts: generators, solvers, and validators for the three added games.
  • src/puzzle-archive.ts / src/archive/: fixed daily boards and historical default difficulties.
  • scripts/archive-puzzles.ts: append snapshots before replacing a published generator.
  • src/akari.ts: Akari generation, uniqueness solver, lighting, conflicts, and rule validation.
  • src/input.ts: Sudoku note cleanup and Queens tap/double-tap and drag gesture state.
  • src/hints.ts: local deductions and one-move reveals with preview explanations.
  • src/tutorial-boards.json: fixed finished teaching boards, independent of playable puzzles.
  • src/tutorials.ts: rules walkthroughs, visible-board highlights, and device first-visit flags.
  • src/pwa.ts: installation prompts, service worker registration, and offline status.
  • src/service-worker.js: offline cache lifecycle; Vite injects the build hash and asset list.
  • public/manifest.webmanifest / public/icons/: phone installation metadata and icons.
  • src/storage.ts: dates, feature rotation, durations, and local persistence.
  • tests/: generation, validation, persistence, gesture, note, and tutorial regression coverage.
  • server.ts: production static server, cache headers, and health endpoint.
  • Dockerfile / compose.yaml: standalone container hosting.

Potential next additions: Nonograms (picture logic) and Slitherlink (one continuous loop). They fit the same daily format; they are suggestions, not part of the current collection.

Framework references: Vite with Deno and Phaser scaling.

Verification

The current code passes 116 regression tests, TypeScript checking, lint, and a production build. Run the maintained checks with deno task check, deno task test, and deno task build.

The regression suite covers deterministic generation, uniqueness where required, rule validation, dates and progress storage, Sudoku note cleanup, Queens gestures, tutorial flags, and highlight bounds. Finished examples and Nurikabe’s teaching boards are checked by the same validators as the games. Tutorial and smart-hint tests prevent access to hidden puzzle solutions. Hint coverage checks sound deductions against valid completions, explicit correction previews, and progressive reveals for every game. Mosaic save migration preserves existing marks and elapsed time.

Browser checks cover tutorials at phone, landscape, and desktop sizes; first visits, replay, daily/practice flags, paused time, and unchanged puzzle progress. Input checks include Sudoku multi-cell notes and single-note double taps, disabled completed digits, undo/redo, touch feedback, and saved daily completion. Hint checks cover both modes, preview isolation, paused time, apply/undo, responsive layouts, and offline use; Mosaic checks cover locked clues and completion without empty marks.

Production PWA checks cover Chrome installability, offline reload and browser restart, saved progress, automatic upgrades with daily/practice resume, failed-update recovery, and cache cleanup. Physical iPhone installation has not been verified on a device.

The Dockerfile has been built and tested with Podman for linux/amd64 on Apple Silicon. The container passes health and asset checks with a non-root user, read-only filesystem, dropped capabilities, and a 256 MiB memory limit. Deployment checks verify the running image, public assets, and offline loading.

License and third-party software

Daybook is released under the MIT License, copyright 2026 Carlos Ravelo.

The puzzle generators, interface, and rule descriptions are independently implemented. The project uses established puzzle mechanics and is not affiliated with other puzzle publishers. No screenshots, artwork, or puzzle collections from other games are included.

Third-party notices preserve the MIT licenses for Phaser, EventEmitter3, and the Vite build tool. Each production build also emits dependency-licenses.txt with notices for bundled dependencies. The Deno runtime is distributed separately; see its license.

Mini Sudoku and Galaxies (October 4, 2026)

Mini Sudoku has 6 × 6 cells, 2-row × 3-column boxes, digits 1–6, and no difficulty chooser. Its seeded generator removes clues while retaining a unique solution, leaving at most ten givens. Notes, multi-selection, double-tap entry, conflict checks, hints, undo/redo and keypad completion use six digits and rectangular boxes. Existing regular Sudoku practice boards and levels are unchanged.

Galaxies follows the rules at https://www.puzzle-galaxies.com/. Easy maps to 5 × 5 Hard, Medium (the daily and practice default) to 7 × 7 Normal, and Hard to 7 × 7 Hard. These are locally authored boards, not copies of that site's puzzle bank or its private difficulty algorithm. Each tier has 24 unique templates plus rotations/reflections. Normal boards solve through symmetry, center ownership and connected reachability; Hard templates require additional candidate trials under that solver. Regenerate the bank with deno run --allow-write=src/galaxies-bank.json scripts/build-galaxies-bank.ts.

Draw or erase borders by tapping/dragging grid lines, or use arrows and Shift+arrow. Each connected region must have exactly one circle and 180° rotational symmetry. Circles can be in cells, on edges or at corners. Dangling internal cuts and split circles are invalid. Completed regions gain color. Smart hints use only visible centers and drawn walls; answer reveals are separate. Difficulty levels have independent progress and contribute one shared daily credit.

Battleships (October 4, 2026)

Battleships follows the solitaire rules at https://www.puzzle-battleships.com/. Easy is 6 × 6 Easy, Medium (the default) is 6 × 6 Hard, and the provisional Hard tier is 8 × 8 Hard. Each tier contains 24 locally authored, solver-checked unique boards plus rotations and reflections. The site’s private rating algorithm is not reproduced: Easy boards solve through local totals, revealed parts, straightness and no-touching deductions; Medium and Hard require reasoning about possible fleet placements. The six-cell fleet is one length-three ship, two length-two ships and three submarines. The eight-cell fleet is one length-four, two length-three, three length-two and three submarines.

Drag from a blank cell to paint water, or from water to erase water marks. Both preserve existing ships and fixed clues. A tap cycles blank → water → ship → blank. Double-click or double-tap places a ship directly, with both taps merged into one undo step. Dragging cannot accidentally place a ship when starting on water; each stroke is one undo step. Arrows and Space offer keyboard entry. Water marks are optional for completion. Revealed submarine, end and middle clues remain fixed, and the fleet legend stays visible during play. Hints use only visible constraints. Water appears as blue squares and ships as black pieces; diagonally touching pieces turn red. The fleet shows valid ships / required per length: green when complete, orange when missing and red when excessive. Bent, touching and unfinished clue ships do not count. Edge totals turn red for excess ship squares or when water marks leave too few spaces to reach the target.

Zero rows and columns start filled with fixed water. Water also fills automatically in completed lines, diagonally around ships, along the sides of straight ships, around revealed submarines and behind revealed ends, and around ships as long as the largest fleet member. Only water is automated; ship placements stay editable. Derived water is tracked separately from manual marks, recomputed when ships change, saved across reloads, and included in the same undo/redo step as the move. Smart hints highlight specific conflicting entries in red and explain totals, touching pieces, revealed-part conflicts, fleet placements, overlapping possible placements and contradiction deductions. They never consult the generated answer. Published puzzle definitions are unchanged.

The bank authoring command is deno run --allow-write=src/battleships-bank.json scripts/build-battleships-bank.ts. Published archives stay unchanged, as do the other games’ seeds and storage keys.

About

Twelve daily logic puzzles, offline play, guided tutorials, and unlimited practice. Built with Phaser, TypeScript, Vite, and Deno.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0