Production-oriented hackathon project named AutoReview Hub.
It accepts a GitHub repository URL, runs multi-engine code review, and returns structured findings plus a markdown report through both API and browser UI.
Developers lose time in manual first-pass reviews for recurring issues (logging, exception handling, risky patterns, unfinished TODOs, etc.). This project automates that first pass and aggregates model perspectives into one actionable report.
- Reviews a public GitHub repository directly from URL
- Uses multiple reviewer engines:
heuristic-baseline(always on)openai(enabled whenOPENAI_API_KEYis present)anthropic(enabled whenANTHROPIC_API_KEYis present)
- Produces:
- Per-model findings
- Cross-model consensus findings
- Export-ready markdown summary
- Includes browser dashboard at
/with:- Severity filtering
- Text search across findings
- Top 5 critical findings
- Export buttons (
JSON,Markdown)
- Python 3.12+
- FastAPI + Uvicorn
- Pydantic / Pydantic Settings
- OpenAI Python SDK
- Anthropic Python SDK
- Vanilla HTML/CSS/JS frontend
- Pytest
Hackathon/
app/
api/routes/review.py
core/config.py
llm/
base.py
heuristic_reviewer.py
openai_reviewer.py
anthropic_reviewer.py
models/
domain.py
schemas.py
prompts/templates.py
services/
provider_factory.py
repository_service.py
review_orchestrator.py
report_builder.py
static/
css/app.css
js/app.js
web/index.html
utils/json_parser.py
main.py
tests/
test_heuristic_reviewer.py
test_openai_reviewer.py
test_report_builder.py
test_web_ui.py
requirements.txt
.env.example
.env
README.md
DESIGNDOC.md
- Create and activate virtual environment:
cd /home/turtle-hermit/Hackathon
python3 -m venv .venv
source .venv/bin/activate- Install dependencies:
python -m pip install -r requirements.txt- Prepare env file:
cp .env.example .env- Add keys in
.env(optional for cloud reviewers):
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=gpt-3.5-turbo
ANTHROPIC_API_KEY=
ANTHROPIC_MODEL=claude-3-5-sonnet-latest- Run server:
python -m uvicorn app.main:app --host 127.0.0.1 --port 8000 --reloadpython -c "import urllib.request;print(urllib.request.urlopen('http://127.0.0.1:8000/health').read().decode())"Expected:
{"status":"ok"}python -c "import json,urllib.request;data=json.dumps({'repository_url':'https://github.com/tiangolo/fastapi','max_files':8}).encode();req=urllib.request.Request('http://127.0.0.1:8000/api/v1/review',data=data,headers={'Content-Type':'application/json'});print(urllib.request.urlopen(req,timeout=300).read().decode())"Open:
http://127.0.0.1:8000/
Submit repository URL and inspect:
- Run Summary
- Top 5 Critical Findings
- Consensus Findings
- Model Reviews
- Markdown Report
python -m pytest -qRequest body:
{
"repository_url": "https://github.com/owner/repo",
"branch": "main",
"max_files": 12
}Response fields:
repository_urlbranchanalyzed_filesanalyzed_modelsmodel_reviews[]consensus_issues[]markdown_report
- If no API keys are configured, app still works via
heuristic-baseline. - OpenAI reviewer includes fallback model strategy for account compatibility.
- Unsupported or inaccessible models degrade gracefully and return structured errors per file.
ModuleNotFoundError: fastapi:- Ensure virtual env is active and run with
python -m uvicorn ...
- Ensure virtual env is active and run with
Models used: 1:- Verify API key exists in
.env - Restart server after env edits
- Verify API key exists in
- OpenAI model invocation errors:
- Ensure key has API access and billing enabled
- Use
OPENAI_MODEL=gpt-3.5-turboif unsure
- Never commit
.envwith real keys. - Rotate any key that was accidentally shared or pasted publicly.
- Treat repository content as sensitive when reviewing private code.
Full architecture and engineering decisions: