{"id":50307815,"url":"https://github.com/levicosta201/reviewsage","last_synced_at":"2026-05-28T18:01:20.521Z","repository":{"id":357428993,"uuid":"1236873182","full_name":"levicosta201/reviewsage","owner":"levicosta201","description":"AI-powered code review that learns from your team history. Review PRs on demand, not on every push. Save up to 94% on AI tokens.","archived":false,"fork":false,"pushed_at":"2026-05-12T18:57:47.000Z","size":196,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-12T19:37:17.828Z","etag":null,"topics":["ai","anthropic","code-review","github-api","nextjs","open-source","pgvector","rag"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levicosta201.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-12T16:49:47.000Z","updated_at":"2026-05-12T18:57:52.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/levicosta201/reviewsage","commit_stats":null,"previous_names":["levicosta201/reviewsage"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/levicosta201/reviewsage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicosta201%2Freviewsage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicosta201%2Freviewsage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicosta201%2Freviewsage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicosta201%2Freviewsage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levicosta201","download_url":"https://codeload.github.com/levicosta201/reviewsage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levicosta201%2Freviewsage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33619972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","code-review","github-api","nextjs","open-source","pgvector","rag"],"created_at":"2026-05-28T18:01:14.276Z","updated_at":"2026-05-28T18:01:20.401Z","avatar_url":"https://github.com/levicosta201.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cbr/\u003e\n\n```\n██████╗ ███████╗██╗   ██╗██╗███████╗██╗    ██╗███████╗ █████╗  ██████╗ ███████╗\n██╔══██╗██╔════╝██║   ██║██║██╔════╝██║    ██║██╔════╝██╔══██╗██╔════╝ ██╔════╝\n██████╔╝█████╗  ██║   ██║██║█████╗  ██║ █╗ ██║███████╗███████║██║  ███╗█████╗  \n██╔══██╗██╔══╝  ╚██╗ ██╔╝██║██╔══╝  ██║███╗██║╚════██║██╔══██║██║   ██║██╔══╝  \n██║  ██║███████╗ ╚████╔╝ ██║███████╗╚███╔███╔╝███████║██║  ██║╚██████╔╝███████╗\n╚═╝  ╚═╝╚══════╝  ╚═══╝  ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚══════╝\n```\n\n**AI-powered code review that learns from your team's history.**  \nReview PRs on demand — not on every push. Save up to 94% on AI tokens.\n\n\u003cbr/\u003e\n\n[![License: MIT](https://img.shields.io/badge/license-MIT-8b5cf6?style=flat-square)](LICENSE)\n[![Next.js](https://img.shields.io/badge/Next.js-16-000000?style=flat-square\u0026logo=next.js)](https://nextjs.org)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5-3178c6?style=flat-square\u0026logo=typescript\u0026logoColor=white)](https://typescriptlang.org)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL-pgvector-4169e1?style=flat-square\u0026logo=postgresql\u0026logoColor=white)](https://github.com/pgvector/pgvector)\n[![Claude](https://img.shields.io/badge/Anthropic-Claude_Haiku-d97706?style=flat-square)](https://anthropic.com)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-34d399?style=flat-square)](CONTRIBUTING.md)\n\n\u003cbr/\u003e\n\n[**Quick Start**](#-quick-start) · [**How It Works**](#-how-it-works) · [**Docs**](docs/index.md) · [**Contributing**](CONTRIBUTING.md)\n\n\u003cbr/\u003e\n\n\u003c/div\u003e\n\n---\n\n## The problem with on-push AI review\n\nMost AI code review tools run on **every single push** — including WIP commits, fixups, rebases, and whitespace tweaks. That means paying for AI tokens you don't need.\n\n```\nOn-push review  →  8 pushes/day × ~2,000 tokens  =  352,000 tokens/month  (~$11/dev)\nReviewSage      →  3 reviews/day × ~1,200 tokens  =   79,200 tokens/month  (~$0.60/dev)\n                                                              ↑\n                                                      94% less spend\n```\n\nReviewSage builds a **persistent vector database** from your historical PR comments — once. When you ask for a review, it searches that history for similar patterns and generates contextual, actionable feedback using Claude Haiku.\n\nThe result: **better reviews** (grounded in your team's real standards) **at a fraction of the cost**.\n\n---\n\n## ✨ Features\n\n- **Vector memory** — indexes all historical PR comments as embeddings; learns your team's patterns\n- **On-demand reviews** — paste a PR URL, get comments posted directly to GitHub in seconds\n- **Multi-tenant** — isolated workspaces per company, role-based access (Owner / Admin / Member)\n- **Agent skill** — export as a callable skill for Claude Code, MCP, or any tool-use agent\n- **Admin panel** — global metrics, company management, usage tracking\n- **Self-hostable** — one `docker compose up` and you're running\n- **Open source** — MIT license, no telemetry, no lock-in\n\n---\n\n## 🚀 Quick Start\n\n**Prerequisites:** Node.js 20+, Docker, GitHub OAuth App, Anthropic API key.\n\n```bash\ngit clone https://github.com/levicosta201/reviewsage\ncd reviewsage\n\nmake setup   # copies .env, installs deps, starts postgres+redis, pushes schema\n```\n\nEdit `.env` with your keys (see [Configuration docs](docs/configuration.md)), then:\n\n```bash\nmake dev     # starts Next.js at http://localhost:3000\n```\n\nThat's it. See the full [Getting Started guide](docs/getting-started.md) for OAuth App setup and first review walkthrough.\n\n---\n\n## 🔍 How It Works\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│  SETUP (once per repo)                                          │\n│                                                                 │\n│  GitHub API ──► historical PR comments ──► embeddings          │\n│                                               │                 │\n│                                          pgvector DB            │\n└───────────────────────────────────────────────┬─────────────────┘\n                                                │  persists\n┌───────────────────────────────────────────────▼─────────────────┐\n│  ON REVIEW REQUEST                                              │\n│                                                                 │\n│  PR URL ──► fetch diff ──► embed diff ──► vector search        │\n│                                               │                 │\n│                                         top-12 similar          │\n│                                         past comments           │\n│                                               │                 │\n│                                        Claude Haiku             │\n│                                     (diff + history)            │\n│                                               │                 │\n│                                    post to GitHub PR ◄──────────┘\n└─────────────────────────────────────────────────────────────────┘\n```\n\n### Review output example\n\n```\n┌─ src/auth/middleware.ts:42 ─────────────────── WARNING ─┐\n│ JWT token is used before verification. This pattern was │\n│ flagged in 12 previous PRs on this repo.                │\n└─────────────────────────────────────────────────────────┘\n\n┌─ src/api/users.ts:87 ──────────────────────── CRITICAL ─┐\n│ SQL query built via string concatenation — SQL injection │\n│ vulnerability. Use parameterized queries.                │\n└──────────────────────────────────────────────────────────┘\n\n┌─ src/utils/cache.ts:23 ───────────────────── SUGGESTION ─┐\n│ Cache key may collide in multi-tenant scenarios.          │\n│ Prefix with tenant ID.                                    │\n└───────────────────────────────────────────────────────────┘\n```\n\n---\n\n## 🛠 Tech Stack\n\n| Layer | Technology |\n|---|---|\n| Framework | [Next.js 16](https://nextjs.org) — App Router, Server Components, API Routes |\n| Language | [TypeScript 5](https://typescriptlang.org) |\n| Database | [PostgreSQL 16](https://postgresql.org) + [pgvector](https://github.com/pgvector/pgvector) |\n| ORM | [Prisma](https://prisma.io) |\n| Auth | [NextAuth.js v5](https://authjs.dev) — GitHub OAuth + credentials |\n| AI | [Anthropic Claude Haiku](https://anthropic.com) — review generation |\n| Queue | [BullMQ](https://bullmq.io) + Redis — background history sync |\n| UI | [Tailwind CSS v4](https://tailwindcss.com) + [Radix UI](https://radix-ui.com) |\n| Infra | Docker, docker-compose, Make |\n\n---\n\n## 🐳 Docker\n\nFull production stack (app + postgres + redis) in one command:\n\n```bash\ncp .env.example .env   # fill in your keys\nmake up                # docker compose up -d\n```\n\nOr for local development with hot-reload (Next.js runs natively, only infra in Docker):\n\n```bash\nmake dev               # starts postgres+redis in Docker, Next.js locally\n```\n\nSee [Deployment docs](docs/deployment.md) for Nginx/Caddy setup, Vercel, and Railway options.\n\n---\n\n## 🤖 Agent Skill\n\nUse ReviewSage as a tool in any AI agent:\n\n```bash\ncurl -X POST https://your-instance.com/api/reviews \\\n  -H \"Authorization: Bearer YOUR_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prUrl\": \"https://github.com/org/repo/pull/123\"}'\n```\n\n```json\n{\n  \"prTitle\": \"feat: add rate limiting\",\n  \"prNumber\": 123,\n  \"commentsPosted\": 4,\n  \"tokensUsed\": 1180,\n  \"comments\": [...]\n}\n```\n\nFor Claude Code, add to your `CLAUDE.md`:\n\n````markdown\nWhen asked to review a PR, call:\n```bash\ncurl -X POST https://your-instance.com/api/reviews \\\n  -d '{\"prUrl\": \"\u003cPR_URL\u003e\"}'\n```\n````\n\nMCP server support is on the roadmap. See [Agent Skill docs](docs/agent-skill.md).\n\n---\n\n## 📖 Documentation\n\n| Guide | Description |\n|---|---|\n| [Getting Started](docs/getting-started.md) | Setup, OAuth App, first review |\n| [Architecture](docs/architecture.md) | System design, data flow, DB schema |\n| [Configuration](docs/configuration.md) | All environment variables |\n| [API Reference](docs/api-reference.md) | REST endpoints with examples |\n| [Deployment](docs/deployment.md) | Docker, self-hosted, Vercel, Railway |\n| [Agent Skill](docs/agent-skill.md) | Using ReviewSage inside AI agents |\n\n---\n\n## 🗺 Roadmap\n\n- [ ] MCP server for Claude Code integration\n- [ ] Real embedding model (Voyage AI / OpenAI)\n- [ ] GitLab support\n- [ ] Webhook trigger (review when PR is opened — optional, per-project toggle)\n- [ ] Review quality feedback loop (thumbs up/down on comments)\n- [ ] Slack / Teams notifications\n- [ ] Billing integration (Stripe)\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Whether it's a bug fix, new feature, or documentation improvement.\n\n```bash\n# Fork → clone → create branch\ngit checkout -b feat/my-feature\n\n# Make changes, then\nmake typecheck   # TypeScript check\nmake lint        # ESLint\n\n# Commit and open a PR\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide, including how to run the dev environment and the commit message convention.\n\n---\n\n## 📄 License\n\nMIT — see [LICENSE](LICENSE) for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\nBuilt with ❤️ for teams that care about code quality without burning through AI budgets.\n\n**Star ⭐ the repo if ReviewSage saves you tokens!**\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevicosta201%2Freviewsage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevicosta201%2Freviewsage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevicosta201%2Freviewsage/lists"}