Commit Graph
181 Commits
Author SHA1 Message Date
shayandClaude Opus 5.5 d907815f19 feat(launch): friendly GitHub-limit message on Generate; document the score formula
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 06:12:22 -08:00
shayandClaude Opus 5.5 b737a0171e chore(launch): score collaborators over top 15 repos
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 10:37:41 -08:00
shayandClaude Opus 5.5 53ae54fe98 feat(launch): cap per-user language fetch at 40 repos, raise enrollment caps, fix cap message
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 10:30:52 -08:00
shay e47a67d1a1 feat(seo): link the profile README template 2026-11-29 00:23:36 -08:00
shay f5fab0d6c3 feat(seo): add sigma-five mirror migration row 2026-11-28 10:36:02 -08:00
shay 98547a3f33 feat(seo): add IndexNow key file 2026-11-28 10:27:07 -08:00
shay c0eba0b5a4 feat(growth): themes and alternative pages, result-screen hints 2026-11-28 10:22:36 -08:00
shayandClaude Opus 5.5 3653ef66a5 feat(growth): link the card footer back, copy-on-open, two SEO pages
- composite footer links to gh-stats.com (?ref=card)
- result screen: 'Copy & open your README' copies the snippet
- new pages: github-top-languages-card, github-profile-readme (+ sitemap)
- README snippets wrap the card in a link

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 22:45:30 -08:00
shayandClaude Opus 5.5 74a8146779 feat(deploy): log one access line per request to stdout
Each gunicorn service (edge, fetcher, generator) now writes a request line
("GET /x HTTP/1.1" 200 12ms) to stdout, which Pantheos ingests for request
logs and rps / 5xx / p95. /metrics and /health are left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 10:50:32 -04:00
shayandClaude Opus 5 02e7270440 feat(seo): add a migration landing page and list it in the sitemap
gh-stats.com had exactly one indexable URL. The app is a client-rendered
SPA with no content routes, so nothing ranked for anything but the brand
name, and acquisition stopped whenever a push channel stopped.

This adds a static page targeting the migration demand from
anuraghazra/github-readme-stats, which is marked no longer maintained.
Content is reused from the README's migration section. Vite copies
public/ into dist/, which the Dockerfile copies to src/static/, and the
Flask catch-all serves static paths before falling back to index.html,
so this needs no routing change.

It carries the same GA4 stream as index.html so the page is measurable
rather than another unattributed channel.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HPCsXoXrazZsFpxdLi8Pvn
2026-09-06 13:15:08 -07:00
shayandClaude Opus 5 9b5a13f26b fix(frontend): resolve the profile README link against HEAD, not main.
The link hardcoded /edit/main/README.md, so anyone whose profile repo
still defaults to master got a 404. GitHub resolves HEAD to the default
branch, verified against repos where /blob/main/ 404s and /blob/HEAD/
returns 200.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-25 08:28:41 -07:00
shayandClaude Opus 5 a25ae33f29 fix(frontend): give the embed snippet somewhere to paste.
The result screen ended at the snippet and a copy button. GitHub only
renders a profile README from the repo named exactly after the account,
and 15 of 23 arrivals did not have that repo, so the copy button was a
dead end for most people. Add two links under the snippet: open the
README, or create the repo.

Also serve a placeholder card instead of a JSON 400 when someone pastes
the README snippet without swapping YOUR_USERNAME for their own name,
and show a live example card in the README.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-25 08:10:32 -07:00
ShayManorandClaude Opus 5 27645048f1 feat(deploy): add self-host compose file and document self-hosting
The repo had three Dockerfiles but nothing that ran them together, and the
README never mentioned self-hosting. The only deploy path was deploy/compose.yml,
which is bound to the production box: it pulls private ghcr images and hard-fails
on seven env vars including OAuth credentials, so nobody else could run it.

Every one of those vars already has a default in the service config; the
:?missing guards are a production-deploy check, not an application requirement.
This adds a root compose file that builds the three services from source and
needs only GITHUB_PAT and FETCHER_INTERNAL_TOKEN.

deploy/compose.yml is unchanged, so production is unaffected.

Verified by running it: all three images build, all five containers start, the
generator serves the SPA and /api/health, and edge answers /<username> with
upstream_ok true.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
v0.1.0
2026-08-23 10:33:26 -07:00
shayandClaude Opus 5 107273a1c8 fix(auth): send an https redirect_uri so GitHub sign-in works
The OAuth app registers https://gh-stats.com/api/auth/github/callback, but
the app was sending the http:// form. GitHub compares redirect_uri to the
registered callback character for character, so it refused every attempt
with "The redirect_uri is not associated with this application" and showed
users a warning that the app might be redirecting them somewhere they were
not expecting. Sign-in has been failing for everyone, and it gates themes,
custom tags and achievements.

