[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81332":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":12,"openIssues":14,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":10,"rankLanguage":10,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":10,"pushedAt":10,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":13,"starSnapshotCount":13,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},81332,"blamebot","huseynovvusal\u002Fblamebot","huseynovvusal","AI on-call agent that detects deploy failures explains what broke pages the responsible team and rolls back automatically.","https:\u002F\u002Fblamebot.huseynovvusal.dev",null,"TypeScript",42,0,5,40,"MIT License",false,"main",true,[21,22,23,24,25,26,27,28,29,30,31],"ai-agent","devops","hackathon","incident-management","nextjs","postmortem","redis","slack-bot","sre","upstash","vercel","2026-06-12 04:01:32","# BlameBot — AI-Powered Incident Intelligence\n\n![BlameBot](.\u002Fassets\u002Fimage.png)\n\n> **Vercel Zero to Agent Hackathon submission** · Solo · Deployed on Vercel\n\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![Deployed on Vercel](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDeployed_on-Vercel-black?logo=vercel)](https:\u002F\u002Fblamebot.vercel.app)\n[![Built with Next.js](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FBuilt_with-Next.js-black?logo=next.js)](https:\u002F\u002Fnextjs.org\u002F)\n[![Upstash Redis](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDatabase-Upstash_Redis-red)](https:\u002F\u002Fupstash.com)\n[![AI by Claude](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAI-Claude_3.5_Sonnet-purple)](https:\u002F\u002Fanthropic.com)\n\nBlameBot is an autonomous on-call agent that closes the loop from deploy failure to resolved incident — without waking up your whole team at 3 AM. It ingests alerts from Vercel, Sentry, and UptimeRobot, uses AI to explain what broke and who owns it, pages the right person via Slack, and can roll back the deployment automatically.\n\n**[Live Demo](https:\u002F\u002Fblamebot.huseynovvusal.dev)** · **[GitHub](https:\u002F\u002Fgithub.com\u002Fhuseynovvusal\u002Fblamebot)**\n\n---\n\n## Table of Contents\n- [The Problem](#the-problem)\n- [Built for Vercel Zero to Agent Hackathon](#built-for-vercel-zero-to-agent-hackathon)\n- [How It Works](#how-it-works)\n- [Features](#features)\n- [Tech Stack](#tech-stack)\n- [Setup](#setup)\n- [Webhook Setup](#webhook-setup)\n- [Slack App Setup](#slack-app-setup)\n- [Deployment](#deployment)\n- [API Reference](#api-reference)\n- [Project Structure](#project-structure)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## The Problem\n\nEvery on-call rotation has the same failure loop:\n\n1. Alert fires at 2 AM\n2. Engineer scrambles to find the right Slack thread, the right commit, the right person\n3. 40 minutes later: \"oh it was that one deploy\"\n4. Team manually writes a postmortem (or doesn't)\n\nBlameBot collapses that 40-minute scramble into a 10-second AI summary with one-click rollback.\n\n---\n\n## Built for Vercel Zero to Agent Hackathon\n\nThis project was built as a solo submission for the [Vercel Zero to Agent Hackathon](https:\u002F\u002Fcommunity.vercel.com\u002Fhackathons\u002Fzero-to-agent) (April 24 – May 4, 2026).\n\n**Why BlameBot fits the \"Zero to Agent\" theme:**\n\n- It is a genuine autonomous agent, not a chatbot. It receives a signal, reasons about it, takes action, and reports back — all without human involvement.\n- The agent loop spans multiple tools: GitHub for code context, Vercel API for rollback actions, Slack for communication, and Claude for reasoning.\n- Autopilot mode lets it close the full loop: detect → analyze → act → report — zero human steps required.\n\n---\n\n## How It Works\n\n```mermaid\nflowchart TD\n    %% Styling\n    classDef webhook fill:#e1f5fe,stroke:#0288d1,stroke-width:2px,color:#01579b\n    classDef pipeline fill:#fff3e0,stroke:#f57c00,stroke-width:2px,color:#e65100\n    classDef db fill:#e8f5e9,stroke:#388e3c,stroke-width:2px,color:#1b5e20\n    classDef ai fill:#ffebee,stroke:#d32f2f,stroke-width:2px,color:#b71c1c\n    classDef slack fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px,color:#4a148c\n    classDef ui fill:#eceff1,stroke:#455a64,stroke-width:2px,color:#263238\n\n    %% Triggers\n    subgraph Triggers [\"External Events (Webhooks)\"]\n        direction LR\n        Vercel([Vercel Deploy]):::webhook\n        Sentry([Sentry Error]):::webhook\n        Uptime([UptimeRobot]):::webhook\n    end\n\n    %% Pipeline\n    subgraph Core [\"Incident Pipeline (Orchestrator)\"]\n        direction TB\n        N[\"1. Normalize Payload\"]:::pipeline\n        E[\"2. Enrich with GitHub Data\u003Cbr\u002F>(Commits, PRs, Files)\"]:::pipeline\n        R[\"3. Resolve Code Owners\"]:::pipeline\n        Sev[\"4. Decide Severity\"]:::pipeline\n        H[\"5. Find Similar Incidents\"]:::pipeline\n        AI[\"6. Claude Sonnet AI Report\u003Cbr\u002F>(Root Cause, Blast Radius)\"]:::ai\n        P[(\"7. Persist to Redis\")]:::db\n        Dev[\"8. Update Developer Scores\"]:::pipeline\n        S[\"9. Post to Slack Channel\"]:::slack\n        Esc[\"10. Schedule Escalation\"]:::pipeline\n        Health[\"11. Update Integration Health\"]:::pipeline\n\n        N --> E --> R --> Sev --> H --> AI --> P --> Dev --> S --> Esc --> Health\n    end\n\n    %% Routing\n    Vercel --> N\n    Sentry --> N\n    Uptime --> N\n\n    %% UI & Actions\n    subgraph Presentation [\"Interaction & Presentation\"]\n        direction TB\n        SlackMsg[\"Slack Block Kit Alert\u003Cbr\u002F>Action Buttons: Acknowledge, Rollback, Hotfix\"]:::slack\n        Dash[\"Next.js Dashboard\u003Cbr\u002F>Analytics, Trends & Postmortems\"]:::ui\n    end\n\n    S --> SlackMsg\n    P -.-> Dash\n    SlackMsg -.-> Dash\n\n    %% Styling adjustments\n    style Triggers fill:transparent,stroke:#999,stroke-width:1px,stroke-dasharray: 5 5\n    style Core fill:transparent,stroke:#f57c00,stroke-width:2px\n    style Presentation fill:transparent,stroke:#455a64,stroke-width:1px,stroke-dasharray: 5 5\n```\n\n### Pipeline Steps\n\n| Step | What happens |\n|---|---|\n| **Normalize** | Converts raw webhook payloads into a standard incident format |\n| **Enrich** | Fetches commit SHA, PR info, and changed file list from GitHub |\n| **Resolve Owners** | Matches changed files against glob-pattern ownership rules |\n| **Decide Severity** | Applies configurable rules (site-down = critical, etc.) |\n| **Find Similar** | Queries Redis for incidents on the same files in the last 30 days |\n| **AI Report** | Claude Sonnet generates root cause, blast radius, recommended action |\n| **Persist** | Saves incident + timeline to Upstash Redis |\n| **Dev Scores** | Updates reliability scores for responsible developers |\n| **Post to Slack** | Sends rich Block Kit message to your incidents channel |\n| **Schedule Escalation** | Sets up timed escalation if incident goes unacknowledged |\n| **Health Check** | Stamps the last-seen time for the integration source |\n\n---\n\n## Features\n\n### Live Dashboard\n- Active incident count with severity breakdown\n- Real-time incident feed\n- Integration health status (Vercel, Sentry, UptimeRobot)\n- Top offenders — developers causing the most incidents\n- Activity feed across all ongoing incidents\n\n### AI-Powered Incident Reports\n- Root cause analysis written in plain English\n- Blast radius assessment (affected services, users, regions)\n- Recommended action (rollback, hotfix, monitor)\n- Automatic similarity detection against recent incidents\n- One-click postmortem generation\n\n### Slack-First Response\n- Rich Block Kit incident cards with all context in one message\n- Acknowledge \u002F Rollback \u002F Draft Hotfix PR buttons\n- Thread-based timeline updates\n- Escalation alerts when incidents go unacknowledged\n\n### Analytics\n- Incident trends over time charted by severity\n- MTTR (Mean Time to Resolution) tracking\n- Top problematic files and services\n- Developer reliability scores and leaderboard\n- Risk heatmap — incidents by day of week and hour\n- Service health scores\n\n### Configuration Panel\n- **Owner Rules** — file glob → Slack user\u002Fgroup mapping\n- **Severity Rules** — pattern-based auto-classification\n- **Escalation Policy** — per-severity delay and escalation contacts\n- **Blackout Windows** — timezone-aware quiet hours with fallback contact\n- **Autopilot** — auto-rollback thresholds per severity level\n- **Natural Language Config** — update any setting in plain English via AI\n\n### Autopilot Mode\nWhen enabled, BlameBot can automatically roll back a failing deployment via the Vercel API without any human intervention. Configurable per severity level with a confirmation grace window.\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|---|---|\n| Framework | Next.js 16 (App Router) |\n| UI | React 19, Tailwind CSS v4, shadcn\u002Fui |\n| AI | Vercel AI SDK 6, Claude Sonnet (Anthropic) — chosen over OpenAI for superior technical root cause reasoning |\n| Database | Upstash Redis |\n| Integrations | Vercel API, GitHub (Octokit), Slack |\n| Charts | Recharts |\n| Deployment | Vercel (with Cron Jobs) |\n\n---\n\n## Setup\n\n### Prerequisites\n\n- Node.js 18+\n- pnpm\n- Upstash Redis instance\n- Vercel project\n- Slack app (bot token + signing secret)\n- GitHub personal access token\n\n### 1. Clone and install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FVusalHuseynov\u002Fblamebot\ncd blamebot\npnpm install\n```\n\n### 2. Configure environment variables\n\nCreate `.env.local` in the project root:\n\n```bash\n# ── App ────────────────────────────────────────────────\nAPP_URL=http:\u002F\u002Flocalhost:3000\nNEXT_PUBLIC_APP_URL=http:\u002F\u002Flocalhost:3000\n\n# ── Upstash Redis ───────────────────────────────────────\n# Create a database at https:\u002F\u002Fconsole.upstash.com\nUPSTASH_REDIS_REST_URL=https:\u002F\u002Fyour-db.upstash.io\nUPSTASH_REDIS_REST_TOKEN=your_token\nKV_REST_API_URL=https:\u002F\u002Fyour-db.upstash.io\nKV_REST_API_TOKEN=your_token\n\n# ── GitHub ──────────────────────────────────────────────\n# PAT with repo + read:org scopes\nGITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx\nGITHUB_OWNER=your-org-or-username\nGITHUB_REPO=your-repo-name\n# For GitHub OAuth (optional)\nGITHUB_CLIENT_ID=Iv1.xxxxxxxxxxxx\nGITHUB_CLIENT_SECRET=your_secret\n\n# ── Slack ───────────────────────────────────────────────\n# Create an app at https:\u002F\u002Fapi.slack.com\u002Fapps\nSLACK_BOT_TOKEN=xoxb-xxxxxxxxxxxx\nSLACK_SIGNING_SECRET=your_signing_secret\nSLACK_INCIDENTS_CHANNEL_ID=C0XXXXXXXXX\n# For Slack OAuth (optional)\nSLACK_CLIENT_ID=your_client_id\nSLACK_CLIENT_SECRET=your_client_secret\n\n# ── Vercel ──────────────────────────────────────────────\n# API token from https:\u002F\u002Fvercel.com\u002Faccount\u002Ftokens\nVERCEL_API_TOKEN=your_vercel_token\nVERCEL_PROJECT_ID=prj_xxxxxxxxxxxx\n# VERCEL_TEAM_ID only needed for team projects\nVERCEL_TEAM_ID=team_xxxxxxxxxxxx\n\n# ── Webhook secrets ─────────────────────────────────────\n# Generate with: openssl rand -hex 32\nVERCEL_WEBHOOK_SECRET=your_secret\nSENTRY_WEBHOOK_SECRET=your_secret\nUPTIMEROBOT_WEBHOOK_SECRET=your_secret\n\n# ── Admin ───────────────────────────────────────────────\nADMIN_TOKEN=your_admin_token\nADMIN_COOKIE_SECRET=your_cookie_secret\n\n# ── Cron ────────────────────────────────────────────────\nCRON_SECRET=your_cron_secret\n```\n\n### 3. Run locally\n\n```bash\npnpm dev\n```\n\nOpen [http:\u002F\u002Flocalhost:3000](http:\u002F\u002Flocalhost:3000).\n\n### 4. Seed demo data (optional)\n\n```bash\ncurl -X POST http:\u002F\u002Flocalhost:3000\u002Fapi\u002Fseed\n```\n\nThis populates Redis with sample incidents, timeline events, and developer scores so the dashboard is populated immediately.\n\n---\n\n## Webhook Setup\n\nPoint these services at your deployed URL:\n\n### Vercel\nSettings → Webhooks → Add webhook\n```\nURL: https:\u002F\u002Fyour-app.vercel.app\u002Fapi\u002Fwebhooks\u002Fvercel\nEvents: deployment.error, deployment.canceled\n```\n\n### Sentry\nProject Settings → Developer Settings → Internal Integration → Webhooks\n```\nURL: https:\u002F\u002Fyour-app.vercel.app\u002Fapi\u002Fwebhooks\u002Fsentry\nEvents: issue (created, resolved)\n```\n\n### UptimeRobot\nMy Settings → Alert Contacts → Add Alert Contact\n```\nType: Web-hook\nURL: https:\u002F\u002Fyour-app.vercel.app\u002Fapi\u002Fwebhooks\u002Fuptime\n```\n\nAll webhook endpoints validate HMAC signatures. Set the corresponding `*_WEBHOOK_SECRET` env vars to match what each service sends.\n\n---\n\n## Slack App Setup\n\n1. Go to [api.slack.com\u002Fapps](https:\u002F\u002Fapi.slack.com\u002Fapps) → Create New App → From manifest\n\n2. Use this manifest:\n\n```yaml\ndisplay_information:\n  name: BlameBot\n  description: AI-powered incident intelligence\nfeatures:\n  bot_user:\n    display_name: BlameBot\n    always_online: true\n  slash_commands:\n    - command: \u002Fincident\n      url: https:\u002F\u002Fyour-app.vercel.app\u002Fapi\u002Fslack\u002Fcommands\n      description: Query BlameBot about incidents\n  interactivity:\n    is_enabled: true\n    request_url: https:\u002F\u002Fyour-app.vercel.app\u002Fapi\u002Fslack\u002Finteractivity\noauth_config:\n  scopes:\n    bot:\n      - chat:write\n      - channels:history\n      - channels:read\n      - commands\nsettings:\n  event_subscriptions:\n    request_url: https:\u002F\u002Fyour-app.vercel.app\u002Fapi\u002Fslack\u002Fevents\n    bot_events:\n      - message.channels\n```\n\n3. Install to workspace, copy `Bot User OAuth Token` → `SLACK_BOT_TOKEN`\n4. Copy Signing Secret → `SLACK_SIGNING_SECRET`\n\n---\n\n## Deployment\n\nBlameBot is built for Vercel. Push to your repo and connect the project.\n\nThe included `vercel.json` configures the escalation cron:\n\n```json\n{\n  \"crons\": [\n    {\n      \"path\": \"\u002Fapi\u002Fcron\u002Fescalations\",\n      \"schedule\": \"*\u002F5 * * * *\"\n    }\n  ]\n}\n```\n\n> **Note:** Vercel Hobby accounts are limited to daily cron jobs. The repo ships with `0 0 * * *` (once per day) to stay within the free tier. Upgrade to Pro and change the schedule to `*\u002F5 * * * *` for every-5-minute escalation checks.\n\nSet all environment variables in the Vercel dashboard under Settings → Environment Variables.\n\n---\n\n## API Reference\n\n| Method | Path | Description |\n|---|---|---|\n| `GET` | `\u002Fapi\u002Fincidents` | List incidents with optional status\u002Fseverity filter |\n| `POST` | `\u002Fapi\u002Fincidents` | Create incident manually |\n| `GET` | `\u002Fapi\u002Fincidents\u002F[id]` | Get single incident |\n| `GET` | `\u002Fapi\u002Fincidents\u002F[id]\u002Ftimeline` | Get incident timeline events |\n| `GET\u002FPOST` | `\u002Fapi\u002Fincidents\u002F[id]\u002Fpostmortem` | Get or generate AI postmortem |\n| `POST` | `\u002Fapi\u002Fwebhooks\u002Fvercel` | Vercel deployment webhook |\n| `POST` | `\u002Fapi\u002Fwebhooks\u002Fsentry` | Sentry error webhook |\n| `POST` | `\u002Fapi\u002Fwebhooks\u002Fuptime` | UptimeRobot downtime webhook |\n| `GET` | `\u002Fapi\u002Fanalytics` | Aggregated analytics data |\n| `GET\u002FPUT` | `\u002Fapi\u002Fconfig\u002Fowners` | Owner rule configuration |\n| `GET\u002FPUT` | `\u002Fapi\u002Fconfig\u002Fescalation` | Escalation policy |\n| `GET\u002FPUT` | `\u002Fapi\u002Fconfig\u002Fseverity` | Severity classification rules |\n| `GET\u002FPUT` | `\u002Fapi\u002Fconfig\u002Fautopilot` | Autopilot settings |\n| `GET\u002FPUT` | `\u002Fapi\u002Fconfig\u002Fblackout` | Blackout windows |\n| `POST` | `\u002Fapi\u002Fconfig\u002Fnl` | Natural language config update |\n| `GET` | `\u002Fapi\u002Fhealth` | Health check |\n\n---\n\n## Project Structure\n\n```\nblamebot\u002F\n├── app\u002F\n│   ├── (pages)\u002F          # Next.js App Router pages\n│   │   ├── dashboard\u002F\n│   │   ├── incidents\u002F\n│   │   ├── analytics\u002F\n│   │   └── config\u002F\n│   └── api\u002F              # API routes\n│       ├── webhooks\u002F     # Webhook receivers\n│       ├── incidents\u002F    # Incident CRUD\n│       ├── config\u002F       # Configuration endpoints\n│       ├── slack\u002F        # Slack event\u002Fcommand\u002Finteractivity\n│       ├── analytics\u002F    # Analytics aggregation\n│       └── cron\u002F         # Scheduled jobs\n├── lib\u002F\n│   ├── pipeline\u002F         # Core incident processing\n│   │   ├── index.ts      # Orchestrator\n│   │   ├── normalize.ts  # Webhook normalization\n│   │   ├── enrich.ts     # GitHub enrichment\n│   │   ├── severity.ts   # Severity classification\n│   │   ├── history.ts    # Similar incident search\n│   │   ├── ai.ts         # Claude AI integration\n│   │   ├── devscore.ts   # Developer scoring\n│   │   └── actions.ts    # Rollback \u002F hotfix actions\n│   ├── schemas.ts        # Zod schemas\n│   ├── types.ts          # TypeScript types\n│   └── redis.ts          # Redis client\n├── components\u002F           # React components\n└── vercel.json           # Cron job config\n```\n\n---\n\n## Contributing\n\nContributions are welcome! Please check out the [Contributing Guidelines](CONTRIBUTING.md) for more details.\n\n---\n\n## License\n\n[MIT](LICENSE)\n","BlameBot是一个基于AI的自动待命代理，用于检测部署失败、解释故障原因、定位责任团队并自动回滚。其核心功能包括接收来自Vercel、Sentry和UptimeRobot的警报，利用AI技术快速分析问题所在及责任人，并通过Slack通知相关人员，同时支持一键自动回滚操作。该项目采用TypeScript编写，结合了Next.js框架与Upstash Redis数据库等现代技术栈，确保高效稳定运行。BlameBot特别适用于DevOps场景下的事故管理，能够在不影响团队休息的情况下快速响应并处理线上故障，有效减少人为干预，提高运维效率。",2,"2026-06-11 04:04:39","CREATED_QUERY"]