Cornelius API
REST API for the Cornelius YSWS submission review engine. Review GitHub repositories for hardware project completeness using rule-based checks and AI-powered analysis.
http://localhost:3000
Cornelius uses server-side API keys configured via environment variables. No client authentication is required for the REST API itself. The server handles GitHub Proxy and Anthropic API authentication internally.
| Variable | Required | Description |
|---|---|---|
| GH_PROXY_API_KEY | REQUIRED | Hack Club GitHub Proxy API key for repo access |
| ANTHROPIC_API_KEY | optional | Enables AI-powered checks (README quality, image analysis) |
| PORT | optional | Server port (default: 3000) |
Each review runs a set of checks against the target repository. Checks are either rule-based (deterministic) or AI-powered (uses Claude).
Presets configure which checks are enabled, required, and their parameters. Pass a preset name to any review endpoint.
| Name | Description |
|---|---|
| default | Standard hardware review. BOM and README quality are warnings only. |
| hardware-default | Strict hardware review. All checks required including BOM and README quality. |
| blueprint | Hack Club Blueprint program preset. All checks required, broad 3D file format support. |
Review a single GitHub repository. Runs all enabled checks from the selected preset and returns detailed results.
| Field | Type | Description | |
|---|---|---|---|
| url | string | REQUIRED | GitHub repository URL |
| preset | string | optional | Preset name (default: "default") |
// POST /api/review // Content-Type: application/json { "url": "https://github.com/user/hardware-project", "preset": "blueprint" }
{
"githubUrl": "https://github.com/user/hardware-project",
"status": "pass",
"overallPass": true,
"checkResults": [
{
"checkName": "github_link_works",
"required": true,
"status": "pass",
"confidence": 1.0,
"evidence": ["https://github.com/user/hardware-project"],
"reason": "Repository is accessible and contains files",
"aiUsed": false
}
// ... more check results
],
"warnings": [],
"errors": [],
"aiSummary": "Project has complete PCB and CAD files...",
"suggestedFixes": [],
"confidenceScore": 0.95
}
| 200 | Review completed (check overallPass for result) |
| 400 | Invalid or missing GitHub URL |
| 500 | Server error during review |
Upload a CSV file of repositories for batch review. Returns a job ID to poll for progress. The CSV must have a github_url column.
| Field | Type | Description | |
|---|---|---|---|
| csv | file | REQUIRED | CSV file (multipart/form-data) |
| preset | string | optional | Preset name (default: "default") |
// Required: github_url column // Optional: project_type, program_preset, submission_id, participant_name, email, notes github_url,submission_id,participant_name https://github.com/user/project-a,001,Alice https://github.com/user/project-b,002,Bob
{
"jobId": "m5x8k2abc1",
"status": "processing"
}
| 200 | Batch job created, returns job ID |
| 400 | No CSV file uploaded |
Poll for batch job progress and results. Returns current status, completion count, and results array when complete.
| Param | Type | Description |
|---|---|---|
| jobId | string | Job ID returned from POST /api/batch |
{
"status": "processing",
"total": 50,
"completed": 12,
"results": []
}
{
"status": "complete",
"total": 50,
"completed": 50,
"results": [
{
"submissionId": "001",
"githubUrl": "https://github.com/user/project-a",
"projectType": "hardware",
"overallStatus": "pass",
"passedChecks": ["github_link_works", "readme_present"],
"failedChecks": [],
"warnings": [],
"reviewSummary": "All checks passed",
"confidenceScore": 0.98
}
// ... more results
]
}
| 200 | Job found, returns current state |
| 404 | Job ID not found |
Returns server health status and whether API keys are configured.
{
"status": "ok",
"version": "1.0.0",
"github": true, // GH_PROXY_API_KEY configured
"ai": false // ANTHROPIC_API_KEY configured
}
Schemas
Response type definitions.
| Field | Type | Description |
|---|---|---|
| githubUrl | string | The reviewed repository URL |
| status | "pass" | "fail" | "warning" | "error" | Overall review status |
| overallPass | boolean | True if no required checks failed |
| checkResults | CheckResult[] | Individual check results |
| warnings | string[] | Warning messages |
| errors | string[] | Error messages from failed required checks |
| aiSummary | string? | AI-generated review summary (if AI enabled) |
| suggestedFixes | string[]? | AI-suggested improvements |
| confidenceScore | number | Average confidence across checks (0-1) |
| Field | Type | Description |
|---|---|---|
| checkName | string | Check identifier |
| required | boolean | Whether this check is required to pass |
| status | "pass" | "fail" | "warning" | "error" | "skipped" | Check result status |
| confidence | number | Confidence in result (0-1) |
| evidence | string[] | Files or data supporting the result |
| reason | string | Human-readable explanation |
| aiUsed | boolean | Whether Claude AI was used for this check |
| Field | Type | Description |
|---|---|---|
| submissionId | string | ID from CSV or auto-generated index |
| githubUrl | string | Repository URL |
| projectType | string | Project type (e.g. "hardware") |
| overallStatus | string | Overall status |
| passedChecks | string[] | IDs of passed checks |
| failedChecks | string[] | IDs of failed checks |
| warnings | string[] | Warning messages |
| reviewSummary | string | AI summary or status string |
| confidenceScore | number | Average confidence (0-1) |
GitHub Proxy: gh-proxy.hackclub.com