_derived_redirect_uri built the URL from X-Forwarded-Proto, falling back to
request.scheme. The cloudflared tunnel does not reliably forward that
header, so the scheme resolved to http. The comment above it claimed the
headers are set, which is what hid this.

Anything that is not localhost or 127.0.0.1 is https. Local dev keeps
working over plain http, pinned by a test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-23 09:38:26 -07:00
shay 12f6890f57 feat(readme): add migration guide for transitioning from github-readme-stats. 2026-08-22 16:33:29 -07:00
shay 584306beb0 feat(api): add widget_name parameter to render_composite_adhoc function. 2026-08-22 16:33:24 -07:00
shayandClaude Opus 5 319f37761c chore: add MIT license
The repo had no license file, which means all rights reserved: nobody
could legally fork or reuse it. MIT is the category norm.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-22 16:10:44 -07:00
shayandClaude Opus 5 faf41ad952 feat(frontend): show the product, keep work across sign-in, add social preview
Of 27 people who typed a username in the last 14 days, 15 left before a
widget rendered. The landing page showed zero pixels of a product whose
entire value is visual, so it now leads with a live example card and says
concretely what you get.

Sign-in used to discard everything: with no router the OAuth `next` is
always "/", so users came back to an empty search box with their theme,
widget order and achievements gone. Persist work-in-progress to
sessionStorage and restore it on mount.

The Workshop preview seeds from demo data (grade A, 842 commits,
collaborators named alex/jordan/sam) with nothing saying so, so users saw
numbers they knew were wrong. Label it until real data arrives.

Add title, description, canonical, OG and Twitter tags, robots.txt and a
sitemap. The page was a 445-byte shell titled "GitHub Widgets", so every
link shared anywhere rendered with no image and no description.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-22 16:10:44 -07:00
shayandClaude Opus 5 0904c4bb9f feat(generator): raise enrollment ceiling, add burst guard, stop enqueue loop
ENROLLMENT_DAILY_CAP was 50, so any traffic spike past 50 new users in a
day was turned away with a rate_limited card. Raise the default to 500 and
add ENROLLMENT_HOURLY_CAP=60. The hourly guard is the one that actually
protects the shared PAT: a new user costs ~37 REST calls (p90 ~104)
against a 5000/hr budget, and a spike arrives inside an hour rather than
spread over a day. Counted off users.enrolled_at, so no schema change.

Also stop an unbounded enqueue loop. `name` is drawn inside the composite
and never persisted standalone, and `achievements` renders nothing until
the user authors one, so their SVG is permanently absent and every request
re-enqueued a build that could never produce it. Only self-heal when no
build has actually landed, keyed off widget_data for the current hash.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-22 16:10:44 -07:00
shayandClaude Opus 5 769cde552d feat(widgets): attribution on every widget, and make it legible
Five of the seven standalone widgets and all three placeholder cards
carried no attribution at all, and where it did render it was font-size 9
at opacity 0.5 (about 2.1:1 contrast) at the bottom of a 1500px card. Each
embedded widget sits on a public profile and is the only organic
acquisition surface we have.

Shared helper so the styling can't drift again. font-size 10, opacity
0.75 (about 3.1:1), still using the theme's text_secondary so it stays
roughly 4x fainter than the user's own content. Composite output is
byte-identical in size; four standalone cards grow 16px where the footer
would otherwise collide with existing content.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-22 16:10:26 -07:00
shayandClaude Opus 5 06ab1c878e fix(fetcher): guard REST calls so a rate limit can't poison user records
The five REST calls parsed `.json()` with no status check, so a 403
{"message": "API rate limit exceeded..."} body was returned as user data.
`_is_github_not_found` only matched "Not Found", so it was recorded as a
successful fetch and upsert_user overwrote the user's last-good row. Every
user touched during the exhaustion window then served a blank card for up
to 24h while /metrics reported ok.

