Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

IssueTriage backend

A small Node HTTP server that sits between the browser and Nango. It keeps the Nango secret key out of browser code, creates Connect sessions, reads synced records, triggers the sync on demand, receives Nango webhooks, and runs the AI agent loop.

Run

npm install
cp .env.example .env
npm run dev          # http://localhost:8787

Set NANGO_SECRET_KEY in .env. If NANGO_CONNECTION_ID is omitted, the server resolves the latest github-app-oauth connection that matches the demo tags. Set ANTHROPIC_API_KEY to enable the AI Helper; without it /api/agent returns a clear error and the rest of the API keeps working.

Endpoints

Route Purpose
GET /api/health Reports whether the secret key and agent are configured.
GET /api/connection Resolves the active connection id.
POST /api/connect/session Creates a Nango Connect session for the frontend.
GET /api/repos Lists GithubRepository records from the sync.
GET /api/issues Lists GithubIssue and GithubPullRequest records.
POST /api/refresh Triggers the sync on demand.
POST /api/agent Runs the Claude tool-use loop over the Nango MCP tools.
GET /api/events Server-Sent Events stream for live sync updates.
POST /api/nango/webhook Receives Nango sync and auth webhooks.

The frontend dev server proxies /api/* to http://localhost:8787.