{"id":50498062,"url":"https://github.com/rcosta358/cf_ai_code_reviewer","last_synced_at":"2026-06-02T09:31:09.762Z","repository":{"id":354175326,"uuid":"1220822270","full_name":"rcosta358/cf_ai_code_reviewer","owner":"rcosta358","description":" Lightweight AI code review application powered by Cloudflare Workers AI","archived":false,"fork":false,"pushed_at":"2026-04-27T12:39:59.000Z","size":386,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T14:20:11.929Z","etag":null,"topics":["ai-code-review","cloudflare","cloudflare-workers","cloudflare-workers-ai","code-analysis","code-review"],"latest_commit_sha":null,"homepage":"https://ai-code-reviewer.r1c4rdco5t4-f9d.workers.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rcosta358.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-04-25T11:33:04.000Z","updated_at":"2026-04-27T13:10:38.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rcosta358/cf_ai_code_reviewer","commit_stats":null,"previous_names":["rcosta358/cf_ai_code_reviewer"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rcosta358/cf_ai_code_reviewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcosta358%2Fcf_ai_code_reviewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcosta358%2Fcf_ai_code_reviewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcosta358%2Fcf_ai_code_reviewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcosta358%2Fcf_ai_code_reviewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcosta358","download_url":"https://codeload.github.com/rcosta358/cf_ai_code_reviewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcosta358%2Fcf_ai_code_reviewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33816486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-code-review","cloudflare","cloudflare-workers","cloudflare-workers-ai","code-analysis","code-review"],"created_at":"2026-06-02T09:31:09.005Z","updated_at":"2026-06-02T09:31:09.733Z","avatar_url":"https://github.com/rcosta358.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# AI Code Reviewer\n\n**Lightweight AI code review application powered by Cloudflare Workers AI**\n\n![Cloudflare Workers](https://img.shields.io/badge/Cloudflare-Workers-orange)\n![LLM](https://img.shields.io/badge/Model-Llama%203.3-blue)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n[Demo](https://github.com/user-attachments/assets/e8d733ac-7d78-4a58-ac6c-d042df8c1aba)\n\n\u003c/div\u003e\n\n---\n\nThis project was implemented for the Software Engineering Internship assignment, built with Codex using GPT-5.5 (Medium).\nThe prompts used can be found in [`PROMPTS.md`](./PROMPTS.md).\n\n## Features\n\n- Structured AI code review with actionable feedback\n- Covers multiple aspects of code quality (correctness, security, maintainability, performance, style, documentation, and other)\n- Each issue is annotated with an explanation, suggestion, severity, confidence level, and source code position\n- Overall rating and summary of the review\n- Persistent review storage\n- Follow-up chat for follow-up questions and iterative review\n\n## Workflow\n\n1. User submits code\n2. Backend sends code and system prompt to the LLM\n3. LLM returns structured review in a JSON schema\n4. Review is stored and displayed\n5. User can use the chat to ask follow-up questions or provide additional context\n\nExample of the structured review feedback returned by the LLM:\n\n```json\n{\n  \"summary\": \"...\",\n  \"rating\": 7.5,\n  \"issues\": [\n    {\n      \"type\": \"correctness\",\n      \"severity\": \"high\",\n      \"message\": \"...\",\n      \"suggestion\": \"...\",\n      \"confidence\": \"high\",\n      \"location\": { \"line\": 12, \"column\": 5 }\n    }\n  ]\n}\n```\n\n## Architecture\n\n- **Frontend** (React, Vite, Worker Static Assets): user interface to paste code, view review results, manage sessions, and chat about a review\n- **Backend** (Cloudflare Worker): handles API requests, validates payloads, calls the LLM, and stores/retrieves sessions\n- **LLM** (Workers AI, Llama 3.3): performs code analysis and generates structured feedback\n- **Database** (Cloudflare KV): stores reviews\n- **Client Storage** (Local Storage): stores session id (for indexing in KV) and user preferences\n\n```mermaid\nflowchart LR\n  Start(( )) --\u003e Frontend\n  Frontend --\u003e CW[\"Cloudflare Worker\"]\n  CW --\u003e WAI[\"Workers AI\"]\n  WAI --\u003e Llama[\"Llama 3.3\"]\n  CW --\u003e KV[\"Cloudflare KV\"]\n  Frontend --\u003e LS[\"Local Storage\"]\n```\n\n## Getting Started\n\n### Deployed App\n\nThis app is deployed on Cloudflare Workers and can be accessed at:\n\nhttps://ai-code-reviewer.r1c4rdco5t4-f9d.workers.dev\n\n### Local Setup\n\nRequirements:\n\n- Node.js\n- npm\n- A Cloudflare account\n\nClone and install dependencies:\n\n```sh\ngit clone https://github.com/rcosta358/cf_ai_code_reviewer\ncd cf_ai_code_reviewer/app\nnpm install\n```\n\nYou can set the `VITE_USE_MOCK_REVIEW` variable in `.env.development` to `true` to use a mock review response without calling Workers AI, which is useful for development without consuming AI credits.\n\nThen, login to your Cloudflare account and create a new Cloudflare KV namespace:\n\n```sh\nnpx wrangler login\nnpx wrangler kv namespace create SESSIONS_KV\n```\n\nThen, update `wrangler.jsonc` with the generated KV namespace id.\n\nFinally, run the development server and open the app in your browser at `http://localhost:5173`:\n\n```sh\nnpm run dev\n```\n\nTo deploy the app to Cloudflare Workers, run:\n\n```sh\nnpm run deploy\n```\n\n## References\n\n- https://agents.cloudflare.com\n- https://workers.cloudflare.com\n- https://developers.cloudflare.com/workers-ai\n- https://developers.cloudflare.com/kv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcosta358%2Fcf_ai_code_reviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcosta358%2Fcf_ai_code_reviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcosta358%2Fcf_ai_code_reviewer/lists"}