Skip to content

maximilianfalco/github-activity-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Activity Tracker

GitHub Activity Tracker

A personal dashboard for keeping tabs on your GitHub activity across all your repos.

TypeScript Next.js React Tailwind tRPC Prisma


Why?

GitHub UI kinda sucks and I got tired to needing to comb through branches and repos and PRs just to give a daily update to my team. Hopefully this dashboard improves it!

The app now also has a desktop shell mode powered by Electron so it can grow into a local agent workspace with a real terminal, not just a browser dashboard.

What it does

Sign in with GitHub and you get a dashboard showing everything you've been up to:

  • Overview — quick glance at your commit count, PR status, and reviews given
  • Commits — browse your commits with date filters (1d/7d/30d/90d), branch names, and SHAs
  • Pull Requests — see your PRs filtered by open, merged, or closed
  • Reviews — PRs you've reviewed
  • Repos — activity broken down by repository, sortable by activity or recency
  • Recap — AI-generated standup recaps from your recent activity (24h–72h configurable), filterable by activity type (commits, PRs, reviews) and repo, with a custom rule editor so you can control the tone, format, and style of the output
  • Settings — configure default time windows, notifications, and your custom AI recap rule, saved with a single form submit

Everything auto-refreshes and results are cached so you don't burn through GitHub's rate limits.

Quick Start

You'll need Node.js 22+, pnpm, Docker or another PostgreSQL instance, and Go 1.24+ if you want to use the local CLI.

The fastest setup path is one command:

./scripts/setup.sh

It will:

  • create .env if needed
  • prompt for your GitHub OAuth app credentials
  • install dependencies
  • start a local Postgres container if Docker or Podman is available
  • apply the Prisma schema
  • install ghat to ~/.local/bin by default
  • sync repo .env with ~/.config/ghat/.env so the global CLI can run outside the repo

You can also run the same flow with:

make setup

or:

pnpm run bootstrap
git clone https://github.com/maximilianfalco/github-activity-tracker.git
cd github-activity-tracker
make setup

Then open localhost:4731 and sign in with GitHub.

Desktop Mode

If you want to run the app as a desktop shell instead of in a browser tab:

pnpm desktop:dev

That starts the Next.js dev server and opens the app in Electron.

For a production-style desktop launch, build the app first and then start the desktop runtime:

pnpm build
pnpm desktop:start

Right now the Electron shell wraps the existing dashboard so the app can evolve toward native desktop features like an embedded PTY-backed agent terminal.

When ghat loads configuration, it uses this precedence:

  1. existing process environment variables
  2. repo-local .env in the current working directory
  3. global fallback ~/.config/ghat/.env

That keeps the CLI aligned with the web app when you're inside the repo, while still letting the globally installed binary work from anywhere else.

If you need to resync those files later, run:

make sync-config

or:

pnpm run sync-config

That merge is two-way, but repo-local .env wins on conflicts.

CLI Companion

This repo also ships with a local CLI companion called ghat that plugs into the same database, cached activity, settings, and GitHub credentials as the web app.

pnpm ghat

If you want to sign in directly from the terminal first, use:

pnpm ghat login

Run it and you get a menu-driven terminal version of the tracker:

  • auto-detect your local GitHub-backed user from the shared database
  • reuse the saved GitHub token if one already exists
  • open GitHub OAuth in your browser from the terminal with device flow
  • read and write the same cached activity and user settings as the web app
  • give you arrow-key menus powered by Charm's huh
  • use lipgloss styling for headings, status messages, and output sections

You can jump into:

  • Login with GitHub
  • Overview
  • Commits
  • Pull Requests
  • Reviews
  • Repos
  • Recap
  • Refresh GitHub data
  • Settings
  • Recap repo filtering in Settings so your standup only uses the repos you care about
  • Switch user
  • Logout everywhere

If you want to skip the menu, you can also call commands directly:

go run ./cmd/ghat login
go run ./cmd/ghat overview
go run ./cmd/ghat commits
go run ./cmd/ghat prs
go run ./cmd/ghat recap
go run ./cmd/ghat recap-context --hours 24 --json
go run ./cmd/ghat refresh

For external tools and coding agents, ghat also exposes recap context without calling OpenAI:

ghat recap-context --hours 24 --json
ghat recap-context --hours 48 --types commit,pr --repos owner/repo --json

That command returns the saved custom recap rule, the base recap instructions, the filtered activity items, and the preformatted activity text so another agent can generate the final recap itself.

Environment variables
Variable Description
DATABASE_URL PostgreSQL connection string
AUTH_SECRET NextAuth secret (generate with openssl rand -base64 32)
AUTH_GITHUB_ID GitHub OAuth app client ID
AUTH_GITHUB_SECRET GitHub OAuth app client secret
OPENAI_API_KEY OpenAI API key (used for AI recap generation)

You'll need to create a GitHub OAuth app at github.com/settings/developers with the callback URL set to http://localhost:4731/api/auth/callback/github. The same AUTH_GITHUB_ID is also used by the CLI device flow login.

How it works

  1. You sign in with GitHub OAuth (repo, read:user, read:org scopes)
  2. The app fetches your commits, PRs, and reviews from the GitHub API — commits use a hybrid approach (Events API + Search API) for better coverage
  3. Results get cached in Postgres with a 15-min TTL so you're not hammering the API
  4. tRPC serves the data to the frontend where React Query handles caching, polling, and keeping things fresh
  5. The recap page sends your filtered activity to an AI model (GPT-4o-mini) with your custom style instructions to generate a standup-ready summary you can copy or export as JSON

Project Structure

cmd/
├── ghat/                 Go CLI entrypoint
internal/
├── ai/                   Recap generation client
├── app/                  CLI command flow, menus, and output rendering
├── auth/                 Shared local auth/user resolution
├── config/               Runtime env loading for the CLI
├── data/                 PostgreSQL reads/writes for users, settings, and cache
├── domain/               Activity filtering, summaries, and recap prep
└── github/               GitHub API + OAuth device flow client
src/
├── app/                  Next.js pages and API routes
│   ├── dashboard/        All the dashboard views
│   └── api/              Auth + tRPC handlers
├── components/           UI components (shadcn/ui + custom dashboard pieces)
├── server/
│   ├── api/routers/      tRPC routers for github data and settings
│   ├── services/         GitHub API client and cache layer
│   └── auth/             NextAuth config
├── trpc/                 Client/server tRPC setup
└── hooks/                Auto-refresh polling, etc.

Scripts

Command What it does
pnpm dev Dev server on port 4731
pnpm desktop:dev Launch the Electron desktop shell against the local dev server
pnpm desktop:start Launch the Electron desktop shell against the production Next build
pnpm build Production build
pnpm check Lint + typecheck
pnpm test Run tests
pnpm ghat Launch the interactive GitHub Activity Tracker CLI
pnpm ghat:test Run Go tests for the CLI companion
pnpm db:push Push schema to database
pnpm db:studio Open Prisma Studio
pnpm docker:dev Start dev containers (with hot reload)
pnpm docker:prod Start production containers
pnpm docker:build Build production Docker image

License

MIT

About

a personal dashboard to view your recent github activities

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors