Skip to content

Add GitHub Stars lead tracking to web admin#3692

Merged
ComputelessComputer merged 4 commits intomainfrom
devin/1770386814-admin-github-stars
Feb 6, 2026
Merged

Add GitHub Stars lead tracking to web admin#3692
ComputelessComputer merged 4 commits intomainfrom
devin/1770386814-admin-github-stars

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 6, 2026

Add GitHub Stars lead tracking to web admin

Summary

Implements a "Catching Stars" feature inspired by Val Town's blog post — an admin dashboard to track GitHub stargazers/activity on fastrepl/hyprnote and qualify them as potential leads/hires using LLM research via OpenRouter.

New files:

  • supabase/migrations/20250206000000_create_github_star_leads.sql — Postgres table for storing stargazer data and AI research results
  • supabase/migrations/20250206000001_github_star_leads_rls.sql — RLS policy (service_role only)
  • apps/web/src/functions/github-stars.ts — Server functions for GitHub API polling, DB operations, and OpenRouter-based lead research
  • apps/web/src/routes/admin/stars/index.tsx — Dashboard UI with table view, search, filters, and per-lead research trigger
  • apps/web/src/routes/api/admin/stars/{leads,fetch,research}.ts — API endpoints (admin-protected)

Modified files:

  • apps/web/src/routes/admin/route.tsx — Renamed "Content Admin" → "Char Admin", added "Stars" nav link with vertical separator after "Media"

Updates since last revision

  • Renamed to "Char Admin": Header title, page title meta, and description updated from "Content Admin" to "Char Admin".
  • Added vertical separator: A div separator between "Media" and "Stars" nav links in the admin header.
  • Added RLS policy: New migration (20250206000001) enables Row Level Security on github_star_leads and grants full access to service_role.

Review & Testing Checklist for Human

  • Database connection management: getSql() creates a new postgres() connection on every function call without pooling or closing. Under load (e.g. researching many leads), this could leak connections. Consider a singleton or connection pool.
  • GitHub API rate limiting: Stargazer fetching and activity polling use unauthenticated GitHub API (60 req/hr limit). fetchGitHubActivity() also makes a per-user API call for bio data, which compounds quickly. Consider adding a GitHub token.
  • OPENROUTER_API_KEY handling: Not registered in apps/web/src/env.ts validation schema — read directly from process.env. The research endpoint also accepts API keys in the request body; verify this is acceptable from a security perspective.
  • Type casts on DB results: Multiple as unknown as StarLead[] casts bypass type checking on query results. If the DB schema drifts from the StarLead interface, these will silently produce incorrect types at runtime.
  • Both migrations must be applied: Run 20250206000000_create_github_star_leads.sql (table) and 20250206000001_github_star_leads_rls.sql (RLS) against your database.

Recommended test plan:

  1. Apply both migrations to your database
  2. Navigate to /admin/stars/ — verify header says "Char Admin" with separator before "Stars"
  3. Click "Fetch Stars" and confirm stargazers are imported
  4. Click "Research" on a lead and verify the AI qualification runs
  5. Check that filters (All / Researched / Unresearched) and search work correctly

Notes

- Add /admin/stars/ dashboard page for tracking GitHub stargazers
- Add API routes for fetching stars, researching leads via OpenRouter AI
- Add Supabase migration for github_star_leads table
- Add Stars nav link to admin header

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@netlify
Copy link

netlify bot commented Feb 6, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit b0102f6
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6986076ece02550009a243d4
😎 Deploy Preview https://deploy-preview-3692--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 6, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit b0102f6
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6986076ece02550009a243d6

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

devin-ai-integration bot and others added 3 commits February 6, 2026 14:27
…act import, add auto-generated routeTree

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
…eads

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
@ComputelessComputer ComputelessComputer merged commit cef06e6 into main Feb 6, 2026
17 of 18 checks passed
@ComputelessComputer ComputelessComputer deleted the devin/1770386814-admin-github-stars branch February 6, 2026 16:05
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.

1 participant