Reuse the existing `_raise_if_transient` on all five so exhaustion raises
GitHubTransientError before the upsert, preserving last-good and letting
the caller retry. `_raise_if_transient` was GraphQL-shaped and crashed on
the JSON arrays the list endpoints return, so it now ignores non-dict
bodies. A rate limit inside the per-repo fan-out aborts the fetch; a 404
on a single repo stays non-fatal.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BwMoSbmK77Ph7XaV5YnAdS
2026-08-22 16:10:26 -07:00
shay eea1734a04 fix(languages): center donut chart and legend based on card midline. 2026-07-25 16:23:28 -07:00
shay fe4bb4e87e fix(api): normalize GitHub usernames to lowercase and update tests. 2026-07-19 21:01:40 -07:00
shayandClaude Opus 4.8 0586f83a33 fix(fetcher): keep last-good counts on GitHub rate limits + expose fetch metrics
Rate-limited / 5xx / network failures were silently returning 0 from the
commit- and PR-count paths, then overwriting good values in fetcher.db —
turning a traffic spike into permanently-wrong "0 commits" cards. Raise
GitHubTransientError instead so the fetch aborts and the last-good row is
retained; genuine NOT_FOUND still yields 0.

Add a shared fetch-outcome counter (fetch_metrics table, spanning the web
workers and the cron container) surfaced at an unauthenticated GET /metrics
as ghstats_fetch_total{outcome="ok|not_found|rate_limited|error"}, so rate
limits are visible to the monitoring stack instead of dying silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 11:45:42 -07:00
shay d1e89fb1c3 fix(api): normalize GitHub usernames to lowercase and update tests. 2026-06-12 01:37:08 -07:00
shay e53d1cfbe0 fix(api): normalize GitHub usernames to lowercase and update tests. 2026-06-12 01:17:53 -07:00
shay c54b5ac6ff feat(ResultScreen): wraps embed image markdown in a link to origin 2026-06-11 21:33:39 -07:00
shay ceac269738 feat(ResultScreen): wraps embed image markdown in a link to origin 2026-06-11 16:12:06 -07:00
shay 78299fa2b9 feat(GrowthChart): refactor y-coordinate mapping and add 2026-05-29 10:27:45 -07:00
shay 410b503877 feat(Analytics): add daily stats rollup to persist data beyond pruning 2026-05-27 10:47:42 -07:00
shay 61b8090c64 feat(api): add endpoint for retrieving growth data for the dashboard 2026-05-27 10:28:51 -07:00
shay a1d1813a51 feat(api): add endpoint for retrieving growth data for the dashboard 2026-05-27 10:23:49 -07:00
shay f66088e5d6 feat(api): add endpoint for retrieving growth data for the dashboard 2026-05-27 10:21:32 -07:00
shay 99c40cb0ce feat(api): add endpoint for retrieving growth data for the dashboard 2026-05-27 10:16:11 -07:00
shay e7a0521ff6 feat(api): implement self-healing build enqueue for user widgets 2026-05-26 15:23:14 -07:00
shay 2be8dc1ca3 feat(firebase): add Firebase initialization script to index.html 2026-05-26 15:20:41 -07:00
shay 369d42bb5f feat(api): implement auto-enrollment for unknown users on first hit 2026-05-26 15:10:20 -07:00
shay 151f330d31 feat(analytics): add request tracking decorator for API endpoints 2026-05-12 01:47:13 -04:00
shay 01927b2173 feat(analytics): include render-only users in activity count query 2026-05-11 23:34:57 -04:00
shay d4cbbae82a feat(api): add basic auth protection to /dev dashboard route 2026-05-11 19:03:26 -04:00
shay ef48d2581b feat(admin dashboard): add admin dashboard 2026-05-11 18:26:43 -04:00
shay 00bf46968a feat(admin dashboard): add admin dashboard 2026-05-11 18:25:09 -04:00
shay ab7c9b32aa feat(README): update 2026-05-08 19:46:01 -04:00
shay 05efac8fd2 feat(README): update 2026-05-08 19:45:37 -04:00
shay 9d15dd6c94 feat(grade): add data attributes for footer attribution in widgets 2026-05-06 16:38:59 -04:00
shay 8f7b27f806 feat(grade): add footer attribution for visual consistency in widget 2026-05-06 10:32:00 -04:00
shay 99378e13cd feat(api): add compatibility route for top-langs to handle upstream URLs. 2026-05-06 10:26:53 -04:00
shay 9639051398 feat(ResultScreen): add widget status and manual refresh functionality. 2026-05-04 21:52:44 -04:00
shay 8dbbd16cf9 feat(api): auto-enroll users typing unknown usernames into workshop 2026-05-04 16:34:12 -04:00
shay 6edf98334c feat(api): add idempotency check for already queued builds in callback 2026-05-04 15:52:03 -04:00