Automated PR Quality Verification System
Tapaso analyzes pull requests by running code in isolated Daytona sandboxes and fetching AI code reviews from CodeRabbit.
- 🔒 Isolated Testing - Run tests safely in Daytona sandboxes
- 🐰 AI Code Review - Fetch CodeRabbit reviews via GitHub API
- 📊 Quality Scoring - Combined score from tests + code review
- 🔍 Error Tracking - Sentry integration for monitoring
- 🚀 Multi-Project Support - Node.js, Python, HTML projects
- Node.js 18+
- Python 3.10+
- Daytona API Key
- GitHub Personal Access Token
git clone https://github.com/Lagani21/tapaso.git
cd tapaso
cp .env.example .envEdit .env:
DAYTONA_API_KEY=your_daytona_key
GITHUB_REPO=owner/repo
GITHUB_TOKEN=github_pat_xxx
SENTRY_DSN=https://xxx@sentry.io/xxx # Optional# Backend
cd backend && npm install && cd ..
# Python
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Frontend
cd frontend && npm install && cd ..# Terminal 1: Backend
cd backend && npm run dev
# Terminal 2: Frontend
cd frontend && npm run devtapaso/
├── backend/ # Express.js API (port 4000)
│ ├── server.js
│ └── services/
│ ├── coderabbit.js # GitHub API integration
│ └── sentry.js # Error tracking
│
├── frontend/ # Next.js app (port 3000)
│ └── src/
│ ├── app/ # Pages & API routes
│ ├── components/ # React components
│ └── lib/ # Utilities & API client
│
├── daytona-integration/ # Python verification
│ ├── src/
│ │ ├── daytona_client.py
│ │ └── pr_verifier.py
│ └── scripts/
│ └── run_verifications.py
│
├── docs/ # Documentation
└── data/ # Sample data
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Service status |
| POST | /api/check-repo |
Validate GitHub repo |
| POST | /api/verify-pr |
Run full verification |
| GET | /api/coderabbit/review/:owner/:repo/:pr |
Get CodeRabbit review |
curl -X POST http://localhost:4000/api/verify-pr \
-H "Content-Type: application/json" \
-d '{
"owner": "Lagani21",
"repo": "Sample_website",
"pr_number": 1,
"branch": "main",
"developer_email": "dev@example.com"
}'| Source | Weight | Calculation |
|---|---|---|
| Sandbox Tests | 60% | 100 - (errors × 10) - (failures × 40) |
| CodeRabbit | 40% | 100 - (critical × 25) - (warnings × 10) |
Score Badges:
- 🟢 90-100: Excellent
- 🔵 75-89: Good
- 🟡 60-74: Fair
- 🟠 40-59: Needs Work
- 🔴 0-39: Critical
- Install CodeRabbit GitHub App
- The
.coderabbit.yamlfile configures review behavior - Reviews are fetched via GitHub API using your
GITHUB_TOKEN
- Create project at sentry.io
- Add
SENTRY_DSNto.env - Errors are automatically tracked
# Test backend
./test-backend.sh
# Test Python directly
source venv/bin/activate
python daytona-integration/scripts/run_verifications.py \
--pr-number 1 --branch main --repo owner/repoEdit daytona-integration/src/pr_verifier.py:
def _detect_project_type(self, sandbox):
if sandbox.process.exec("ls your_config").exit_code == 0:
return "your_type"
def _run_tests(self, sandbox, project_type):
if project_type == "your_type":
# Your test logic- Frontend: Next.js, TypeScript, Tailwind CSS
- Backend: Express.js, Node.js
- Verification: Python, Daytona SDK
- Integrations: Sentry, CodeRabbit (via GitHub API)
MIT
Built with Daytona 🚀