mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 03:32:06 +00:00
Privacy and terms pages with config-driven branding (#91)
* 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)
This commit is contained in:
@@ -2,6 +2,7 @@ defmodule ChesstrainerWeb.PageController do
|
||||
use ChesstrainerWeb, :controller
|
||||
|
||||
alias Chesstrainer.Attempts
|
||||
alias Chesstrainer.Branding
|
||||
alias Chesstrainer.DailyPuzzles
|
||||
alias Chesstrainer.Endgames
|
||||
|
||||
@@ -13,7 +14,7 @@ defmodule ChesstrainerWeb.PageController do
|
||||
|
||||
conn
|
||||
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|
||||
|> assign(:page_title, "Lucid Chess — Endgame Trainer")
|
||||
|> assign(:page_title, Branding.home_title())
|
||||
|> assign(:title_suffix, "")
|
||||
|> assign(:meta_description, @description)
|
||||
|> assign(:canonical_url, current_url(conn))
|
||||
@@ -25,4 +26,27 @@ defmodule ChesstrainerWeb.PageController do
|
||||
today: Date.utc_today()
|
||||
)
|
||||
end
|
||||
|
||||
def privacy(conn, _params) do
|
||||
conn
|
||||
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|
||||
|> assign(:page_title, Branding.title("Privacy Policy"))
|
||||
|> assign(:title_suffix, "")
|
||||
|> assign(
|
||||
:meta_description,
|
||||
"How #{Branding.name()} collects, uses, and protects your personal data."
|
||||
)
|
||||
|> assign(:canonical_url, current_url(conn))
|
||||
|> render(:privacy)
|
||||
end
|
||||
|
||||
def terms_conditions(conn, _params) do
|
||||
conn
|
||||
|> assign(:js_entry, ~p"/assets/js/marketing.js")
|
||||
|> assign(:page_title, Branding.title("Terms & Conditions"))
|
||||
|> assign(:title_suffix, "")
|
||||
|> assign(:meta_description, "The terms that apply when you use #{Branding.name()}.")
|
||||
|> assign(:canonical_url, current_url(conn))
|
||||
|> render(:terms_conditions)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="progress-banner" id="progress">
|
||||
<%!-- <section class="progress-banner" id="progress">
|
||||
<div>
|
||||
<span class="section-kicker">A calmer way to improve</span>
|
||||
<h2>
|
||||
@@ -85,5 +85,5 @@
|
||||
<.pill_button variant={:light} navigate={play_path(@active_endgame)}>
|
||||
Begin with the basics <.icon_arrow />
|
||||
</.pill_button>
|
||||
</section>
|
||||
</section> --%>
|
||||
</main>
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
<Layouts.flash_group flash={@flash} />
|
||||
|
||||
<main>
|
||||
<article class="legal">
|
||||
<h1>Privacy Policy</h1>
|
||||
<p class="legal-meta">Last updated: 6 November 2026</p>
|
||||
|
||||
<p>
|
||||
{Branding.name()} is an endgame training site. This policy explains what
|
||||
information we collect when you use it, why we collect it, and the choices
|
||||
you have. It covers the website and every page under it, including the
|
||||
guest trainer.
|
||||
</p>
|
||||
|
||||
<h2>What we collect</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Account details.</strong>
|
||||
If you register, we store your username, email address, and a hashed
|
||||
password. We never store passwords in plain text.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Training activity.</strong>
|
||||
We record the puzzles you attempt and whether you solved them, so we can
|
||||
show your progress and keep the daily puzzle meaningful.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Technical data.</strong>
|
||||
Our hosting and server infrastructure may keep standard request logs
|
||||
(IP address, browser, timestamps) for security and troubleshooting.
|
||||
These logs are rotated regularly.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Messages you send us.</strong>
|
||||
If you contact us, we keep the message and our reply for as long as
|
||||
needed to help you.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>Cookies and local storage</h2>
|
||||
<p>
|
||||
We use a small number of cookies and local storage entries that are
|
||||
required for the site to work:
|
||||
</p>
|
||||
<ul>
|
||||
<li>a session cookie that keeps you signed in;</li>
|
||||
<li>a CSRF token that protects forms from cross-site requests;</li>
|
||||
<li>a colour-mode preference stored in your browser.</li>
|
||||
</ul>
|
||||
<p>
|
||||
We do not use advertising cookies, third-party analytics, or cross-site
|
||||
tracking. You can clear these entries at any time in your browser
|
||||
settings; doing so will sign you out and reset your colour mode.
|
||||
</p>
|
||||
|
||||
<h2>How we use your information</h2>
|
||||
<ul>
|
||||
<li>To create and secure your account and sign you in.</li>
|
||||
<li>To run the trainer and remember your progress.</li>
|
||||
<li>To send service emails, such as confirmation and password reset links.</li>
|
||||
<li>To keep the site available, prevent abuse, and fix faults.</li>
|
||||
<li>To respond when you ask for help.</li>
|
||||
</ul>
|
||||
<p>
|
||||
We rely on our contract with you to provide the service, our legitimate
|
||||
interests in keeping it secure and improving it, and your consent where we
|
||||
ask for it. You can withdraw consent at any time.
|
||||
</p>
|
||||
|
||||
<h2>Guest puzzle limit</h2>
|
||||
<p>
|
||||
Visitors who use the guest trainer without an account get a limited number
|
||||
of free puzzles per UTC day. To enforce that limit and prevent abuse, we
|
||||
identify each visitor by a keyed hash (HMAC-SHA256) of their IP address.
|
||||
The limiter itself never stores, logs, or shares the raw address.
|
||||
</p>
|
||||
<p>
|
||||
The hash exists only in the memory of the server that handled your request.
|
||||
It is tied to the current UTC day, stops being usable at 00:00 UTC, and is
|
||||
deleted by a periodic sweep shortly afterwards; it is also discarded when
|
||||
the server restarts. It is never written to a database, a log, or a
|
||||
backup, and no cookie or other client-side storage is involved. Signed-in
|
||||
accounts are not metered this way.
|
||||
</p>
|
||||
<p>
|
||||
We process this hash on the basis of our legitimate interests
|
||||
(Article 6(1)(f) GDPR) in keeping the service available and preventing
|
||||
abuse of the free tier. We do not share it with anyone. You have the right
|
||||
to object to this processing; to do so, contact us using the address below.
|
||||
</p>
|
||||
|
||||
<h2>Sharing</h2>
|
||||
<p>
|
||||
We do not sell your personal information. We share it only with providers
|
||||
who help us run the site — for example hosting, database, and email
|
||||
delivery providers — and only as far as they need it to perform that work.
|
||||
We may also disclose information where the law requires it or to protect
|
||||
the rights and safety of our users.
|
||||
</p>
|
||||
|
||||
<h2>Retention</h2>
|
||||
<p>
|
||||
We keep account and training data while your account is open. If you
|
||||
delete your account, we remove your personal information within a
|
||||
reasonable period, except where we must keep records for legal, security,
|
||||
or accounting reasons.
|
||||
</p>
|
||||
|
||||
<h2>Your rights</h2>
|
||||
<p>
|
||||
Depending on where you live, you may have the right to access, correct,
|
||||
delete, restrict, or export your personal information, and to object to
|
||||
some uses of it. To make a request, contact us using the address below. If
|
||||
you are in the UK or EU and are unhappy with our response, you can complain
|
||||
to your local data protection authority.
|
||||
</p>
|
||||
|
||||
<h2>Children</h2>
|
||||
<p>
|
||||
The service is not directed at children under 13, and we do not knowingly
|
||||
collect their personal information. If you believe a child has created an
|
||||
account, contact us and we will remove it.
|
||||
</p>
|
||||
|
||||
<h2>Changes</h2>
|
||||
<p>
|
||||
We may update this policy as the service changes. When we do, we will
|
||||
change the date at the top of this page and, for significant changes,
|
||||
notify signed-in users by email or on the site.
|
||||
</p>
|
||||
|
||||
<h2>Contact</h2>
|
||||
<p>
|
||||
Questions about this policy or your data can be sent to <a href={"mailto:" <> Branding.support_email()}>{Branding.support_email()}</a>.
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
@@ -0,0 +1,118 @@
|
||||
<Layouts.flash_group flash={@flash} />
|
||||
|
||||
<main>
|
||||
<article class="legal">
|
||||
<h1>Terms & Conditions</h1>
|
||||
<p class="legal-meta">Last updated: 6 November 2026</p>
|
||||
|
||||
<p>
|
||||
These terms govern your use of {Branding.name()}. By browsing the site, using
|
||||
the guest trainer, or creating an account, you agree to them. If you do not
|
||||
agree, please do not use the service.
|
||||
</p>
|
||||
|
||||
<h2>The service</h2>
|
||||
<p>
|
||||
{Branding.name()} provides short endgame puzzles and training tools. Some
|
||||
features are available without an account; others, such as saved progress
|
||||
and the full puzzle list, require you to register. We may add, change, or
|
||||
remove features over time.
|
||||
</p>
|
||||
<p>
|
||||
The guest trainer is limited to a fixed number of puzzles per UTC day,
|
||||
which we may change. The limit is enforced as described in our <a href="/privacy">Privacy Policy</a>.
|
||||
</p>
|
||||
|
||||
<h2>Accounts</h2>
|
||||
<ul>
|
||||
<li>You must be at least 13 years old to create an account.</li>
|
||||
<li>Give accurate information and keep it up to date.</li>
|
||||
<li>Keep your password private and tell us promptly about unauthorised use.</li>
|
||||
<li>You are responsible for activity that happens under your account.</li>
|
||||
<li>Do not share, sell, or transfer your account to someone else.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Acceptable use</h2>
|
||||
<p>You agree not to:</p>
|
||||
<ul>
|
||||
<li>break the law or infringe anyone else's rights;</li>
|
||||
<li>interfere with the site, its servers, or other users;</li>
|
||||
<li>attempt to gain access to accounts or data that are not yours;</li>
|
||||
<li>scrape, crawl, or bulk-download the site without our permission;</li>
|
||||
<li>copy, resell, or redistribute the service or its content;</li>
|
||||
<li>use the service to send spam or malicious code.</li>
|
||||
</ul>
|
||||
|
||||
<h2>Our content and your licence</h2>
|
||||
<p>
|
||||
The site, its design, text, and software are owned by {Branding.name()} or its
|
||||
licensors and are protected by copyright and other laws. We grant you a
|
||||
personal, non-exclusive, non-transferable licence to use the service for
|
||||
your own training. You may not reproduce, modify, distribute, or create
|
||||
derivative works from our content without written permission.
|
||||
</p>
|
||||
<p>
|
||||
Chess positions and puzzle data are drawn from public sources and
|
||||
tablebase material. You may use the training output for your own study,
|
||||
but not to build a competing product.
|
||||
</p>
|
||||
|
||||
<h2>Your data</h2>
|
||||
<p>
|
||||
You keep ownership of the information you provide. You give us permission
|
||||
to store and use it as described in our <a href="/privacy">Privacy Policy</a>
|
||||
so that we can run the service.
|
||||
</p>
|
||||
|
||||
<h2>Paid plans</h2>
|
||||
<p>
|
||||
Some features may be offered as part of a paid plan. Prices, billing
|
||||
periods, and cancellation terms will be shown before you purchase. Unless
|
||||
the law requires otherwise, payments are non-refundable once a billing
|
||||
period has started. We may change prices with reasonable notice.
|
||||
</p>
|
||||
|
||||
<h2>Availability and changes</h2>
|
||||
<p>
|
||||
We aim to keep the site available, but we do not guarantee uninterrupted
|
||||
access. Maintenance, faults, or circumstances outside our control may
|
||||
interrupt it. We may suspend or discontinue the service, in whole or in
|
||||
part, with reasonable notice where practical.
|
||||
</p>
|
||||
|
||||
<h2>Disclaimer</h2>
|
||||
<p>
|
||||
{Branding.name()} is an educational tool. We do not promise that using it will
|
||||
improve your rating or results, and puzzle solutions are provided for
|
||||
training purposes only. The service is provided "as is" to the extent
|
||||
permitted by law.
|
||||
</p>
|
||||
|
||||
<h2>Limitation of liability</h2>
|
||||
<p>
|
||||
To the extent permitted by law, {Branding.name()} is not liable for indirect or
|
||||
consequential losses, loss of data, or loss of profits arising from your
|
||||
use of the service. Nothing in these terms limits liability that cannot be
|
||||
limited by law, including for death, personal injury, or fraud.
|
||||
</p>
|
||||
|
||||
<h2>Termination</h2>
|
||||
<p>
|
||||
You may stop using the service and delete your account at any time. We may
|
||||
suspend or close an account that breaches these terms, that we reasonably
|
||||
believe is being misused, or where we are required to do so by law.
|
||||
</p>
|
||||
|
||||
<h2>Governing law</h2>
|
||||
<p>
|
||||
These terms are governed by the laws of France. Any dispute
|
||||
will be handled by the courts of France, unless the law where
|
||||
you live gives you the right to bring it elsewhere.
|
||||
</p>
|
||||
|
||||
<h2>Contact</h2>
|
||||
<p>
|
||||
Questions about these terms can be sent to <a href={"mailto:" <> Branding.support_email()}>{Branding.support_email()}</a>.
|
||||
</p>
|
||||
</article>
|
||||
</main>
|
||||
Reference in New Issue
Block a user