PatchSignal backend

API proof: GET /api/health. Interactive docs: /docs (Swagger UI) · raw spec: /api/openapi.

Start the backend

  1. Fill .env (see .env.example): DATABASE_URL, GEMINI_API_KEY, GITHUB_TOKEN, CLOUDINARY_*, RUNNER_TOKEN.
  2. npm install (first time), then npx prisma migrate dev once DATABASE_URL is set.
  3. npm run dev → http://localhost:3000 (restart after any .env change).
  4. Runner (separate terminal): set RUNNER_TOKEN to the same value, then npm run runner:dev → :5001.

Flow

  1. POST /api/investigations (multipart: repoUrl, description, screenshots[])
  2. POST /api/investigations/:id/analyze
  3. POST /api/investigations/:id/inspect
  4. POST /api/investigations/:id/hypotheses
  5. POST /api/investigations/:id/runs
  6. GET /api/investigations/:id/package