Skip to content

AbdulHannan-o1/code-review-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI-Powered Code Reviewer with n8n

πŸš€ An automated AI Code Reviewer built using n8n, Google Gemini, and MongoDB, designed to analyze GitHub repositories and send structured review reports via email.

πŸ‘‰ Live Input Page: gh-ai-reviewer.netlify.app


πŸ“Œ Features

  • ✨ End-to-End Automation – From user input to AI review report
  • ✨ AI-Powered Reviews – Uses Google Gemini for professional code review
  • ✨ GitHub Integration – Fetches repository details & source files automatically
  • ✨ Smart Filtering – Skips unnecessary files (like binaries, media, oversized configs)
  • ✨ Custom Prompts – Users can provide custom review prompts
  • ✨ MongoDB Memory – Maintains chat memory for better context
  • ✨ Email Reports – Sends a structured JSON report as an attachment

πŸ› οΈ Workflow Overview

The system is powered by an n8n workflow (see final-ver-code-reviewer.json).

  1. 🌐 User Input Form β†’ GitHub Repo URL + Email + Optional Prompt
  2. πŸ”— Webhook (n8n) β†’ Captures input and parses repo info
  3. πŸ“‚ GitHub API β†’ Fetches repository details & branch
  4. πŸ—‚οΈ File Filtering β†’ Keeps only relevant code/config files
  5. πŸ“œ File Fetching β†’ Downloads raw code files
  6. 🧠 AI Agent (Gemini + MongoDB) β†’ Reviews code, outputs JSON
  7. βš™οΈ Structuring β†’ Formats JSON into clean structure
  8. πŸ“¦ Aggregation β†’ Combines all file reviews
  9. πŸ“§ Email Delivery β†’ Sends report + JSON file to user

πŸ“‚ Tech Stack

  • ⚑ n8n – Workflow automation
  • πŸ€– Google Gemini (PaLM API) – Code analysis & AI review
  • 🐳 MongoDB – Chat memory & context storage
  • πŸ™ GitHub API – Repository and file fetching
  • πŸ“§ Gmail API – Sending review reports to users
  • 🌐 Netlify – Hosting input form frontend

πŸ“Š Example Output

{
  "repo": "my_animated_portfolio",
  "branch": "main",
  "reviewed_at": "2025-09-09T21:27:09.128Z",
  "file": "utils.js",
  "issues": [
    "No input validation for parameters",
    "Missing JSDoc comments"
  ],
  "suggestions": [
    "Add parameter type checking",
    "Include JSDoc comments for maintainability"
  ],
  "summary": "Simple utility file, minor improvements recommended"
}

πŸ“Έ Image

Workflow Overview

πŸ™Œ Credits

  • Built by Abdul Hannan

  • Powered by n8n, Google Gemini, and MongoDB