seo: surface live GitHub / PyPI / Docker community counts#101
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
External SEO audit (Section 3 #7) asked for GitHub stars, PyPI download count, and Docker Hub pulls as credibility signals on the homepage. The earlier PR #98 substituted internal CI metrics; this PR adds the literal audit ask alongside, so AI quality raters and answer engines see the adoption numbers they actually look for. Design: refresh out-of-band, ship the snapshot. * scripts/refresh-credibility-stats.mjs fetches three public APIs (github.com/api, pypi.org/pypi, hub.docker.com/v2), writes the result to src/lib/credibility-stats.json. Every source is best-effort — on failure (rate limit, network, schema drift) the previous value is preserved rather than blanked, so a transient upstream blip never wipes the row. * src/lib/credibility-stats.json is committed. Production builds never hit a third-party API and never block on one. Operators run `npm run refresh:credibility` manually after a release (or on a weekly cron) to keep the numbers current. * src/lib/credibility-stats.ts is the typed import wrapper, plus a small formatCompactCount helper (2744 → "2.7k") so the hero row stays terse on mobile. UI: * HomePage HeroSection — new CommunityCountsRow under the existing "Proven in CI" line. Renders inside the prerendered shell from #95 + #96, so AI crawlers see the live numbers in the initial HTML response, not after JS mount. Each segment renders only if its source field is non-null. * AboutPage — new AdoptionStatsRow under the existing 4-up CI proof grid. Slightly fuller treatment (clickable tiles linking to the source: GitHub repo, Docker Hub repo, PyPI project) plus a "Counts last refreshed YYYY-MM-DD" footnote. Initial snapshot (refresh ran 2026-05-25): * 212 GitHub stars * 8 GitHub forks * 2,744 Docker pulls (statewavedev/statewave) * statewave v0.8.0 on PyPI * pypi_downloads_month: null (pypistats.org rate-limited on the first run; will fill in on the next refresh) Anti-drift: numbers will go stale between refreshes — that's the trade for build determinism. The fetched_at field is exposed on the About page so the staleness is visible. Bundle / DOM effect on the prerendered homepage: * dist/index.html: ~21.4 kB → ~22.0 kB (+~0.6 kB; well under the SSR floor and immaterial vs the 5 kB gz transfer). * No new dependencies.
75af92f to
3cc00fb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
External SEO audit (Section 3 #7) asked for GitHub stars, PyPI download count, and Docker Hub pulls as credibility signals. PR #98 substituted internal CI metrics (tests / evals / benchmark); this PR adds the literal audit ask, plus npm (the audit forgot `@statewavedev/sdk`, but if PyPI / Docker count then npm does too).
Where the counts surface
After in-flight feedback (hero was feeling like a data dump with four metadata lines under the CTAs), the counts live only on `/about` as a 4-up tile grid, not in the hero. The hero keeps the existing "Proven in CI: 680 / 55 / 8-8" CI row and nothing more.
Each tile drops out individually if its source field is null — a transient rate-limit never blanks the whole row.
Design: refresh out-of-band, ship the snapshot
Current snapshot (refresh ran 2026-05-25)
Bundle / DOM effect
Test plan