From 9cb2060ef98853de15a3f0f95b17a930a70b1e15 Mon Sep 17 00:00:00 2001
From: Kkkermit <132657029+Kkkermit@users.noreply.github.com>
Date: Thu, 3 Dec 2026 14:01:00 +0000
Subject: [PATCH 1/3] feat(site): a website on GitHub Pages with downloads,
set-up and help
A static website in site/ for https://kkkermit.github.io/Statsify/: the
downloads for each system (the visitor's own picked out), the set-up guide,
the changelog from GitHub's release notes, troubleshooting with search, and
the FAQ. It's plain TypeScript and CSS with its own Vite config and a
strict CSP, in the app's colours and font, light or dark with the system.
The release list is saved while the site is built (scripts/site-releases.mjs),
so visitors' browsers never call GitHub's API. The new Website workflow
(pages.yml) builds and tests it and publishes it from main; release.yml
starts it after each release, so a new version shows up on its own.
Tests: Vitest for reading releases, picking files, detecting the system and
parsing release notes; Playwright for axe (both colour schemes, laptop and
phone), no sideways scroll from 320 px to 4K, downloads per system, the
changelog shown as text only, tabs, copy buttons, search and the menu.
Co-Authored-By: Claude Opus 5.5
Claude-Session: https://claude.ai/code/session_01TCk6t7edJdscNtTSeFmyQN
---
.github/labeler.yml | 2 +-
.github/workflows/ci.yml | 9 +-
.github/workflows/pages.yml | 94 ++
.github/workflows/release-on-main.yml | 4 +-
.github/workflows/release.yml | 10 +
.gitignore | 3 +
AGENTS.md | 23 +-
CONTRIBUTING.md | 1 +
README.md | 3 +
docs/DEVELOPMENT.md | 26 +-
docs/RELEASING.md | 18 +-
eslint.config.js | 4 +-
package.json | 7 +-
scripts/site-releases.mjs | 47 +
site/e2e/releases.json | 147 +++
site/e2e/site.spec.ts | 276 +++++
site/index.html | 1020 +++++++++++++++++
site/main.ts | 454 ++++++++
site/playwright.config.ts | 32 +
site/releases.test.ts | 242 ++++
site/releases.ts | 252 +++++
site/styles.css | 1494 +++++++++++++++++++++++++
site/vite.config.ts | 52 +
tsconfig.json | 3 +-
tsconfig.node.json | 11 +-
tsconfig.site.json | 24 +
vitest.config.ts | 2 +-
27 files changed, 4243 insertions(+), 17 deletions(-)
create mode 100644 .github/workflows/pages.yml
create mode 100644 scripts/site-releases.mjs
create mode 100644 site/e2e/releases.json
create mode 100644 site/e2e/site.spec.ts
create mode 100644 site/index.html
create mode 100644 site/main.ts
create mode 100644 site/playwright.config.ts
create mode 100644 site/releases.test.ts
create mode 100644 site/releases.ts
create mode 100644 site/styles.css
create mode 100644 site/vite.config.ts
create mode 100644 tsconfig.site.json
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 9054dbc..4499a9e 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -8,7 +8,7 @@ desktop:
# its docs or tests is still listed as a feature.
documentation:
- changed-files:
- - any-glob-to-all-files: ["**/*.md", "docs/**", "LICENSE"]
+ - any-glob-to-all-files: ["**/*.md", "docs/**", "LICENSE", "site/**"]
tests:
- changed-files:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e62b9be..590bec5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -70,10 +70,11 @@ jobs:
files=$(git diff --name-only --no-renames "$BASE" "$GITHUB_SHA"); then
echo "Changed files:"
echo "$files"
- # Markdown, docs/, the licence and the repository's settings in .github/ can't change
- # what the end-to-end tests see; this workflow can. The checks job always runs: one of
- # its tests checks every file name, docs included.
- code=$(grep -vE '\.md$|^docs/|^LICENSE$|^\.github/' <<< "$files" || true)
+ # Markdown, docs/, the licence, the website (site/, tested by pages.yml) and the
+ # repository's settings in .github/ can't change what the end-to-end tests see; this
+ # workflow can. The checks job always runs: it type-checks, lints and unit-tests the
+ # website too, and one of its tests checks every file name, docs included.
+ code=$(grep -vE '\.md$|^docs/|^LICENSE$|^\.github/|^site/|^scripts/site-releases\.mjs$' <<< "$files" || true)
if [[ -z "$code" ]] && ! grep -qx '.github/workflows/ci.yml' <<< "$files"; then e2e=false; fi
grep -qE '^src-tauri/|^\.github/workflows/ci\.yml$' <<< "$files" || rust=false
fi
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
new file mode 100644
index 0000000..6a4323f
--- /dev/null
+++ b/.github/workflows/pages.yml
@@ -0,0 +1,94 @@
+name: Website
+
+# Builds the website in site/ (downloads, changelog, set-up guide, troubleshooting and FAQ), tests
+# it, and publishes it on GitHub Pages. The page reads the releases from a list saved while it is
+# built (scripts/site-releases.mjs), so it is built again whenever the site changes on main and
+# after every release: release.yml starts this workflow once it has published one. Pull requests
+# that change the site build and test it without publishing.
+#
+# One-time set-up: Settings → Pages → Source: GitHub Actions (docs/RELEASING.md).
+on:
+ push:
+ branches: [main]
+ paths:
+ - "site/**"
+ - "public/favicon.svg"
+ - "public/logo.svg"
+ - "public/apple-touch-icon.png"
+ - "docs/screenshots/**"
+ - "scripts/site-releases.mjs"
+ - "package-lock.json"
+ - ".github/workflows/pages.yml"
+ pull_request:
+ paths:
+ - "site/**"
+ - "public/favicon.svg"
+ - "public/logo.svg"
+ - "public/apple-touch-icon.png"
+ - "docs/screenshots/**"
+ - "scripts/site-releases.mjs"
+ - "package-lock.json"
+ - ".github/workflows/pages.yml"
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+concurrency:
+ # A newer build replaces one still running, but a publish already under way finishes.
+ group: pages-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+ build:
+ name: Build and test the website
+ runs-on: ubuntu-latest
+ timeout-minutes: 15
+ steps:
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
+ with:
+ persist-credentials: false
+ - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
+ with:
+ node-version-file: .nvmrc
+ cache: npm
+ - run: npm ci
+ - name: Save the release list
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ run: node scripts/site-releases.mjs
+ - run: npm run site:build
+ - name: Install Playwright's browser
+ run: npx playwright install --with-deps --only-shell chromium
+ - name: Test the website (axe accessibility, layout from phone to 4K, downloads, changelog)
+ env:
+ SITE_PREBUILT: "1"
+ run: npm run site:test
+ - name: Upload screenshots of failed tests
+ if: failure()
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
+ with:
+ name: site-test-failures
+ path: test-results/
+ retention-days: 7
+ - name: Package the website for Pages
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
+ uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
+ with:
+ path: site/dist
+
+ publish:
+ name: Publish to GitHub Pages
+ needs: build
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ permissions:
+ pages: write
+ id-token: write
+ environment:
+ name: github-pages
+ url: ${{ steps.deploy.outputs.page_url }}
+ steps:
+ - id: deploy
+ uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
diff --git a/.github/workflows/release-on-main.yml b/.github/workflows/release-on-main.yml
index e4fb8b5..7ea7d3d 100644
--- a/.github/workflows/release-on-main.yml
+++ b/.github/workflows/release-on-main.yml
@@ -56,8 +56,10 @@ jobs:
needs: check
if: needs.check.outputs.release == 'true'
permissions:
- # Creating the tag and the release (only release.yml's publish job uses it).
+ # Creating the tag and the release, then starting the Website workflow (only release.yml's
+ # publish job uses them).
contents: write
+ actions: write
uses: ./.github/workflows/release.yml
with:
tag: ${{ needs.check.outputs.tag }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 94a58b6..61a358a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -147,6 +147,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
+ # Starting the Website workflow (pages.yml) once the release is out.
+ actions: write
steps:
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
@@ -205,3 +207,11 @@ jobs:
fi
gh release create "$TAG" release/* --repo "$GITHUB_REPOSITORY" "${flags[@]}"
gh release edit "$TAG" --draft=false --repo "$GITHUB_REPOSITORY" || refused
+ - name: Update the website
+ # The website lists the releases and links their files, so it's built again with this one.
+ # Its failing leaves the release as it is.
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ gh workflow run pages.yml --ref main --repo "$GITHUB_REPOSITORY" ||
+ echo "::warning::The website wasn't rebuilt. Run the Website workflow by hand to list this release."
diff --git a/.gitignore b/.gitignore
index b6cf9cf..92be8b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,9 @@
# Dependencies and build output (Rust build output: src-tauri/.gitignore)
node_modules
/dist/
+# The website's build, and the release list scripts/site-releases.mjs saves for it
+/site/dist/
+/site/public/releases.json
*.tsbuildinfo
# Tests and coverage
diff --git a/AGENTS.md b/AGENTS.md
index 81e7dba..19f322c 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -62,6 +62,10 @@ npm run e2e # Playwright: builds, previews on :4173, runs desktop/
E2E_PORT=4801 npm run e2e # the same on another port (several runs on one machine)
npm run check # typecheck + lint + test + build
npm run version:set -- 1.2.0 # set the version in all six places (--check 1.2.0, --print)
+npm run site:dev # the website (site/) on http://127.0.0.1:5174
+npm run site:releases # save the releases it shows to site/public/releases.json
+npm run site:build # the website -> site/dist/ (site:preview serves it on :4174)
+npm run site:test # the website's Playwright tests (builds it first)
# Rust (inside src-tauri/). The crate embeds dist/, so build the web app first or create a
# placeholder: mkdir -p dist && echo 'ci' > dist/index.html
@@ -70,7 +74,8 @@ cargo clippy --all-targets -- -D warnings
cargo test
```
-Ports are fixed (`strictPort`): 5173 dev, 4173 preview/e2e, 43821 desktop sign-in listener.
+Ports are fixed (`strictPort`): 5173 dev, 4173 preview/e2e, 43821 desktop sign-in listener,
+5174 and 4174 the website's dev server and preview.
## Repository map
@@ -78,6 +83,7 @@ Ports are fixed (`strictPort`): 5173 dev, 4173 preview/e2e, 43821 desktop sign-i
app/ the React app (web and desktop UI)
src-tauri/ the desktop shell (Rust, Tauri 2)
e2e/ Playwright specs and their fakes
+site/ the website on GitHub Pages: downloads, changelog, set-up guide, troubleshooting, FAQ
scripts/ test set-up, repository-wide checks, the version script
docs/ user guide, development, database and release docs, README screenshots
public/ static files served as-is (icons, web manifest, logo)
@@ -133,6 +139,15 @@ Tests sit next to the code they test (`*.test.ts` / `*.test.tsx`).
differ only by case (they would clash on Windows and macOS). `scripts/set-version.mjs`: sets or
checks the version in `package.json`, `package-lock.json`, `tauri.conf.json`, `Cargo.toml` and
`Cargo.lock` (`npm run version:set`).
+- `site/`: the project's website, published by `pages.yml` at https://kkkermit.github.io/Statsify/.
+ Plain TypeScript and CSS built by its own Vite config (`site/vite.config.ts`, with a
+ `` CSP), no framework. `index.html` holds the content; `main.ts` adds the downloads and
+ changelog from `releases.json` (saved at build time by `scripts/site-releases.mjs`, so
+ visitors' browsers never call GitHub's API), the install tabs, copy buttons, help search and
+ the menu; `releases.ts` is the pure part (reading releases, picking each system's files,
+ parsing GitHub's generated notes), tested in `releases.test.ts`; `e2e/` has its Playwright
+ tests and a fixture release list. It uses the app's colours and font and follows the system's
+ light or dark mode. Keep its text in step with the README and the user guide.
- `docs/GUIDE.md` user guide, `docs/DEVELOPMENT.md` developer set-up and debugging,
`docs/DATABASE.md` the SQLite schema and binary format, `docs/RELEASING.md` the release process,
`docs/screenshots/` README images.
@@ -848,6 +863,12 @@ label)` (axe WCAG 2.2 A/AA, no serious or critical violations), `enterDemo`, `se
actor); otherwise the release is left as a draft for an admin to publish. Pull requests
that change it or the version script run a dry run, which calls `ci.yml` with `run: build`
(the pull request's own CI run has the checks).
+ - `pages.yml` (**Website**): builds `site/` with the current release list, runs its tests
+ (`npm run site:test`: axe in both colour schemes, no sideways scroll from 320 px to 4K, the
+ downloads per system, the changelog, tabs, search and the menu) and publishes it to GitHub
+ Pages, on pushes to `main` that change the site and when `release.yml` starts it after a
+ release; pull requests that change the site run the build and tests only. CI's end-to-end
+ tests skip changes that only touch `site/`.
- `codeql.yml`: code scanning for TypeScript, Rust and the workflows, on pull requests,
pushes to `main` and weekly.
- `labeler.yml`: labels pull requests by files (`.github/labeler.yml`) and title type; the
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 156b83b..fdb492d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -92,6 +92,7 @@ release notes group changes by those labels; the maintainer may adjust them.
- **Desktop app** (when a pull request changes `src-tauri/`, dependencies or the build): the
installers build on Windows, Linux and macOS, and can be downloaded from the run's page, handy
for testing.
+- **Website** (when a pull request changes `site/`): builds the website and runs its tests.
- **CodeQL:** security scanning of the TypeScript, the Rust and the workflows.
All of them must pass before merging. If an end-to-end test fails, that job's `e2e-failures-`
diff --git a/README.md b/README.md
index e560282..4674f08 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,9 @@
+**Website:** [kkkermit.github.io/Statsify](https://kkkermit.github.io/Statsify/) has the downloads,
+the set-up guide, the changelog and answers to common problems.
+
Statsify works with your own Spotify account through Spotify's official Web API. You create a free
**Client ID** for it once (about two minutes, [see below](#one-time-spotify-setup-about-2-minutes)),
or click **Explore the demo** to look around with fictional data first.
diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md
index 894caeb..c3699b3 100644
--- a/docs/DEVELOPMENT.md
+++ b/docs/DEVELOPMENT.md
@@ -135,6 +135,24 @@ Set `VITE_SPOTIFY_CLIENT_ID` at build time to fill in the Client ID for everyone
five accounts, see the [README](../README.md#why-do-i-need-my-own-client-id)); leave it unset and
each person enters their own.
+### The website
+
+`site/` is the project's website at https://kkkermit.github.io/Statsify/: downloads, the
+changelog, the set-up guide, troubleshooting and the FAQ. It's a separate static page built with
+its own Vite config, and the **Website** workflow publishes it to GitHub Pages.
+
+```bash
+npm run site:releases # saves the release list it shows to site/public/releases.json
+npm run site:dev # http://127.0.0.1:5174
+npm run site:build # builds into site/dist/
+npm run site:preview # serves site/dist/ on http://127.0.0.1:4174
+npm run site:test # its Playwright tests (they build it first)
+```
+
+Without `site/public/releases.json` the page still works, and links to GitHub Releases where the
+downloads and changelog would be. `site:releases` asks GitHub's API anonymously; set
+`GITHUB_TOKEN` if you hit the rate limit.
+
### Ports and settings
The ports are fixed (`strictPort`), because Spotify needs the exact redirect address. If one is
@@ -144,6 +162,8 @@ taken, stop whatever uses it rather than picking another port.
| ----- | ------------------------------------------ |
| 5173 | `npm run dev` (and `npm run desktop:dev`) |
| 4173 | `npm run preview` and the end-to-end tests |
+| 5174 | `npm run site:dev` (the website) |
+| 4174 | `npm run site:preview` and its tests |
| 43821 | The desktop app's sign-in listener |
| Variable | What it does |
@@ -255,6 +275,7 @@ them, and npm and Cargo dependencies, every week (`.github/dependabot.yml`).
| **Desktop app** (`desktop.yml`) | Changes to the app reaching `main`; pull requests that change `src-tauri/`, dependencies or the build | Builds the installers on Windows, Linux and macOS and keeps them as downloadable artifacts for 14 days |
| **Release on main** (`release-on-main.yml`) | Pushes to `main` | Releases the version in `package.json` when it has no tag yet, by running **Release** on that commit |
| **Release** (`release.yml`) | Called by Release on main, version tags (`v1.2.0`); dry runs when the workflow itself changes | Checks the version, runs CI and the desktop builds, and publishes a GitHub Release ([RELEASING.md](RELEASING.md)) |
+| **Website** (`pages.yml`) | Website changes on `main` and in pull requests; after each release | Builds and tests `site/` and, from `main`, publishes it to GitHub Pages |
| **CodeQL** (`codeql.yml`) | Pull requests, pushes to `main`, weekly | Security scanning of the TypeScript, the Rust and the workflows |
| **Label pull requests** (`labeler.yml`) | Pull requests | Labels each pull request by its files and its title's type, for the release notes |
@@ -270,8 +291,9 @@ How **CI** is laid out, and why:
as each other (see [End-to-end tests](#end-to-end-tests-playwright)). Each job runs two
browsers, half of a 4-core runner. A failing job uploads its screenshots as `e2e-failures-`;
the other jobs still run to the end.
-- **What changed** decides what a change needs. Changes to Markdown, `docs/` or `.github/` (other
- than `ci.yml`) skip the end-to-end tests; changes outside `src-tauri/` skip the Rust checks.
+- **What changed** decides what a change needs. Changes to Markdown, `docs/`, the website
+ (`site/`, which the **Website** workflow tests) or `.github/` (other than `ci.yml`) skip the
+ end-to-end tests; changes outside `src-tauri/` skip the Rust checks.
Runs by hand and releases run everything.
- The branch rules require **Lint, test & build** and **Desktop shell (Rust)**. **Lint, test &
build** waits for the build, the checks and every end-to-end job, and passes only if each passed
diff --git a/docs/RELEASING.md b/docs/RELEASING.md
index 0f0ce97..dbf0113 100644
--- a/docs/RELEASING.md
+++ b/docs/RELEASING.md
@@ -56,7 +56,10 @@ npm run version:set -- --print # show the current version
- runs all of CI (tests, end-to-end and accessibility checks, Rust checks);
- builds the installers on Windows, Linux and macOS, and the web app;
- publishes a GitHub Release tagged `v1.3.0` on the merged commit, with the files, their
- SHA-256 checksums and the generated notes.
+ SHA-256 checksums and the generated notes;
+ - starts the [Website workflow](https://github.com/Kkkermit/Statsify/actions/workflows/pages.yml),
+ so [the website](https://kkkermit.github.io/Statsify/) offers the new version a few minutes
+ later.
When the tag already exists, the run stops after its first step: merges that don't change the
version release nothing.
@@ -104,6 +107,17 @@ A published tag still can't be moved or deleted. Only people with write access,
running this repository's own code on `main`, a tag or a feature branch, can create tags;
pull requests from forks get a read-only token.
+### One-time set-up: the website
+
+The website is published with GitHub Actions. Once, in **Settings → Pages**, set **Source** to
+**GitHub Actions**, or with an admin's `gh`:
+
+```bash
+gh api -X POST repos/Kkkermit/Statsify/pages -f build_type=workflow
+```
+
+Then run the **Website** workflow from the Actions tab, or merge a change to `site/`.
+
### What a release contains
| File | For |
@@ -132,7 +146,7 @@ their own, and the app asks for it on first run.
replaces its files and publishes it.
- **"The repository's rules don't let GitHub Actions" create the tag:** the release is a draft
with every file. Publish it from the Releases page, and do the one-time set-up above so the next
- one publishes itself.
+ one publishes itself. Then run the **Website** workflow by hand, so the website lists it.
- **A published release has a bug:** release a patch version. Never move or reuse a published
tag: people's checksums and links depend on it. The pipeline refuses to change the files of a
published release.
diff --git a/eslint.config.js b/eslint.config.js
index bb33a1c..22ebe85 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -6,7 +6,7 @@ import tseslint from "typescript-eslint";
export default tseslint.config(
// .claude/worktrees: copies of the repo that coding agents work in.
- { ignores: ["dist", "coverage", "src-tauri/target", "src-tauri/gen", "playwright-report", "test-results", ".claude"] },
+ { ignores: ["dist", "site/dist", "coverage", "src-tauri/target", "src-tauri/gen", "playwright-report", "test-results", ".claude"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
@@ -26,7 +26,7 @@ export default tseslint.config(
},
},
{
- files: ["e2e/**/*.ts", "*.config.ts"],
+ files: ["e2e/**/*.ts", "*.config.ts", "site/e2e/**/*.ts", "site/*.config.ts"],
languageOptions: { globals: { ...globals.node } },
},
);
diff --git a/package.json b/package.json
index 1a2d9e5..90fbd94 100644
--- a/package.json
+++ b/package.json
@@ -33,13 +33,18 @@
"preview": "vite preview",
"typecheck": "tsc -b",
"lint": "eslint .",
- "format": "prettier --write \"app/**/*.{ts,tsx,css}\" \"e2e/**/*.ts\" \"docs/**/*.md\" \"*.md\"",
+ "format": "prettier --write \"app/**/*.{ts,tsx,css}\" \"site/**/*.{ts,css,html}\" \"e2e/**/*.ts\" \"docs/**/*.md\" \"*.md\"",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"e2e": "playwright test",
"check": "npm run typecheck && npm run lint && npm run test && npm run build",
"version:set": "node scripts/set-version.mjs",
+ "site:dev": "vite --config site/vite.config.ts",
+ "site:build": "vite build --config site/vite.config.ts",
+ "site:preview": "vite preview --config site/vite.config.ts",
+ "site:releases": "node scripts/site-releases.mjs",
+ "site:test": "playwright test --config site/playwright.config.ts",
"tauri": "tauri",
"desktop:dev": "tauri dev",
"desktop:build": "tauri build"
diff --git a/scripts/site-releases.mjs b/scripts/site-releases.mjs
new file mode 100644
index 0000000..a8190b9
--- /dev/null
+++ b/scripts/site-releases.mjs
@@ -0,0 +1,47 @@
+#!/usr/bin/env node
+/**
+ * Saves the repository's releases for the website (site/), which shows its downloads and
+ * changelog from this file rather than asking GitHub's API from every visitor's browser.
+ *
+ * node scripts/site-releases.mjs [output] (default: site/public/releases.json)
+ *
+ * GITHUB_REPOSITORY picks the repository (default Kkkermit/Statsify), and GITHUB_TOKEN, when set,
+ * is sent so the request isn't held to the anonymous rate limit. Drafts are left out.
+ */
+import { mkdirSync, writeFileSync } from "node:fs";
+import { dirname, resolve } from "node:path";
+
+const repository = process.env.GITHUB_REPOSITORY || "Kkkermit/Statsify";
+const output = resolve(process.argv[2] || "site/public/releases.json");
+
+const headers = {
+ Accept: "application/vnd.github+json",
+ "User-Agent": "statsify-site",
+ "X-GitHub-Api-Version": "2022-11-28",
+};
+if (process.env.GITHUB_TOKEN) headers.Authorization = `Bearer ${process.env.GITHUB_TOKEN}`;
+
+const response = await fetch(`https://api.github.com/repos/${repository}/releases?per_page=20`, {
+ headers,
+ signal: AbortSignal.timeout(30_000),
+});
+if (!response.ok) {
+ console.error(`GitHub answered ${response.status} ${response.statusText} for ${repository}'s releases.`);
+ process.exit(1);
+}
+
+const releases = (await response.json())
+ .filter((r) => !r.draft)
+ .map((r) => ({
+ tag: r.tag_name,
+ name: r.name,
+ date: r.published_at,
+ url: r.html_url,
+ prerelease: r.prerelease,
+ body: r.body ?? "",
+ assets: r.assets.map((a) => ({ name: a.name, size: a.size, url: a.browser_download_url })),
+ }));
+
+mkdirSync(dirname(output), { recursive: true });
+writeFileSync(output, `${JSON.stringify(releases, null, "\t")}\n`);
+console.log(`Saved ${releases.length} releases of ${repository} to ${output}.`);
diff --git a/site/e2e/releases.json b/site/e2e/releases.json
new file mode 100644
index 0000000..cd6dea2
--- /dev/null
+++ b/site/e2e/releases.json
@@ -0,0 +1,147 @@
+[
+ {
+ "tag": "v1.3.0-beta.1",
+ "name": "Statsify 1.3.0-beta.1",
+ "date": "2026-12-10T09:00:00Z",
+ "url": "https://github.com/Kkkermit/Statsify/releases/tag/v1.3.0-beta.1",
+ "prerelease": true,
+ "body": "## What's Changed\n### New features\n* feat: a year in review by @Kkkermit in https://github.com/Kkkermit/Statsify/pull/30\n",
+ "assets": [
+ {
+ "name": "SHA256SUMS.txt",
+ "size": 659,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.3.0-beta.1/SHA256SUMS.txt"
+ },
+ {
+ "name": "Statsify_1.3.0-beta.1_amd64.AppImage",
+ "size": 82115064,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.3.0-beta.1/Statsify_1.3.0-beta.1_amd64.AppImage"
+ },
+ {
+ "name": "Statsify_1.3.0-beta.1_amd64.deb",
+ "size": 3504044,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.3.0-beta.1/Statsify_1.3.0-beta.1_amd64.deb"
+ },
+ {
+ "name": "Statsify_1.3.0-beta.1_universal.dmg",
+ "size": 6710528,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.3.0-beta.1/Statsify_1.3.0-beta.1_universal.dmg"
+ },
+ {
+ "name": "Statsify_1.3.0-beta.1_web.zip",
+ "size": 584051,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.3.0-beta.1/Statsify_1.3.0-beta.1_web.zip"
+ },
+ {
+ "name": "Statsify_1.3.0-beta.1_x64-portable.exe",
+ "size": 5309440,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.3.0-beta.1/Statsify_1.3.0-beta.1_x64-portable.exe"
+ },
+ {
+ "name": "Statsify_1.3.0-beta.1_x64-setup.exe",
+ "size": 2431234,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.3.0-beta.1/Statsify_1.3.0-beta.1_x64-setup.exe"
+ }
+ ]
+ },
+ {
+ "tag": "v1.2.0",
+ "name": "Statsify 1.2.0",
+ "date": "2026-12-03T12:37:44Z",
+ "url": "https://github.com/Kkkermit/Statsify/releases/tag/v1.2.0",
+ "prerelease": false,
+ "body": "## Download\n\n| System | File |\n| --- | --- |\n| Windows | `Statsify_1.2.0_x64-setup.exe` |\n\n\n\n## What's Changed\n### New features\n* feat(lyrics): lyrics that follow the song word by word by @Kkkermit in https://github.com/Kkkermit/Statsify/pull/21\n* feat: an `All time` range on Streams by @Kkkermit in https://github.com/Kkkermit/Statsify/pull/22\n### Bug fixes\n* fix(desktop): the tray icon on Linux by @Kkkermit in https://github.com/Kkkermit/Statsify/pull/23\n\n**Full Changelog**: https://github.com/Kkkermit/Statsify/compare/v1.1.0...v1.2.0",
+ "assets": [
+ {
+ "name": "SHA256SUMS.txt",
+ "size": 659,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/SHA256SUMS.txt"
+ },
+ {
+ "name": "Statsify_1.2.0_amd64.AppImage",
+ "size": 82115064,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/Statsify_1.2.0_amd64.AppImage"
+ },
+ {
+ "name": "Statsify_1.2.0_amd64.deb",
+ "size": 3504044,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/Statsify_1.2.0_amd64.deb"
+ },
+ {
+ "name": "Statsify_1.2.0_universal.dmg",
+ "size": 6710528,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/Statsify_1.2.0_universal.dmg"
+ },
+ {
+ "name": "Statsify_1.2.0_web.zip",
+ "size": 584051,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/Statsify_1.2.0_web.zip"
+ },
+ {
+ "name": "Statsify_1.2.0_x64-portable.exe",
+ "size": 5309440,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/Statsify_1.2.0_x64-portable.exe"
+ },
+ {
+ "name": "Statsify_1.2.0_x64-setup.exe",
+ "size": 2431234,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/Statsify_1.2.0_x64-setup.exe"
+ },
+ {
+ "name": "Statsify_1.2.0_x64_en-US.msi",
+ "size": 3129344,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.2.0/Statsify_1.2.0_x64_en-US.msi"
+ }
+ ]
+ },
+ {
+ "tag": "v1.1.0",
+ "name": "Statsify 1.1.0",
+ "date": "2026-11-20T10:00:00Z",
+ "url": "https://github.com/Kkkermit/Statsify/releases/tag/v1.1.0",
+ "prerelease": false,
+ "body": "",
+ "assets": [
+ {
+ "name": "SHA256SUMS.txt",
+ "size": 659,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/SHA256SUMS.txt"
+ },
+ {
+ "name": "Statsify_1.1.0_amd64.AppImage",
+ "size": 82115064,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/Statsify_1.1.0_amd64.AppImage"
+ },
+ {
+ "name": "Statsify_1.1.0_amd64.deb",
+ "size": 3504044,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/Statsify_1.1.0_amd64.deb"
+ },
+ {
+ "name": "Statsify_1.1.0_universal.dmg",
+ "size": 6710528,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/Statsify_1.1.0_universal.dmg"
+ },
+ {
+ "name": "Statsify_1.1.0_web.zip",
+ "size": 584051,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/Statsify_1.1.0_web.zip"
+ },
+ {
+ "name": "Statsify_1.1.0_x64-portable.exe",
+ "size": 5309440,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/Statsify_1.1.0_x64-portable.exe"
+ },
+ {
+ "name": "Statsify_1.1.0_x64-setup.exe",
+ "size": 2431234,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/Statsify_1.1.0_x64-setup.exe"
+ },
+ {
+ "name": "Statsify_1.1.0_x64_en-US.msi",
+ "size": 3129344,
+ "url": "https://github.com/Kkkermit/Statsify/releases/download/v1.1.0/Statsify_1.1.0_x64_en-US.msi"
+ }
+ ]
+ }
+]
diff --git a/site/e2e/site.spec.ts b/site/e2e/site.spec.ts
new file mode 100644
index 0000000..12c2cd3
--- /dev/null
+++ b/site/e2e/site.spec.ts
@@ -0,0 +1,276 @@
+import { readFileSync } from "node:fs";
+import AxeBuilder from "@axe-core/playwright";
+import { expect, test, type Page } from "@playwright/test";
+
+const RELEASES = readFileSync(new URL("./releases.json", import.meta.url), "utf8");
+const WCAG_TAGS = ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa", "wcag22aa"];
+const MAC =
+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15";
+const LINUX = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36";
+
+/** Answers releases.json from the fixture, and fails the test on any page or console error. */
+async function open(page: Page, releases: string | null = RELEASES): Promise {
+ const errors: string[] = [];
+ page.on("pageerror", (e) => errors.push(e.message));
+ page.on("console", (m) => {
+ if (m.type() === "error") errors.push(m.text());
+ });
+ await page.route("**/releases.json", (route) =>
+ releases === null
+ ? route.fulfill({ status: 404, body: "Not found" })
+ : route.fulfill({ contentType: "application/json", body: releases }),
+ );
+ await page.goto("/");
+ return errors;
+}
+
+async function noSeriousA11y(page: Page, label: string): Promise {
+ const results = await new AxeBuilder({ page }).withTags(WCAG_TAGS).analyze();
+ const serious = results.violations.filter((v) => v.impact === "serious" || v.impact === "critical");
+ expect(serious.map((v) => `${label}: ${v.id} ${v.nodes[0]?.target.join(" ")} – ${v.help}`)).toEqual([]);
+}
+
+async function noSidewaysScroll(page: Page): Promise {
+ expect(await page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth)).toBe(
+ 0,
+ );
+}
+
+test.describe("the page", () => {
+ for (const scheme of ["dark", "light"] as const) {
+ test(`is accessible in ${scheme} mode, with every answer open [all sizes]`, async ({ page }) => {
+ await page.emulateMedia({ colorScheme: scheme, reducedMotion: "reduce" });
+ const errors = await open(page);
+ await expect(page.getByRole("heading", { level: 1 })).toHaveText("Your Spotify, by the numbers.");
+ await expect(page.locator(".release").first()).toBeVisible();
+ await page.evaluate(() => document.querySelectorAll("details").forEach((d) => (d.open = true)));
+ await noSeriousA11y(page, scheme);
+ await noSidewaysScroll(page);
+ expect(errors).toEqual([]);
+ });
+ }
+
+ test("never scrolls sideways, from a small phone to a 4K screen", async ({ page }) => {
+ await open(page);
+ for (const width of [320, 375, 768, 1024, 1440, 2560, 3840]) {
+ await page.setViewportSize({ width, height: 900 });
+ await page.evaluate(() => document.querySelectorAll("details").forEach((d) => (d.open = true)));
+ await noSidewaysScroll(page);
+ }
+ });
+
+ test("keeps still with reduced motion", async ({ page }) => {
+ await page.emulateMedia({ reducedMotion: "reduce" });
+ await open(page);
+ await expect(page.locator(".hero-text > *").first()).toHaveCSS("animation-name", "none");
+ await expect(page.locator(".hero-shot")).toHaveCSS("opacity", "1");
+ });
+});
+
+test.describe("downloads", () => {
+ test("offer the Windows installer to a Windows computer", async ({ page }) => {
+ await open(page);
+ const hero = page.getByRole("link", { name: "Download for Windows" });
+ await expect(hero).toHaveAttribute("href", /\/v1\.2\.0\/Statsify_1\.2\.0_x64-setup\.exe$/);
+ await expect(page.getByText("Version 1.2.0 for Windows 10 and 11, 2.4 MB", { exact: true })).toBeVisible();
+ const windows = page.getByRole("region", { name: "Windows" });
+ await expect(windows.getByText("Your system")).toBeVisible();
+ const files = windows.getByRole("link", { name: /^Download/ });
+ await expect(files).toHaveCount(3);
+ await expect(files.nth(0)).toHaveAccessibleName("Download Installer for Windows (.exe, 2.4 MB)");
+ await expect(files.nth(0)).toHaveClass(/button-primary/);
+ await expect(files.nth(1)).toHaveAccessibleName(/^Download MSI package/);
+ await expect(files.nth(2)).toHaveAccessibleName(/^Download Portable/);
+ await expect(page.getByRole("region", { name: "macOS" }).getByText("Your system")).toBeHidden();
+ await expect(page.getByRole("region", { name: "macOS" }).getByRole("link", { name: /^Download/ })).not.toHaveClass(
+ /button-primary/,
+ );
+ });
+
+ test.describe("on a Mac", () => {
+ test.use({ userAgent: MAC });
+ test("offer the disk image", async ({ page }) => {
+ await open(page);
+ await expect(page.getByRole("link", { name: "Download for macOS" })).toHaveAttribute("href", /_universal\.dmg$/);
+ await expect(page.getByRole("region", { name: "macOS" }).getByText("Your system")).toBeVisible();
+ await expect(page.getByRole("tab", { name: "macOS" })).toHaveAttribute("aria-selected", "true");
+ });
+ });
+
+ test.describe("on Linux", () => {
+ test.use({ userAgent: LINUX });
+ test("let you choose between the package and the AppImage", async ({ page }) => {
+ await open(page);
+ const hero = page.getByRole("link", { name: "Download for Linux" });
+ await expect(hero).toHaveAttribute("href", "#download");
+ await expect(page.getByText("Version 1.2.0, as a Debian package or an AppImage", { exact: true })).toBeVisible();
+ const files = page.getByRole("region", { name: "Linux" }).getByRole("link", { name: /^Download/ });
+ await expect(files.nth(0)).toHaveAccessibleName(/^Download Debian package/);
+ await expect(files.nth(1)).toHaveAccessibleName(/^Download AppImage/);
+ });
+ });
+
+ test("say on a phone that Statsify is for computers [all sizes]", async ({ page, isMobile }) => {
+ test.skip(!isMobile, "Only a phone is told this.");
+ await open(page);
+ await expect(page.getByText("Statsify runs on computers")).toBeVisible();
+ await expect(page.getByRole("link", { name: "Download Statsify" }).first()).toHaveAttribute("href", "#download");
+ });
+
+ test("skip pre-releases, and link the checksums", async ({ page }) => {
+ await open(page);
+ await expect(page.getByText("Version 1.2.0, released 3 December 2026.")).toBeVisible();
+ await page.getByText("Check a download against its checksum").click();
+ await expect(page.getByRole("link", { name: "SHA256SUMS.txt" })).toHaveAttribute(
+ "href",
+ /\/v1\.2\.0\/SHA256SUMS\.txt$/,
+ );
+ });
+
+ test("fall back to GitHub when the release list can't be loaded", async ({ page }) => {
+ const errors = await open(page, null);
+ await expect(page.getByText("The release notes couldn't be loaded here.")).toBeVisible();
+ const windows = page.getByRole("region", { name: "Windows" });
+ await expect(windows.getByRole("link", { name: "Open Releases" })).toHaveAttribute(
+ "href",
+ "https://github.com/Kkkermit/Statsify/releases/latest",
+ );
+ await expect(page.getByRole("link", { name: "Download for Windows" })).toHaveCount(0);
+ // The 404 itself is the only error.
+ expect(errors.filter((e) => !e.includes("404"))).toEqual([]);
+ });
+});
+
+test.describe("what's new", () => {
+ test("lists the releases newest first, with the latest open", async ({ page }) => {
+ await open(page);
+ const releases = page.locator(".release");
+ await expect(releases).toHaveCount(3);
+ await expect(releases.nth(0).getByRole("heading", { level: 3 })).toHaveText("1.3.0-beta.1");
+ await expect(releases.nth(0)).toContainText("Pre-release");
+ await expect(releases.nth(0)).toHaveAttribute("open", "");
+ await expect(releases.nth(1)).toContainText("Latest");
+ await releases.nth(1).locator("summary").click();
+ const latest = releases.nth(1);
+ await expect(latest.getByRole("heading", { level: 4 })).toHaveText(["New features", "Bug fixes"]);
+ await expect(latest.getByRole("listitem").first()).toHaveText("Lyrics that follow the song word by word #21");
+ await expect(latest.getByRole("link", { name: "Pull request 21" })).toHaveAttribute(
+ "href",
+ "https://github.com/Kkkermit/Statsify/pull/21",
+ );
+ await expect(latest.locator("code")).toHaveText("All time");
+ await expect(latest.getByRole("link", { name: "Every commit" })).toHaveAttribute(
+ "href",
+ /compare\/v1\.1\.0\.\.\.v1\.2\.0$/,
+ );
+ await expect(releases.nth(2)).toContainText("No notes for this release");
+ });
+
+ test("shows release notes as text, never as markup", async ({ page }) => {
+ const hostile = JSON.parse(RELEASES) as { body: string }[];
+ hostile[0].body =
+ '* [link](javascript:alert(1)) by @x in https://evil.example/pull/1';
+ await open(page, JSON.stringify(hostile));
+ const first = page.locator(".release").first();
+ await expect(first.getByRole("listitem")).toContainText('');
+ await expect(first.locator("img")).toHaveCount(0);
+ await expect(first.locator('a[href^="javascript:"]')).toHaveCount(0);
+ expect(await page.evaluate(() => "pwned" in window)).toBe(false);
+ });
+});
+
+test.describe("getting started", () => {
+ test("tabs follow the arrow keys, Home and End", async ({ page }) => {
+ await open(page);
+ const windows = page.getByRole("tab", { name: "Windows" });
+ await expect(windows).toHaveAttribute("aria-selected", "true");
+ await expect(page.getByRole("tabpanel")).toContainText("Windows protected your PC");
+ await windows.focus();
+ await page.keyboard.press("ArrowRight");
+ await expect(page.getByRole("tab", { name: "macOS" })).toBeFocused();
+ await expect(page.getByRole("tabpanel")).toContainText("Privacy & Security");
+ await page.keyboard.press("End");
+ await expect(page.getByRole("tab", { name: "Linux" })).toHaveAttribute("aria-selected", "true");
+ await page.keyboard.press("ArrowRight");
+ await expect(windows).toBeFocused();
+ await page.keyboard.press("ArrowLeft");
+ await expect(page.getByRole("tabpanel")).toContainText("sudo apt install");
+ });
+
+ test("copies the redirect URI", async ({ page, context }) => {
+ await context.grantPermissions(["clipboard-read", "clipboard-write"]);
+ await open(page);
+ const step = page.locator("#connect-spotify");
+ await step.getByRole("button", { name: "Copy address" }).click();
+ await expect(step.getByRole("button", { name: "Copied" })).toHaveText("Copied");
+ expect(await page.evaluate(() => navigator.clipboard.readText())).toBe("http://127.0.0.1:43821/callback");
+ await expect(page.locator("[data-announcer]")).toHaveText("Copied");
+ });
+});
+
+test.describe("help", () => {
+ test("search finds answers in help and the FAQ, and says when nothing matches", async ({ page }) => {
+ await open(page);
+ const search = page.getByRole("searchbox", { name: "Search troubleshooting and the FAQ" });
+ await search.fill("redirect uri");
+ await expect(page.locator("[data-search-status]")).toHaveText(/^\d+ answers?$/);
+ const visible = page.locator(".qa:visible");
+ await expect(visible.first()).toContainText(/redirect/i);
+ await expect(page.locator("#t-playing")).toBeHidden();
+ await search.fill("premium");
+ await expect(page.locator("#faq .qa:visible").first()).toContainText("Premium");
+ await search.fill("zzzz nothing");
+ await expect(page.getByText("Nothing matches that.")).toBeVisible();
+ await search.fill("");
+ await expect(page.locator("#t-playing")).toBeVisible();
+ await expect(page.getByText("Nothing matches that.")).toBeHidden();
+ });
+
+ test("opens a handful of matches by itself, and closes them again", async ({ page }) => {
+ await open(page);
+ const search = page.getByRole("searchbox", { name: "Search troubleshooting and the FAQ" });
+ await search.fill("damaged");
+ const answer = page.locator(".qa", { hasText: "is damaged and can't be opened" });
+ await expect(answer).toHaveAttribute("open", "");
+ await search.fill("");
+ await expect(answer).not.toHaveAttribute("open", "");
+ });
+});
+
+test.describe("navigation", () => {
+ test("the menu opens on a phone, closes on a link, and Esc gives focus back [all sizes]", async ({
+ page,
+ isMobile,
+ }) => {
+ test.skip(!isMobile, "The menu button is for narrow screens.");
+ await open(page);
+ const button = page.getByRole("button", { name: "Menu" });
+ const nav = page.getByRole("navigation", { name: "Sections" });
+ await expect(nav.getByRole("link", { name: "FAQ" })).toBeHidden();
+ await button.click();
+ await expect(button).toHaveAttribute("aria-expanded", "true");
+ await nav.getByRole("link", { name: "Set up" }).click();
+ await expect(button).toHaveAttribute("aria-expanded", "false");
+ await expect(page).toHaveURL(/#set-up$/);
+ await button.click();
+ await page.keyboard.press("Escape");
+ await expect(button).toHaveAttribute("aria-expanded", "false");
+ await expect(button).toBeFocused();
+ });
+
+ test("marks the section you're reading", async ({ page }) => {
+ await open(page);
+ const nav = page.getByRole("navigation", { name: "Sections" });
+ await nav.getByRole("link", { name: "Troubleshooting" }).click();
+ await expect(nav.getByRole("link", { name: "Troubleshooting" })).toHaveAttribute("aria-current", "location");
+ });
+
+ test("skip link moves to the content", async ({ page }) => {
+ await open(page);
+ await page.keyboard.press("Tab");
+ const skip = page.getByRole("link", { name: "Skip to content" });
+ await expect(skip).toBeFocused();
+ await page.keyboard.press("Enter");
+ await expect(page.locator("main")).toBeFocused();
+ });
+});
diff --git a/site/index.html b/site/index.html
new file mode 100644
index 0000000..d7a69fc
--- /dev/null
+++ b/site/index.html
@@ -0,0 +1,1020 @@
+
+
+
+
+
+ Statsify: your Spotify stats, on your computer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Skip to content
+
+
+
+
+
+
+ Statsify shows your Spotify stats, keeps a record of every song you play and works as a remote for the
+ Spotify app. There's no Statsify server, so your listening history stays on your computer.
+
+ Free and open source, for Windows, macOS and Linux
+ All downloads
+
+
+
+
+
+
+
+
+
+
+
+
Features
+
+ Statsify reads your stats from Spotify's Web API, and your full history from the data export Spotify sends
+ you when you ask for it.
+
+
+
+
+
+
Your stats
+
+
Top charts
+
+ Top songs, artists, albums and genres for the last 4 weeks, 6 months and year, with rank changes.
+
+
All time
+
Streams, minutes, songs and artists since your first listen, and your longest streak.
+
Streams
+
+ Any period, from the last 24 hours to dates you pick. Every play is listed, and you can export them as
+ CSV.
+
+
Insights
+
+ When in the week you listen, a calendar of every day, records, skips, devices and songs you've stopped
+ playing.
+
+
+
+
+
Listening
+
+
Player
+
+ Play, skip, shuffle, volume, the queue and your Spotify devices. In the desktop app, Play starts
+ Spotify hidden in the tray.
+
+
Lyrics
+
Synced lyrics that follow the song word by word. Click a line to jump to it.
+
Full screen
+
The cover, the lyrics or both, on a background in the colours of the song.
+
Instant playlists
+
+ Your top songs of a month, forgotten favourites or most skipped, played straight away or saved as a
+ private playlist.
+
+
+
+
+
Everything else
+
+
Library
+
+ Playlists, liked songs, albums and artists, with search and sorting, your own folders and up to four
+ pins.
+
+
Appearance
+
+ Five themes, nine accent colours or your own, interface size from 75 to 150 %, and a see-through
+ window.
+
+
History file
+
The desktop app keeps every play in a SQLite file that you can query and back up.
+
Demo
+
A made-up library with three years of history, to try Statsify without a Spotify account.
+
+
+
+
+
+
+
+
+
+
+ Insights from your whole history. Spotify's API only shares your last 50 plays, so
+ Statsify builds lifetime stats from your Spotify data export, then adds new plays itself while it runs.
+ How to import it
+
+
+
+
+
+
+
+ Playlists of any size. Search, sort and play from any playlist and see its stats. A
+ 10,000-song playlist scrolls like a short one.
+
+
+
+ Statsify runs on computers, so there's nothing to install on a phone or tablet. Open this page on your
+ computer to download it.
+
+
+
+
+
+
Windows
+
Windows 10 and 11, 64-bit
+
Your system
+
+
+
+ The files are on GitHub Releases
+ Open Releases
+
+
+
+
+
+
macOS
+
Apple silicon and Intel
+
Your system
+
+
+
+ The files are on GitHub Releases
+ Open Releases
+
+
+
+
+
+
Linux
+
64-bit x86
+
Your system
+
+
+
+ The files are on GitHub Releases
+ Open Releases
+
+
+
+
+
+
Web
+
+ For your own server, over HTTPS at the root of a domain.
+ How to host it
+
+
+
+
+ The files are on GitHub Releases
+ Open Releases
+
+
+
+
+
+
+
+ The installers aren't signed yet, so Windows and macOS warn you the first time you open Statsify.
+ Set up shows what to click.
+
+
+
+ Check a download against its checksum
+
+
+
+
+ Every release lists each file's SHA-256 checksum in
+ SHA256SUMS.txt. Work
+ out your file's checksum and compare the two.
+
+
+
Windows, in PowerShell
+
+
Get-FileHash .\Statsify_*.exe
+
+
macOS
+
+
shasum -a 256 Statsify_*.dmg
+
+
Linux, with SHA256SUMS.txt in the same folder
+
+
sha256sum -c --ignore-missing SHA256SUMS.txt
+
+
+
+
+
+
+
+
+
+
+
+
Set up
+
+ Install the app, connect it to Spotify, and if you want lifetime stats, import your history. The Spotify
+ step is copy and paste, and the app walks you through it too.
+
+
+
+
+
+
+ 1
+
Install Statsify
+ About 1 minute
+
+
+
+
+
+
+
+
+
+
+
Windows
+
+
+ Download the installer (Statsify_…_x64-setup.exe) and open it. It installs for you
+ only, so it doesn't need an administrator.
+
+
+ If Windows says "Windows protected your PC", choose More info, then
+ Run anyway. It says this because the installer isn't signed yet.
+
+
Open Statsify from the Start menu.
+
+
+ To run Statsify without installing it, use the portable .exe. It needs Microsoft Edge
+ WebView2, which Windows 11 already has.
+
+
+
+
+
macOS
+
+
Download the disk image (.dmg), open it and drag Statsify to Applications.
+
+ Open Statsify. macOS says it can't check the app, because it isn't signed yet. Choose
+ Done.
+
+
+ Open System Settings, then Privacy & Security, scroll down
+ and choose Open Anyway. On macOS 14 and earlier you can instead Control-click
+ the app and choose Open.
+
+
+
+
+ If macOS says Statsify "is damaged and can't be opened", the app is fine but unsigned. Run this
+ in Terminal, then open it again.
+
+ The tray icon needs AppIndicator support. On GNOME, install the AppIndicator and
+ KStatusNotifierItem Support extension.
+
+
+
+
+
+
+
+
+ 2
+
Connect to Spotify
+ About 2 minutes
+
+
+
+ Statsify signs in with a Client ID that you create, for free, in Spotify's developer dashboard.
+ There's no Statsify server to share one, so each person or household makes their own.
+
+
+
+ Open the Spotify Developer Dashboard, sign in
+ and choose Create app. Any name and description will do.
+
+
+ Under Redirect URIs, add this address exactly.
+
http://127.0.0.1:43821/callback
+
+ Spotify won't accept localhost here. If you host the web version yourself, use
+ https://your-domain/callback instead.
+
+
+
Tick Web API and Web Playback SDK, and save.
+
+ Under User Management, add the Spotify account of each person who'll use Statsify,
+ up to five.
+
+
+ Copy the Client ID from Basic Information, paste it into Statsify
+ and choose Save and sign in. Approve access in your browser, then go back to
+ Statsify.
+
+
+
+ The Client ID isn't a secret and there's no password to keep. Spotify asks for Premium on the account
+ that creates it, and for playback control. Stats work on any account.
+
+
+
+
+
+
+ 3
+
Import your history Optional
+ Up to 30 days
+
+
+
+ Spotify's API only shares your last 50 plays. For lifetime stats, ask Spotify for a copy of your data.
+
+
+
+ On Spotify's privacy page, request
+ Extended streaming history. It covers every play since you joined and can take up
+ to 30 days. Account data covers the last year and usually arrives within 5 days.
+ You can import both.
+
+
When Spotify emails you, download the .zip.
+
+ Drop it on Statsify's Import history page. It's read on your computer and isn't
+ uploaded anywhere.
+
+
+
After that, Statsify saves new plays itself while it's open or in the tray.
+
+
+
+
+
+
+
+
+
+
Changelog
+
Recent releases, newest first. Each change links to its pull request on GitHub.
+ Try to open it once, then go to System Settings, then
+ Privacy & Security, scroll down and choose Open Anyway. On
+ macOS 14 and earlier, Control-click the app and choose Open.
+
+
+
+
+ There's no tray icon on Linux
+
+
+ The tray needs AppIndicator support. On GNOME, install the AppIndicator and KStatusNotifierItem
+ Support extension and restart Statsify.
+
+
+
+
+ The portable Windows app doesn't start
+
+
+ It needs Microsoft Edge WebView2. Windows 11 has it. On Windows 10, use the installer, which adds
+ WebView2 when it's missing.
+
+ Spotify doesn't know the Client ID you entered. On Statsify's welcome page, choose
+ Change next to the Client ID, paste the one from your Spotify app's
+ Basic Information page and sign in again.
+
+ For the desktop app, your Spotify app's Redirect URIs must include this address
+ exactly.
+
+
http://127.0.0.1:43821/callback
+
+ Common slips are a missing /callback, https instead of http,
+ and localhost instead of 127.0.0.1.
+
+
+
+
+ "Spotify didn't allow this"
+
+
+ Your Spotify account probably isn't listed under User Management in your Spotify
+ app. Add it in the
+ Spotify Developer Dashboard. The same message
+ shows for other people's playlists, which Spotify doesn't share with apps like Statsify.
+
+
+
+
+ "Session expired" or "This sign-in link is invalid or has expired"
+
+
+ Spotify ended the sign-in, for example because Statsify's access was removed on Spotify's
+ Manage apps page, or the sign-in took too long.
+ Sign in again.
+
+
+
+
+ The browser never goes back to Statsify after signing in
+
+
+ When Spotify's page shows an error, it can't send you back to the app. In Statsify, choose
+ Wrong Client ID? to stop waiting, then fix the Client ID or the redirect URI as
+ above.
+
+
+
+
+
+
+
Playing music
+
+ "No active Spotify device", or Play does nothing
+
+
+ Statsify is a remote, and the music plays in a Spotify app. Install the Spotify desktop app and sign
+ in to it once. After that, Statsify starts it hidden in the tray when you press Play. You can also
+ pick a phone or speaker with the devices button in the player bar.
+
+
+
+
+ "Spotify isn't installed on this PC"
+
+
+ Install Spotify from spotify.com or the Microsoft
+ Store, sign in once, then press Play again. For the Microsoft Store version, check that Spotify is
+ turned on under Settings, Apps,
+ Advanced app settings, App execution aliases.
+
+
+
+
+ "Spotify started but hasn't come online"
+
+
+ Spotify is probably waiting for you to sign in or install an update. Choose
+ Open Spotify, sign in, then close its window. Next time it starts hidden.
+
+
+
+
+ "Playback control needs Spotify Premium"
+
+
+ Spotify only lets other apps control Premium accounts. Without Premium you still get every stat,
+ 30-second previews and Open in Spotify.
+
+
+
+
+ A device is greyed out
+
+
+ Some TVs, cars and speakers don't let other apps control them. Start the music on it from Spotify
+ itself, or pick another device.
+
+
+
+
+
+
+
Your history
+
+ "No streaming history files found" when importing
+
+
+ Choose the .zip from Spotify's email, or the StreamingHistory or
+ Streaming_History_Audio.json files inside it.
+
+
+
+
+ "Damaged or incomplete zip"
+
+
The download didn't finish. Download the file from Spotify's email again and import that.
+
+
+
+ Some plays are missing from Streams or All time
+
+
+ Spotify only shares your last 50 plays, and not how long you listened to each. Statsify saves them
+ while it's open or in the tray, so if it's closed while you play more than 50 songs, the oldest are
+ missed. Your next data export fills the gaps with the exact plays.
+
+
+
+
+ "Your listening history couldn't be opened"
+
+
+ Statsify stops saving rather than risk overwriting your history. Choose
+ Try again. If the message says the file is from a newer version of Statsify,
+ install the newest version.
+
+
+
+
+
+
+
Lyrics and other messages
+
+ There are no lyrics for a song
+
+
+ Spotify doesn't share lyrics with apps, so Statsify gets them from
+ LRCLIB, a free database that people add lyrics to. Popular songs
+ are well covered and less-known ones can be missing. You can add them on LRCLIB, and Statsify looks
+ again after three days.
+
+
+
+
+ Lyrics run early or late
+
+
+ Nudge them with − and + next to the lyrics, a tenth of a second at
+ a time. Statsify remembers the change for that song.
+
+
+
+
+ Stats or playlists look out of date
+
+
+ Statsify keeps Spotify's answers for a few minutes. Clear cache in
+ Settings, under Data & about, fetches everything again and
+ keeps your history.
+
+
+
+
+ "Spotify asked us to slow down" or "You're offline"
+
+
+ Spotify limits how many requests an app can make in a short time. Wait a moment and choose
+ Try again. When you're offline, pages load again once you're back.
+
+
+
+
+
+
+ Nothing matches that. Try other words, or
+ ask on GitHub.
+
+ Yes. It's open source under the Apache-2.0 licence, with no ads and no subscription. If you'd like to
+ support it, you can buy me a coffee.
+
+
+
+
+ Is it made by Spotify?
+
+
+ No. Statsify is an independent project. It uses Spotify's official Web API, but isn't affiliated with,
+ endorsed or sponsored by Spotify.
+
+
+
+
+ Do I need Spotify Premium?
+
+
+ Stats, your library, lyrics and 30-second previews work with any account. Controlling playback needs
+ Premium. Spotify also asks for Premium on the account that creates the Client ID. If yours doesn't
+ have it, someone with Premium can create one and add you under
+ User Management.
+
+
+
+
+ Why do I need my own Client ID?
+
+
+ Statsify has no server, so there's no shared Statsify account at Spotify. Spotify also lets each
+ Client ID be used by at most five people, so one shared ID couldn't work for everyone. It's free and
+ takes about two minutes.
+
+
+
+
+ Can friends or family use it?
+
+
+ Yes, up to five Spotify accounts per Client ID. Add each one under User Management
+ in your Spotify app and give them the Client ID. Everyone signs in with their own Spotify account on
+ their own device.
+
+
+
+
+ Where is my data kept?
+
+
+ On your computer. The desktop app keeps your history in one SQLite file in its data folder, and the
+ web version keeps it in your browser. Statsify only talks to Spotify, and to LRCLIB for lyrics, which
+ gets the song's title, artist, album and length and nothing about you.
+
+
+
+
+ Why are some numbers or features missing?
+
+
+ Since February 2026, Spotify leaves popularity scores, follower counts, artists' top tracks and other
+ people's playlists out of what it shares with apps like Statsify. Statsify says where something isn't
+ available instead of showing zeros.
+
+
+
+
+ Can Statsify play music by itself?
+
+
+ No, it's a remote. Spotify's music is protected, and on a computer only Spotify's own apps can play
+ it. Statsify tells the Spotify app what to play, and the desktop app starts Spotify hidden when it
+ needs to. With Premium, the web version can also play in the browser tab.
+
+
+
+
+ Is there a phone app?
+
+
+ No. Statsify runs on Windows, macOS and Linux. The web version works in a phone's browser too, if you
+ host it yourself.
+
+
+
+
+ How do I update Statsify?
+
+
+ Download the new version and install it over the old one. Your history, settings and sign-in are kept.
+ Statsify doesn't update itself yet.
+
+
+
+
+ How do I uninstall it and delete my data?
+
+
+ In Statsify, Sign out and erase data under Settings,
+ Account deletes your history from this computer. Then remove the app like any other.
+ The Windows installer's uninstaller can also delete the app's data. Neither touches your Spotify
+ account. To take away Statsify's access, remove it on Spotify's
+ Manage apps page.
+
+ Thank you for checking out Statsify. It's free and open source, so if you like it, give it a star on
+ GitHub to help other people find it, or buy me a coffee.
+
Yes. It's open source under the Apache-2.0 licence, with no ads and no subscription. If you'd like to
- support it, you can buy me a coffee.
+ support it, star it on GitHub or
+ buy me a coffee.