Mercury | AI Manager 🪐

🚀 About the Project

Mercury | AI Manager is an intelligent code review assistant built with Next.js 15 that integrates with GitLab’s API to automatically fetch repository data, analyze source code, and provide high-quality feedback using Google Cloud’s Gemini AI models. The goal is to automate and accelerate code quality checks—something every developer can benefit from.

💡 Inspiration

The idea for Mercury was born from my personal struggle with managing time during manual code reviews. As a developer, juggling deadlines and maintaining code quality often became overwhelming. I realized there needed to be a smarter, faster, and more accessible way to receive feedback—especially for solo developers or small teams without dedicated reviewers.

That’s when I envisioned Mercury: an AI-powered assistant that would review your GitLab-hosted codebase and offer structured feedback within seconds—just like a senior developer would.

🛠️ How I Built It

  • Framework: Next.js 15 with the App Router
  • Auth: GitLab OAuth2 for secure access to private repositories
  • Backend: Node.js API Routes and serverless functions
  • AI Feedback Engine: Integrated with Google Cloud’s Gemini models for intelligent code analysis and review
  • Deployment: Vercel

🧠 Features:

  • OAuth-based GitLab authentication
  • Repository list and branch selector
  • AI-generated code quality feedback written directly to .md files
  • Context-aware suggestions for improving readability, maintainability, and efficiency
  • Feedback powered by Google Gemini AI models for cutting-edge analysis

🔍 What I Learned

  • Hands-on experience with GitLab's REST API, including auth scopes and secure access patterns
  • Advanced usage of Next.js App Router for API integration and route protection
  • Structuring real-time interactions between a codebase and an AI model
  • How to communicate effectively with Google Cloud Gemini models to extract meaningful and actionable insights from raw code

🧗 Challenges I Faced

  • OAuth2 flow was initially tricky to implement due to GitLab’s unique scopes and token expiration rules.
  • Reading raw file contents from different branches and handling pagination in the GitLab API took some debugging effort.
  • Integrating AI feedback while keeping it relevant and context-aware was a balancing act between too much and too little.
  • Handling large repositories and processing files efficiently without blocking the UI or timing out API routes.

🌟 Final Thoughts

Mercury | AI Manager has the potential to significantly reduce developer burnout and improve code quality across teams of all sizes. By leveraging Google Cloud Gemini AI models, it delivers precise, helpful, and context-aware feedback—bringing the power of AI-assisted code reviews to every developer’s workflow. I’m excited to continue refining it and exploring deeper integrations with CI/CD pipelines for seamless automated feedback.

Built With

Share this project:

Updates