AI-powered GitHub PR review tool. Calvera listens to GitHub pull_request webhooks, analyzes diffs with an LLM, posts a review with a summary and bug findings, and lets you chat with the analysis.
- Backend — Spring Boot 3 (Java 21, virtual threads), Spring Modulith, Spring AI, Flyway, pgvector
- Frontend — React 19, Vite, Tailwind CSS, shadcn/ui
- Infra — PostgreSQL (pgvector), Redis, GitHub OAuth2
- A GitHub
pull_requestwebhook fires onopened/synchronize - Calvera fetches the diff and queues an analysis job (Redis)
- An LLM analyzes the diff, generates a summary and bug findings, and posts a GitHub PR review
- The review and conversation are stored with vector embeddings for semantic chat
- Users can chat with any review via a streaming SSE endpoint
- Java 21
- Node 20+
- Docker (for Postgres + Redis)
- GitHub OAuth App
- GitHub personal access token (for posting reviews)
- OpenAI-compatible LLM endpoint
1. Start dependencies
docker compose up postgres redis -d2. Configure environment
Create a .env file (used by Docker Compose and the backend):
DB_USERNAME=calvera
DB_PASSWORD=yourpassword
GITHUB_CLIENT_ID=your_github_oauth_client_id
GITHUB_CLIENT_SECRET=your_github_oauth_client_secret
GITHUB_TOKEN=your_github_pat
JWT_SECRET_KEY=at_least_32_char_secret
LLM_API_KEY=your_openai_api_key
LLM_BASE_URL=https://api.openai.com # or any OpenAI-compatible base URL
FRONTEND_URL=http://localhost:51733. Run the backend
./mvnw spring-boot:run4. Run the frontend
cd frontend
npm install
npm run devFrontend at http://localhost:5173, backend at http://localhost:8080.
Point your repo's webhook at https://<your-host>/api/webhook/github with content type application/json and the pull_request event selected.
docker compose up --build| Method | Path | Description |
|---|---|---|
| GET | /api/reviews |
List all reviews |
| GET | /api/reviews/:id |
Get a review |
| GET | /api/reviews/:id/messages |
Get chat history |
| GET | /api/reviews/:id/chat/stream |
Stream a chat response (SSE) |
| POST | /api/reviews/:id/chat |
Send a chat message |
| GET | /api/projects |
List projects |
| POST | /api/projects |
Create a project |
| GET | /api/user/me |
Get current user |
| POST | /api/auth/refresh |
Refresh JWT tokens |