AI-powered code reviewer that teaches while it reviews
OpenReview automatically reviews your code commits using local AI models, providing intelligent feedback directly in your pull requests—no cloud services required.
- Local AI Reviews - Powered by Open Source LLM running on Ollama
- Privacy First - All processing happens on your machine
- Instant Feedback - Automated reviews on every commit
- GitHub Integration - Seamless webhook based workflow
- One-Command Setup - Docker Compose handles everything
- 100% Open Source - No API costs, no vendor lock in
GitHub Push → Webhook → Spring Boot → Ollama (LLM) → Review Comment
Stack:
- Spring Boot 4.0.2 - Webhook receiver & orchestration
- Ollama - Local LLM runtime
- DeepSeek-Coder-6.7B - Code review model
- GitHub API - Fetch diffs & post comments
- Docker Compose - Simplified deployment
- Docker & Docker Compose
- GitHub account with admin access to a repository
- 8GB+ RAM (for running DeepSeek model)
- Clone the repository
git clone https://github.com/yourusername/openreview.git
cd openreview- Configure environment variables
cp .env.example .envEdit .env and set:
GITHUB_TOKEN=ghp_your_github_personal_access_token
WEBHOOK_SECRET=your_random_secret_string- Start the services
docker-compose up -d- Pull the AI model (first time only - ~4GB download)
docker exec openreview-ollama ollama pull deepseek-coder:6.7b-
Configure GitHub webhook
In your GitHub repository:
- Go to Settings → Webhooks → Add webhook
- Payload URL:
http://your-server-ip:8080/api/webhook - Content type:
application/json - Secret: (same as
WEBHOOK_SECRETin.env) - Events: Select "Pull requests" and "Pushes"
# Check service health
curl http://localhost:8080/actuator/health
# Check Ollama
curl http://localhost:11434/api/tagsOnce configured, OpenReview works automatically:
- Create a pull request or push commits to your repository
- OpenReview receives the webhook notification
- Fetches the code diff from GitHub
- Sends it to LLM for analysis
- Posts review comments directly on your PR
OpenReview Analysis
**Potential Issues:**
- Line 23: Potential null pointer exception - consider adding null check
- Line 45: Variable naming could be more descriptive (use `userRepository` instead of `repo`)
**Suggestions:**
- Consider extracting this logic into a separate service method for better testability
- Add input validation for the `email` parameter
**Security:**
No obvious security vulnerabilities detected
github:
token: ${GITHUB_TOKEN}
webhook-secret: ${WEBHOOK_SECRET}
ollama:
url: http://ollama:11434
model: deepseek-coder:6.7b
timeout: 60s
review:
max-diff-size: 10000 # Skip files larger than this
excluded-paths:
- "*.lock"
- "package-lock.json"
- "yarn.lock"- Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
- Click Generate new token (classic)
- Select scopes:
repo(Full control of private repositories)write:discussion(for PR comments)
- Generate and copy the token
openreview/
├── src/main/java/com/openreview/
│ ├── OpenReviewApplication.java
│ ├── controller/
│ │ └── WebhookController.java # Handles GitHub webhooks
│ ├── service/
│ │ ├── GitHubService.java # GitHub API integration
│ │ ├── OllamaService.java # Ollama LLM communication
│ │ └── ReviewService.java # Review orchestration
│ ├── model/
│ │ ├── WebhookPayload.java
│ │ └── ReviewResult.java
│ └── config/
│ └── GitHubConfig.java
├── docker-compose.yml
├── Dockerfile
└── README.md
# Terminal 1: Start Ollama
ollama serve
# Terminal 2: Pull model
ollama pull deepseek-coder:6.7b
# Terminal 3: Run Spring Boot
./mvnw spring-boot:run./mvnw testContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Java code conventions
- Write tests for new features
- Update documentation as needed
- Keep commits atomic and well-described
If you find OpenReview useful, please consider giving it a star!