Skip to content

Live Github Star Count + Connection Count#2391

Merged
drew-harris merged 11 commits into
new-homepage-stopa-ideasfrom
drewh/star-count
Mar 23, 2026
Merged

Live Github Star Count + Connection Count#2391
drew-harris merged 11 commits into
new-homepage-stopa-ideasfrom
drewh/star-count

Conversation

@drew-harris
Copy link
Copy Markdown
Contributor

@drew-harris drew-harris commented Mar 19, 2026

  • Adds back the Sign In / Dashboard button in the navbar
  • Adds the live github star count in the badge in the navbar
  • Updates the homepage concurrent connection to be a real value
  • Adds a real link for the techcrunch article
  • Adds a new SWR middleware to allow us to control TTL for localstorage cached values, and prevent refetching if server has provided value for us (necessary for preventing hydration errors since every query in swr is saved to local storage / immediately loaded before hydration.

BACKEND SETUP:
Set GITHUB_PERSONAL_ACCESS_TOKEN
(will still use public auth if unset)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 63919708-b145-4b10-b346-dfb18d2cec78

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drewh/star-count

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread client/www/pages/_app.tsx
Comment on lines +70 to +72
fallback: {
starCount: pageProps.starCount,
},
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be cool to just spread pageProps here, then any return from getServerSideProps on any page will automatically populate the swr cache for each key.

But leaving explicit for now for clarity in the PR.

);
}

export const getStaticProps: GetStaticProps = async () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anyone who visits the landing page will get a fresh value for the github star count immediately thats no more than one hour old.

@github-actions
Copy link
Copy Markdown
Contributor

View Vercel preview at instant-www-js-drewh-star-count-jsv.vercel.app.

Comment thread client/www/components/new-landing/SocialProof.tsx Outdated
Comment thread client/www/lib/getGithubStarCount.ts
Comment thread client/www/lib/getGithubStarCount.ts Outdated
Comment thread client/www/lib/getGithubStarCount.ts Outdated
Comment thread client/www/lib/swrMiddleware.ts Outdated
Copy link
Copy Markdown
Contributor

@stopachka stopachka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship it!

Comment thread client/www/components/new-landing/SocialProof.tsx Outdated
Comment thread client/www/lib/getGithubStars.ts Outdated
Copy link
Copy Markdown
Contributor

@stopachka stopachka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM!

@drew-harris drew-harris merged commit 650fc0d into new-homepage-stopa-ideas Mar 23, 2026
28 checks passed
@drew-harris drew-harris deleted the drewh/star-count branch March 23, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants