* 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.
ADR 0012 states the launch bar, the deferred error tracking/metrics/log
shipping with a concrete revisit trigger for each, and the accepted risk of
journald plus off-box backups.
The verification page walks the #162 checklist against a local MIX_ENV=prod
build with forced failures: Postgres stopped, missing tablebase, empty pool,
expired tokens and exhausted guest budget. 14 rows pass, 6 fail; the eight
regressions are filed in #171. The audit's X1 row is corrected: an unknown
play code already returns the styled 404 page.
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.
Records 35 states across play, sessions, accounts, mailing list, site-level, data and admin surfaces, each with its trigger, today's copy, a verdict and a concrete action. Calls out the five places where an internal detail can reach rendered HTML, and closes with the sign-off checklist for #164.
Adds the stop-Phoenix drill to the runbook, using forced probe runs so the
outage stays under a minute, and a dated drill log with the first run's
results. The log notes that the manual probe was started twice during the
outage, which is why two notifications arrived for one down/up transition.
* Record that Bot Fight Mode is off
Both docs still claimed Bot Fight Mode was enabled. It is off; the Caddy
origin allowlist stays in force. Neither CI nor the on-box probe can get
past it on the free plan, so re-enabling needs the changes tracked in #153.
* Note that the probe must be installed to two places
The timer runs /usr/local/sbin/chesstrainer-probe, not the copy under
/opt/chesstrainer/src. Say so next to the install block, as the backup
section already does, so a changed deploy/probe does not silently drift
from what the timer runs.
* 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.
The VPS now takes a daily logical dump, verifies it, encrypts it, and hands
it to a workstation; a monthly drill proves the archive restores.
- deploy/backup: pg_dump -Fc plus pg_dumpall --globals-only, pg_restore -l
and globals-role checks before anything is promoted, row counts for the
drill, sha256, age encryption into offsite/, retention (3d plaintext,
14d encrypted, 5 pre-deploy sets), JSON logging and a healthchecks.io
heartbeat
- systemd service and timer (03:15 UTC, Persistent, jittered) plus an
OnFailure unit that logs a distinct event
- deploy/activate takes a pre-deploy dump after extracting and before
flipping current, because migrations run in ExecStartPre; a failed dump
aborts the activation, with SKIP_PRE_DEPLOY_BACKUP=1 as the escape hatch
- deploy/workstation/backup-pull: rsync the encrypted archives over SSH,
verify by decrypting and checking the inner sha256, retain 7d/4w/6m, and
fail when the newest archive is older than 48h
- deploy/workstation/backup-drill: restore the newest archive into a
throwaway postgres:18.6, replay the globals dump as the same superuser,
assert both roles, compare users/endgames/attempts, and append the result
to drills.log
- user units for the daily pull and monthly drill, with a shared OnFailure
alert template
- docs: install, key handling, retention, restore, disaster recovery, a run
by hand section, monitoring and troubleshooting
Verified against production: the first backup completed and pinged the
heartbeat, the pull verified the archive, and the drill restored
users=1 endgames=39 attempts=0, matching the live database.
* 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
* static pre-release page
* 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.