Introduction
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:
- File Scanner: Discovers and processes PHP files in your project
- AST Analysis: Parses code into Abstract Syntax Trees for deep understanding
- Rule Engine: Applies Laravel-specific and general PHP rules
- AI Optimization: Uses machine learning to reduce false positives
- 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
GitHub Repository
Access the source code, report issues, and contribute to the project.
View on GitHubDownload Latest Release
Get the latest stable version with all features and bug fixes.
Download Latest- 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:
- Installation Guide - Set up Codementor-AI in your project
- Usage Guide - Learn how to run analysis and interpret results
- Custom Rules - Create your own analysis rules