Introduction

GitHub

Welcome to Codementor-AI

Codementor-AI is a Laravel-native code analysis system that provides automated code review with AI-powered intelligence. It's designed specifically for Laravel projects and integrates seamlessly with your development workflow.

What is Codementor-AI? An enterprise-grade automated code analysis tool built specifically for Laravel projects, featuring AST parsing, AI-powered rule optimization, and comprehensive security analysis.

Key Features

  • Laravel-Native: Built specifically for Laravel projects with framework-aware analysis
  • AST Parsing: Abstract Syntax Tree-based analysis for precise code understanding
  • AI-Powered Intelligence: Machine learning integration for pattern recognition and optimization
  • Advanced Security: SQL injection, XSS, CSRF, and authentication bypass detection
  • Performance Optimized: Intelligent caching and parallel processing
  • Zero Configuration: Automatic Laravel project detection and setup

How It Works

Codementor-AI analyzes your Laravel code using:

  1. File Scanner: Discovers and processes PHP files in your project
  2. AST Analysis: Parses code into Abstract Syntax Trees for deep understanding
  3. Rule Engine: Applies Laravel-specific and general PHP rules
  4. AI Optimization: Uses machine learning to reduce false positives
  5. Report Generation: Creates detailed HTML reports with actionable insights

Supported Analysis Types

🔍 Code Style Analysis

  • PSR-12 compliance validation
  • Naming conventions enforcement
  • Code formatting standards
  • Documentation requirements

🏗️ Laravel Best Practices

  • Framework-specific conventions
  • Controller and model patterns
  • Service layer organization
  • Dependency injection validation

🔒 Security Analysis

  • SQL injection vulnerability detection
  • Cross-site scripting (XSS) prevention
  • CSRF protection validation
  • Authentication bypass detection
  • Sensitive data exposure scanning

🗄️ Database Rules

  • MongoDB usage validation in controllers
  • Query optimization suggestions
  • Migration standards enforcement

Download & Installation

Ready to get started? Download Codementor-AI and integrate it into your Laravel project today.
GitHub Repository

Access the source code, report issues, and contribute to the project.

View on GitHub
Download Latest Release

Get the latest stable version with all features and bug fixes.

Download Latest
Installation Options:
  • Quick Install: Use the installation script for automatic setup
  • Manual Install: Clone the repository and configure manually

Quick Start

Get started with Codementor-AI in just a few steps:

# Full installation (recommended)
./codementor-ai/install.sh --full

# Run code analysis
php codementor-ai/cli.php

# Quick analysis (pre-commit)
php codementor-ai/cli.php --quick

# Full analysis with HTML report
php codementor-ai/cli.php --full --format=html

Project Structure

Codementor-AI is organized into these key components:

codementor-ai/
├── cli.php                     # Main CLI entry point
├── config.php                  # Configuration file
├── install.sh                  # Installation script
├── recover.sh                  # Recovery and troubleshooting
├── engine/                     # Core analysis engine
│   ├── RuleRunner.php         # Main rule execution engine
│   ├── FileScanner.php        # File discovery and processing
│   ├── ReportWriter.php       # HTML report generation
│   ├── ConfigurationLoader.php # Configuration management
│   ├── AIRuleOptimizer.php    # AI-powered optimization
│   └── ...                    # Other engine components
├── rules/                      # Analysis rules
│   ├── LaravelRules.php       # Laravel-specific rules
│   ├── SecurityRules.php      # Security analysis rules
│   ├── PerformanceRules.php   # Performance optimization rules
│   └── ...                    # Additional rule sets
└── reports/                    # Generated analysis reports

Next Steps

Ready to get started? Follow these guides: