# Leaf Arcade software license

Copyright (c) 2026 Leaf Arcade contributors.

Except where a file, directory or component carries a separate license or notice,
the original Leaf Arcade application source code is free software: you can
redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. SPDX identifier: `GPL-3.0-or-later`.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See [LICENSE](LICENSE) for the full terms.

This grant covers original application code, including browser interfaces, game
rules, integration code, build scripts and service code. It does not replace any
existing component license. In particular:

- `packages/cli/` retains its MIT license.
- The following original shared CLI inputs are also offered under the MIT terms
  in `packages/cli/LICENSE`, preserving the CLI's existing permissions:
  `lib/agents/catalog.ts`, `lib/agents/action-catalog.json`,
  `lib/agents/action-help.ts`, `lib/agents/position.ts`,
  `lib/http/retry-after.ts`, `lib/random.ts`, `lib/reversi.ts`,
  `lib/multiplayer/ids.ts`, `lib/multiplayer/chess.ts`,
  `lib/multiplayer/checkers.ts`, `lib/multiplayer/common.ts`,
  `lib/multiplayer/oware.ts`, and `lib/multiplayer/catalog.ts`.
- Third-party source, including `lib/opensupaplex/upstream/`, retains its notices.
- The browser save store, `shared/browser/file-persistence.ts`,
  `shared/browser/save-store.ts` and `lib/persistence/files.ts`, is offered under
  the GNU GPL version 2 or (at your option) any later version
  (`GPL-2.0-or-later`), so GPLv2 game builds can bundle it. Its built copy
  `public/game-storage.js` carries the same terms.
- Games, engines, emulators and their adapters under `public/` retain their
  component notices; the default applies only to otherwise unlicensed original
  Leaf Arcade code. GPLv2-only components are separate game distributions, not
  relicensed by this grant.
- Artwork, music, fonts, game data, screenshots and other non-code material are
  outside this software grant. Consult their individual notices. The name and
  logo are not granted trademark rights by this license.
- npm dependencies retain their licenses. Pinned versions and integrity hashes
  are in `package-lock.json`; full notices are in
  `public/licenses/third-party-notices.txt`.

## Public source and rebuilding

The website's Licenses & credits page links a source archive and build guide.
The archive is generated from the current application sources before every
website build, including uncommitted source changes. No GitHub account is needed.
It includes the application, build scripts, lockfile and source for the linked
chessops rules package. Large public game distributions remain separate downloads
with their own source archives. A checksummed asset manifest and restoration tool
are included to reconstruct the public files from the same deployed release.
See `public/licenses/website-source.txt` for commands and limitations.

## Scope of the software-freedom statement

Licensing our original code does not make the entire collection libre. The site
also hosts freeware/shareware and games with separately licensed data. Google
Analytics is optional and loads Google's external script only after consent;
choose Reject to avoid it. Optional account sign-in loads Clerk's hosted client.
Neither external service is covered by our license or source archive. Payments
leave the site for Stripe's hosted checkout. Some game players load external
content after Play; consult their credits. We have not certified every game,
dependency or externally delivered script as libre, or tested GNU LibreJS.
