* lesson library shown as com,ing soon. re-enable learngin strip
* replace learning strip text with a lasker quote
* remove admin login endpoint
* fix crawler directives and prelaunch login
- noindex the authenticated scope and the 404 catch-all, and cover the
mailing-list confirmation redirect
- emit noindex, nofollow from the robots meta and /health, and assert
public pages stay indexable and followable
- stop inventing lastmod values in the sitemap
- log in through /users/log-in during prelaunch now that the admin login
endpoint is gone; drop create_admin/2 and its orphaned tests
* update caching length to 1 year - name change will invalidate cache
* remove logger
* fix tablebase path breaking tests
* test: check cache headers without requiring built assets
CI's test job does not run mix assets.build, so /assets/css/app.css is a
404 there. Committed piece art is already content-hashed and takes the same
Plug.Static cache option, so the test no longer needs a build step and
passes on a fresh checkout.
* Send transactional email from no-reply@mail.innersquare.app
Centralise the sender identity, reply-to address and SES configuration set in Chesstrainer.Mail so no notifier can drift. Add MAIL_REDIRECT_TO for smoke tests and a mix mail.check task that exercises the SES mailbox simulators, and document the setup in the deploy guide and .env.example.
* Tighten crawler metadata and keep play pages out of search
Canonical URLs no longer carry query strings, public pages get an OG image, WebSite JSON-LD and a per-page language, and the sitemap dates the landing page only. Play and guest-training routes are marked noindex so tens of thousands of near-identical pages stay out of the index.
* Measure built asset sizes with mix assets.sizes
Report raw, gzip and brotli sizes for built JS and CSS, and record the current numbers plus the board-code split recommendation in docs/assets.md.
T8: the invalid-FEN flash is generic; the client message and FEN go to the
log. A2: an expired confirmation link says so and lands on log-in, where an
unconfirmed account resends the email. W3: the connection banner gains Reload
and Home actions. D1: a failed export logs and redirects to the data tab with
a support address instead of a bare 500. D2: an unknown export format renders
the styled 404. H1: the empty-database home CTA points at the guest trainer
instead of auth-gated /endgames. X2/X3: the importer hides inspect(reason)
behind generic copy and logs it.
Adds coverage for the T8 copy, A2 destination, D2 404 page, H1 CTA and the W3
actions; the H1 tests now restore the curated-code override so async page
tests cannot poison each other.
Tablebase failures now render one message per class, with a Retry action
when fetching again can help. The generic class no longer interpolates
inspect(reason) into the page; the reason goes to the log instead.
Positions outside the tablebase offer the next puzzle (in a session) or the
existing back link, rather than a futile retry.
Train's no-puzzles and exhausted-difficulty flashes become in-page states
with Retry and Change difficulty. The guest pool gets the same treatment,
and GuestLimits.remaining/1 lets a guest see the wall, or the empty pool,
without spending a puzzle.
* move theme picker position in add endgames form
* Add branded favicons and web manifest
- Replace the placeholder favicon with the knight mark: .ico (16/32/48),
SVG, and 16/32 PNGs.
- Add opaque apple-touch and Android launcher icons plus a site
webmanifest naming the app and using the brand palette.
- Link the icon set, manifest, and theme-color from the root layout and
the 404/500 pages.
- Whitelist the new static files in static_paths/0 and the prelaunch
allowlist so they are served in production and behind the gate.
- Sync the coming-soon site's favicon.ico and drop the unused Phoenix
logo.
* Add a public health probe and monitoring runbook
Probe https://<PHX_HOST>/health through Cloudflare every two minutes and
report to a healthchecks.io check. A healthy run posts the raw health JSON;
a tablebase mismatch is a green check-in with the mismatch recorded; a
non-200, non-JSON, down database or network failure posts one fail ping with
the response body and a loopback cross-check as evidence.
--dry-run evaluates the success, degraded, fail, non-JSON and unreachable
fixtures without reading config or touching the network. The runbook covers
the healthchecks.io check, install, what /health proves, Beszel's blind spot
and the drills.
* Fix theme picker search after moving it into the endgame form
The picker moved inside the endgame form, which nested the component's
own <form>. Browsers, and the LiveView test DOM, drop a nested form along
with its phx-change and phx-submit bindings, so the search box did nothing
and three form tests lost their #theme-form selector.
The component now renders no form: phx-change sits on the search input,
which works both inside the endgame form and standalone on the bulk
importer. The unreachable create_theme_from_search handlers go away; theme
creation uses the existing button. Tests search through the input and
click that button.
* change position of theme picker
* Add admin bulk FEN importer
Paste FENs, resolve results from the local Syzygy tablebase only, preview each line's status, and bulk insert with themes and a batch rating.
* Show rating changes in flashes and session UI (#146)
- Flash the new rating and delta on every rated completion, with a
dedicated success flash kind for solved puzzles
- Move flash notifications to the top-left
- Add a colour-coded rating-change pill and show the current rating with
the session's net change in the train session bar
- Show the user's rating and change beside the puzzle rating after an
attempt, and show the finishing rating in the last-session summary
* fix header component and start reusing it
* Hide the sign-up link on the prelaunch admin login
The header refactor dropped the @prelaunch guard, so the gated admin login linked to the public registration page again.
* Document the remote shell for production user management
* add sitemap to footer links
* remove border under theme selection
* Add admin theme and user management (#144)
Add /admin/themes CRUD and /admin/users list/detail with role and plan editing, guarded by a shared Policy module. Include last-super-admin and self-role protections plus structured id-only admin logs.
Also add admin invitations, confirmation resends and password-reset emails, which work in development through the Swoosh mailbox before SES is configured.
* Rate-limit password logins and emit auth events (#142)
Add a two-bucket login throttle (5 failures per login, 10 per IP in a 15-minute window) and a shared client-address helper for controllers and LiveViews. Blocked attempts skip the database and bcrypt.
Log auth.login.failed and auth.login.throttled warnings with boot-scoped HMAC addresses only, and stop repeated confirmation emails on unconfirmed login attempts.
* Harden the production login edge for Cloudflare
Document the layered login defence: the app throttle is primary, Caddy must pass Cloudflare's CF-Connecting-IP to the app, and Cloudflare edge rate limiting covers request floods.
Update the reference Caddyfile to accept only Cloudflare ranges and reject direct-to-origin traffic, and document the exact Cloudflare dashboard rules.
* Document 10-second Cloudflare rate-limit window
Cloudflare may only offer a 10-second period. Keep the edge rule at 10 login POSTs per 10 seconds per IP and rely on the app's 15-minute login/address throttle for credential guessing.
* Document Cloudflare limits for LiveView registration
Registration submits over the shared LiveView socket, so a Cloudflare rule on POST /users/register will not count account creations. Note the app-level throttle/Turnstile options instead.
* Document current Cloudflare free-plan edge controls
Record the production setup: Cloudflare-only Caddy origins, Bot Fight Mode, and the 10-second login flood rule (10 POSTs per 10 seconds, 10-second block). Clarify that the application's 15-minute throttle remains the real credential lockout.
* Auto-refresh Cloudflare CIDRs for Caddy
Move the origin allowlist into a generated cloudflare-ranges.caddy imported by Caddy. Add an hourly systemd timer and script that fetch Cloudflare's v4/v6 lists, reject malformed responses, validate the candidate Caddyfile, and reload Caddy only when the ranges change. Restore the previous file on validation or reload failure.
* Document Cloudflare CIDR refresher setup and operations
Record the installed paths, permissions, timer checks, manual run, update procedure, and the direct-on-VPS setup fallback when the deploy directory is absent.
* Update README.md
* Add structured JSON production logging (#105)
* Log requests and background failures (#107)
* Document production logging and the VPS runbook
- Add /mentions-legales (LCEN art. 6-III): publisher, SIRET, VAT status,
publication director, and host details
- Name the data controller in the privacy policy and the terms
- Disclose Hetzner/Cloudflare hosting, third-country transfers, the CDN
security cookie, and backup/suppression-list retention
- Remove the children section; the age floor now lives in the terms
- State that request logs are kept by the providers, not by us
- Mirror all changes in the pre-launch static site
The publisher address is a placeholder pending a domiciliation address.
* commented out lesson and learning strip until lessons are established
* reword the hero section
* change layout and working on puzzle section - remove top div as it was
redundant
* amend flash message on replay
* switch cancel session for return home
* remove system theme toggle since this is the default, leaving only light
and dark toggles
* add keyboard and screen reader support for play (#72)
First draft covering the accessibility work in #72:\n\n- labelled SAN/UCI move input, validated against the tablebase and applied\n by the board hook, plus an accessible promotion picker\n- live-region announcements for moves, checks, checkmates and solve/fail,\n and a hidden text summary of the position\n- accessible labels, focus ring, skip link, keyboard-friendly review table\n and non-colour grade cues\n- WCAG AA text contrast roles and a responsive play surface\n- regression tests for move entry, announcements and link-style CTAs
Serve a runtime sitemap.xml with the indexable marketing pages only; endgame play pages are left out to avoid indexing tens of thousands of near-identical pages. Generate robots.txt at runtime so it points at the sitemap on the deployment's host, and send X-Robots-Tag: noindex from every /admin response.
Count distinct users with a session token valid within the 14-day window and use it for the hero players-training stat. The learning strip keeps the total player count.
Also load the split seed modules in seeds_test and drop an invalid 8-piece seed FEN so precommit passes.
* engine 8+ tablebase adr
* Show tablebase moves during review (#65)
- group reviewed moves by winning/drawn/losing and make each row playable
- move review navigation under the board with start/end jumps
- give review a full-height scrollable tablebase pane
* comment out begin with basics until lessons are on the way
* route to footer link dead views
* proposed >7 piece engame processing
* basic privacy and terms pages with default text
* add branding to config and reference across the site
* disclose guest puzzle limit in privacy policy (#87)
* add anonymous guest training with a daily puzzle limit
- /guest-train serves random endgames with no difficulty picker; signed-in
visitors are redirected to /train
- guests get 5 puzzles per UTC day, keyed by an in-memory HMAC of the client
address; the raw address is never stored or logged
- a sign-up wall replaces the next puzzle once the budget is spent
- move the endgame library behind auth so guests cannot browse it
- privacy disclosure tracked in #87
* remove chess-test endpoint and liveview
- point Puzzle Search at the endgames list
- list the signed-in username after Settings and Log out
- replace the footer's landing anchors with privacy and terms links
- align the landing-page test with the new footer
- /train starts an ephemeral session by choosing easy/medium/hard, banded
relative to the user's current rating (band width configurable)
- session timer, average per-puzzle time, net rating gain and per-puzzle delta
- next puzzle, plus review and retry reused from the play surface
- explicit stop/start: stopping returns to the difficulty picker
- puzzle rating shown once a puzzle completes, and a side-to-move indicator
- extract the play logic/markup into shared PlayCore and PlayComponents so the
standalone play view and sessions share one implementation
- sticky footer; glossary entries for Difficulty and Session; ADR 0009
* remove daisyui and rebuild styles
* very basic setup of new design - missing components etc
* basic navbar with reusable landing components
* basic puzzle of the day
* update todos
* update todos
* add curated landing puzzle cards with selectable board (#55)
* update with footer
* add button to solve today's puzzle
* Make landing page a dead view
Render the home page from PageController with a static board preview, link puzzle cards and CTAs to public-code play routes, count puzzles from the DB, and add a global footer.
* Serve a marketing-only JS bundle on the landing page
Build a small marketing entry point with phoenix_html and the plain-DOM navbar, select it on controller-rendered pages, and keep the full LiveView bundle for LiveView pages.
* Add landing page SEO metadata
Replace the Phoenix default title with a descriptive Lucid Chess title, and add description, canonical, Open Graph, and Twitter card tags to the landing page.
* Complete the hero copy block
Add the spark icon primitive and the Endgames, made clear eyebrow. The primary CTA keeps linking to the active puzzle rather than scrolling to the board.
* Add a persisted global daily puzzle
Assign one endgame per UTC day in a daily_puzzles table with a unique date, preferring endgames unused in the last 30 days and falling back to any. Concurrent first requests insert with on-conflict-ignore and read the winning row. The landing board now shows the daily puzzle.
* remove unused CSS, nav links, time pill
* allow devices to connect to dev server by changing IP address to 0.0.0.0
* Restore the colour-mode switch and add a dark palette
* Use brand colour tokens on the play page
* self host fonts - closes issue #62
* begin splitting CSS into modules
* remove hover on hero chessboard, split more css modules
* remove interactivity from hero chessboard
* update todo
Player-facing endgame links now use a 10-character Crockford base32 public code instead of the database UUID; admin routes keep the UUID. Existing rows are backfilled by migration, and the admin Show page displays and copies the code.
The admin endgame index gains its own search box: exact database id, exact public code, or a FEN / FEN fragment. A single match opens the endgame; multiple matches list below; nothing found says so.
Closes#44Closes#45
- Scaffold password auth (email or username) with phx.gen.auth; no magic links
- Add role (member/moderator/admin/super_admin) and plan (free/premium) enums
- Gate /admin behind admin-or-above via plug + on_mount; hide the nav link
- Add mix accounts.promote for CLI role changes
- Disable email confirmation by confirming accounts at registration
Closes#3
Read the local Syzygy directory from TABLEBASE_PATH so a dev machine and a VPS can point at their own copies. Add mix tablebase.fetch (downloads the 3/4/5 WDL+DTZ set, resumable) and mix tablebase.check (verifies it loads), plus a boot log reporting whether local tablebases are ready and the largest piece count.
Covers the codeable part of #31; installing on the VPS and setting TABLEBASE_PATH there remains a manual step.
Add Backend.Fathom: probes positions with five or fewer pieces via the Fathom NIF, maps WDL/DTZ to the trainer structs (flipping per-move perspective), generates SAN, sorts moves best-first, and falls back to Lichess on any failure. The local directory is configured with TABLEBASE_PATH; local answers are no longer cached.
Add Tablebase.normalize_wdl/1 and flip/1, plus tests for the WDL mapping, SAN, checkmate, fallback, and a cache-free end-to-end local probe.
Vendor the MIT-licensed Fathom C source and compile it into a Rustler NIF (native/fathom_nif). The NIF exposes init/1 (point Fathom at a tablebase directory) and probe/1 (raw WDL/DTZ/move results for a FEN); probes are serialised because Fathom's root probe is not thread safe, and run as dirty NIFs.
Add KRvK/KQvK 3-piece WDL+DTZ fixtures and an integration test proving a known KRvK probe returns Win, DTZ 23 and 15 moves.
Add FEN.position_key/1 (board, side, castling and en-passant; clocks dropped) and have Tablebase.new/1 key cache reads and writes on it, so transpositions and clock-only differences share an entry. The Lichess category is a position property, so dropping the clocks is safe.
Update the cache docs and tests, and give the play fixture's after_first/after_losing distinct positions since they previously differed only by the halfmove clock.
Add a Backend behaviour, a Lichess implementation, and a Router that picks a backend by piece count: five or fewer to the local slot, six or seven to the remote slot, and eight or more short-circuited as not covered with no network call. Both slots point at Lichess for now; the local Syzygy backend replaces the local slot when it lands.
Map :not_covered to the existing 'not covered by the tablebase' message.
Drop dtm/dtc from Tablebase and Tablebase.Move; the local Syzygy backend cannot produce them and nothing reads them. The Lichess parser now maps only category, checkmate and moves (with per-move category, dtz, san and uci), and the struct-shape tests follow.