repo-pulse

RepoPulse — Deployment

Phase 1 deployment targets Vercel.

Requirements

Local

Register a GitHub OAuth App at https://github.com/settings/developers:

Then set the credentials in .env.local:

GITHUB_CLIENT_ID=your_client_id_here
GITHUB_CLIENT_SECRET=your_client_secret_here

Vercel

  1. Register a GitHub OAuth App (separate from local) with:
    • Homepage URL: your Vercel deployment URL
    • Authorization callback URL: https://your-app.vercel.app/api/auth/callback
  2. Import arun-gupta/repo-pulse into Vercel
  3. Keep the default Next.js framework/build settings
  4. In the Vercel project, open Settings -> Environment Variables
  5. Add GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET from your OAuth App
  6. Save for Production (and optionally Preview)
  7. Deploy or redeploy the project

Verify

  1. Open the deployed URL
  2. Confirm a “Sign in with GitHub” button appears
  3. Click it and complete the GitHub OAuth authorization
  4. Confirm your GitHub username is shown after sign-in
  5. Submit one or more repos and confirm analysis succeeds
  6. Confirm the token does not appear in the UI or browser URL

/demo route — data refresh pipeline

The /demo route ships pre-analyzed data so visitors can explore the app without authenticating. It is powered by JSON fixtures under fixtures/demo/** and refreshed weekly by a GitHub Action.

Roster (hard-coded in scripts/generate-demo-fixtures.ts):

To change the roster, edit DEMO_REPOS / DEMO_ORG in that script and merge. The next run regenerates fixtures with the new set.

Pipeline.github/workflows/refresh-demo-fixtures.yml:

  1. Runs weekly (Mondays 09:00 UTC) or on manual workflow_dispatch.
  2. Checks out main and runs npm run demo:fixtures, which invokes the latest analyzer code against the roster.
  3. Opens a PR (chore/demo-fixture-refresh) with only the updated JSON under fixtures/demo/**.
  4. On merge, Vercel’s Git integration auto-redeploys main, which bundles:
    • Latest frontend (whatever merged during the week)
    • Latest analyzer code
    • Freshly-regenerated fixtures from the merged PR

The workflow only refreshes data. Frontend and analyzer changes deploy continuously via Vercel as their PRs merge — the weekly action does not ship code.

Required repo setting — Settings → Actions → General → Workflow permissions → “Allow GitHub Actions to create and approve pull requests” must be enabled, otherwise the PR-open step fails with GitHub Actions is not permitted to create or approve pull requests.

Operational tip — merge the refresh PR promptly. If it sits open while frontend/analyzer PRs continue to land, the deployed /demo data can drift out of sync with the deployed UI/logic.

AI Chat (Optional)

The chat panel appears on every analysis view once a user is signed in. Without a server key it operates in “bring your own key” mode only.

To enable 5 free chats per GitHub login per day, add exactly one of the following to your Vercel environment variables (the first key found wins):

Variable Provider
ANTHROPIC_API_KEY Anthropic Claude (default preference)
OPENAI_API_KEY OpenAI GPT
GOOGLE_API_KEY Google Gemini
GROQ_API_KEY Groq

Users who exceed the daily free limit — or who want to choose a different provider/model — can enter their own API key directly in the chat panel. That key is transmitted to the API route and forwarded to the provider; it is never logged or persisted.

See docs/ai-chat.md for full feature details.

Notes