Measure interactions on your Github repositories! Reach out to your fans!
Hono Github Tracker is a simple app to track interactions on your Github repositories. It listens to Github Webhooks and stores the events in a database.
This app is using the HONC stack - this includes Neon, for which you will need to create an account for.
As we're interacting with both Github Webhooks and the Github API, you will need to create/add an API token and set a webhook secret on the repo you'd like to monitor.
Note
Make sure you configure the webhook to listen to the changes you're
interested in, and update the array of the event listener in
src/api/index.ts
.
To get started locally, you will need to create a .dev.vars
file in the root
of the project, with the following three variables:
# .dev.vars
DATABASE_URL=postgresql://neondb_owner:...
GITHUB_API_TOKEN=github_...
GITHUB_WEBHOOK_SECRET=...
Tip
If using bun
feels too edgy, just use your favourite package manager.
bun install
bun dev
Your app will start on localhost:8787
.
To receive webhooks, you will need to expose your local server to the internet. You could use Ngrok, VS Code Ports or any other tool you're comfortable with.
Hono Github Tracker is using FPX for local development, which has a neat feature to proxy Webhook requests to your local development server.
To make use of FPX proxying, run FPX in a separate terminal:
bun studio
Important
When using any proxy tool, make sure to append the URL with
/api/github/webhook
The app exposes a dashboard on localhost:8787/
with basic information about
the repositories you're tracking.
This app is under active (though not always fast) development. If you're running into issues, have questions or suggestions, feel free to open an issue.
- Authenticated dashboard: we shouldn't expose the dashboard to the public.