Licenses & credits
Third-party and open-source attributions for ChessGrains. This page includes the contents of NOTICE.md from the project repository.
Algorithm SM-2 (SuperMemo World)
ChessGrains schedules flashcard reviews using an original TypeScript implementation inspired by the SuperMemo-2 (SM-2) algorithm. Per SuperMemo World's published policy, we include the following attribution:
Algorithm SM-2, (C) Copyright SuperMemo World, 1991.
ChessGrains is not affiliated with or endorsed by SuperMemo World. Newer SuperMemo algorithms are not used in this application.
react-chessboard (MIT)
Interactive chessboards are rendered with react-chessboard (MIT License). Copyright © 2022 Ryan Gregory. The full MIT license text is reproduced in NOTICE.md below.
Lichess.org (CC0 puzzles + public API)
Puzzles ship from the Lichess puzzle database, released under CC0 1.0 (public-domain dedication). Each row — FEN, solution moves, themes, rating — is imported unchanged via scripts/import_lichess.js.
When a user links their Lichess username, ChessGrains additionally calls the Lichess public API (game archive and rating history) on demand to analyse their own games. Requests carry a descriptive User-Agent per the Lichess Terms of Service and API policy.
ChessGrains is an independent tool and is not affiliated with or endorsed by Lichess.org.
Stockfish (GPLv3)
Chess analysis is powered by Stockfish (GPLv3). The Stockfish engine runs locally in your browser inside a dedicated Web Worker. You can view the full GPLv3 license text we ship alongside the engine assets.
The WebAssembly build used here is derived from the nmrugg/stockfish.js port of upstream official-stockfish/Stockfish. Corresponding source for that port is available from the same repository and release tags that match the binaries you deploy in public/stockfish.js and public/stockfish.wasm.
If you received this program as a compiled application, you may obtain the source code for the GPLv3-covered engine components from the links above, or contact the operator at hello@chessgrains.com.
NOTICE.md
# Third-Party Notices
ChessGrains is an independent project; it is not affiliated with or endorsed
by Lichess, the Stockfish team, or SuperMemo World.
This file lists third-party software and data used by ChessGrains, with
their licenses and sources. It is intended to be the source of truth
rendered by any future in-app Licenses page.
---
## Engines and analysis
### Stockfish (GPLv3)
- **What:** The Stockfish chess engine, compiled to WebAssembly by
[nmrugg / stockfish.js](https://github.com/nmrugg/stockfish.js) from the
upstream [official-stockfish/Stockfish](https://github.com/official-stockfish/Stockfish)
source.
- **Files:** `public/stockfish.js` (and `public/stockfish.wasm` at runtime).
- **License:** GNU General Public License, version 3 (GPLv3).
- **Full license text:** see `public/LICENSE-stockfish.txt` in this
repository (served at `/LICENSE-stockfish.txt`).
- **Upstream source:**
- nmrugg port: <https://github.com/nmrugg/stockfish.js>
- official-stockfish: <https://github.com/official-stockfish/Stockfish>
- **How we use it:** The engine runs entirely in the user's browser, inside
a dedicated Web Worker spawned via `new Worker('/stockfish.js')`. The
ChessGrains application communicates with the engine only through UCI text
messages (`postMessage`). No Stockfish source code is linked into the
ChessGrains application bundle.
**GPLv3 source / corresponding offer (§6):** The WebAssembly engine files
(`public/stockfish.js`, `public/stockfish.wasm`) are built from the
[nmrugg/stockfish.js](https://github.com/nmrugg/stockfish.js) project, which
in turn tracks [official-stockfish/Stockfish](https://github.com/official-stockfish/Stockfish).
You may obtain corresponding source from those repositories (and matching
release tags for the binaries you ship). The full GPLv3 text shipped with the
app is at `/LICENSE-stockfish.txt`. For source requests tied to a specific
public build of ChessGrains, contact the operator at
**[hello@chessgrains.com](mailto:hello@chessgrains.com)**.
---
## Data
### Lichess puzzle database (CC0)
- **What:** [lichess.org puzzle database](https://database.lichess.org/#puzzles).
- **License:** CC0 1.0 Universal (public domain dedication).
- **How we use it:** Puzzle rows (FEN, solution moves, themes, rating) are
imported into the ChessGrains database via `scripts/import_lichess.js`.
### Lichess public API
- **What:** Per-user game archive endpoint (`lichess.org/api/games/user/…`)
and rating-history endpoint.
- **Governing terms:** the [Lichess Terms of Service](https://lichess.org/terms-of-service)
and the [Lichess API policy](https://lichess.org/api).
- **How we use it:** On demand, for users who have linked their Lichess
username to their ChessGrains profile, to analyse their own games. Requests
are sent with a descriptive `User-Agent` identifying ChessGrains.
---
## Libraries (application code)
These libraries are bundled into the ChessGrains application at build time.
Each is used under its own permissive license; the relevant license text is
installed into `node_modules/<package>/LICENSE` by the package manager and
redistributed with the built application.
| Package | Version | License | Link |
| -------------------- | ------- | --------- | -------------------------------------------------------- |
| Next.js | 16.x | MIT | <https://github.com/vercel/next.js> |
| React / React DOM | 19.x | MIT | <https://react.dev> |
| chess.js | 1.x | BSD-2 | <https://github.com/jhlywa/chess.js> |
| react-chessboard | 4.7.x | MIT | <https://github.com/Clariity/react-chessboard> |
| Tailwind CSS | 4.x | MIT | <https://tailwindcss.com> |
| Supabase JS SDK | 2.x | MIT | <https://github.com/supabase/supabase-js> |
| Supabase SSR helpers | 0.x | MIT | <https://github.com/supabase/auth-helpers> |
| pg (node-postgres) | 8.x | MIT | <https://github.com/brianc/node-postgres> |
| csv-parser | 3.x | MIT | <https://github.com/mafintosh/csv-parser> |
| fzstd | 0.x | MIT | <https://github.com/101arrowz/fzstd> |
| node-fetch | 3.x | MIT | <https://github.com/node-fetch/node-fetch> |
| dotenv | 17.x | BSD-2 | <https://github.com/motdotla/dotenv> |
### react-chessboard (MIT)
ChessGrains renders interactive boards with
[react-chessboard](https://github.com/Clariity/react-chessboard) (MIT License).
Copyright (c) 2022 Ryan Gregory
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
## Algorithms
### SuperMemo-2 (SM-2) spaced-repetition algorithm
- **What:** ChessGrains implements a spaced-repetition scheduler inspired by
the SuperMemo-2 (SM-2) algorithm originally described by Piotr Woźniak
(SuperMemo World) in 1987.
- **ChessGrains implementation:** `src/lib/srs.ts` is an original TypeScript
implementation written for ChessGrains. It is distributed under the same
license as the rest of the ChessGrains application source.
- **SuperMemo World policy:** SM-2 may be used in other software without a
separate license fee when the following attribution is included prominently
(see also the [SuperMemo licensing notes](https://www.supermemo.com/en/blog/licensing-and-copyrighting-of-supermemo-algorithms)):
> **Algorithm SM-2, (C) Copyright SuperMemo World, 1991.**
>
> - <https://www.supermemo.com>
> - <https://www.supermemo.eu>
ChessGrains is not affiliated with or endorsed by SuperMemo World. Later
SuperMemo algorithms (SM-15, SM-17, etc.) are proprietary to SuperMemo World
and are not used in this application.
---
## Copyright
Copyright © 2026 ChessGrains. All rights reserved.
The ChessGrains application source (everything in this repository outside
`public/stockfish.*` and `node_modules/`) is proprietary. The third-party
components listed above (Stockfish, react-chessboard, the Lichess puzzle
database, SuperMemo SM-2 attribution, and the bundled npm packages) retain
their respective licenses as documented in each section.
For licensing inquiries: [hello@chessgrains.com](mailto:hello@chessgrains.com).
ChessGrains is an independent tool and is not affiliated with or endorsed by Lichess.org, the Stockfish team, or SuperMemo World.
← Back to app