PHPackages                             script-php/easyapp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. script-php/easyapp

ActiveProject[Framework](/categories/framework)

script-php/easyapp
==================

EasyAPP is a different type of Framework. EasyAPP aims to help you in the easy development of any type of website, without consuming resources in vain.

91PHP

Since Oct 7Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/script-php/EasyAPP)[ Packagist](https://packagist.org/packages/script-php/easyapp)[ RSS](/packages/script-php-easyapp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

EasyAPP Framework
=================

[](#easyapp-framework)

**A Modern, Lightweight PHP Framework for Rapid Development**

[![PHP Version](https://camo.githubusercontent.com/e930363e941f9822f19ceb5b72b94c338949a3d2133fb06aed143e816891eed8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344253230372e342d626c75652e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/d97f6c65d42f05e3a18a72d9e309407dd7ba01be5d4cdb7a9bba638170c3187b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c25323076332d677265656e2e737667)](LICENSE)[![Version](https://camo.githubusercontent.com/62174b6425a3134acfb2ee57690bcc563ac6b15ff13e8153fbd7ff7ffcf3df46/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d322e302d6f72616e67652e737667)](https://github.com/script-php/EasyAPP)

[Features](#features) • [Installation](#installation) • [Quick Start](#quick-start) • [Documentation](#documentation) • [Contributing](#contributing)

---

EasyAPP is a powerful yet elegant PHP framework designed to make web application development fast, secure, and enjoyable. Built with modern PHP practices, it features a clean MVC architecture, advanced routing, ORM support, and comprehensive development tools.

Features
--------

[](#features)

### Core Architecture

[](#core-architecture)

- **Modern MVC Pattern** - Clean separation with Controllers, Models, Views, Services, and Libraries
- **Dependency Injection** - Registry-based DI container with automatic service resolution
- **Event System** - Powerful event-driven architecture with lifecycle hooks
- **Service Layer** - Business logic separation with service components

### Database &amp; ORM

[](#database--orm)

- **Active Record ORM** - Eloquent-style ORM with relationships (hasOne, hasMany, belongsTo, belongsToMany)
- **Query Builder** - Fluent PDO-based database abstraction layer
- **Migrations** - Database version control and schema management
- **Prepared Statements** - Built-in SQL injection protection

### Routing &amp; Requests

[](#routing--requests)

- **Advanced Router** - RESTful routing with parameters, patterns, and named routes
- **Multiple Route Formats** - Support for `/`, `|`, and `-` separators
- **Request Handling** - Comprehensive request/response abstractions
- **Method Spoofing** - PUT, PATCH, DELETE support via POST

### Development Tools

[](#development-tools)

- **CLI Tool** - Powerful command-line interface for scaffolding and management
- **Debug Mode** - Beautiful error pages with stack traces and context
- **Logging System** - PSR-3 compatible multi-level logging
- **Testing Support** - Built-in testing utilities and examples

### Performance &amp; Caching

[](#performance--caching)

- **Smart Caching** - File-based caching with automatic invalidation
- **Class Caching** - Automatic model/controller/service instance caching
- **Lazy Loading** - On-demand component loading for optimal performance
- **Proxy Pattern** - AOP-style method interception and monitoring

### Security

[](#security)

- **CSRF Protection** - Automatic token generation and validation
- **Input Sanitization** - XSS prevention and data filtering
- **Secure Headers** - Configurable security headers
- **Path Traversal Protection** - File access security validation

### Internationalization

[](#internationalization)

- **Multi-language Support** - Built-in i18n system with language files
- **Template System** - Parameter substitution with language variables
- **Dynamic Language Switching** - Runtime language detection and switching

Requirements
------------

[](#requirements)

- **PHP:** 7.4 or higher (8.0+ recommended)
- **Extensions:** PDO, JSON, MBString (recommended)
- **Web Server:** Apache with mod\_rewrite or Nginx
- **Database:** MySQL 5.7+, MariaDB 10.2+, or PostgreSQL
- **Composer:** Optional (for dependency management)

Installation
------------

[](#installation)

### Via Git Clone

[](#via-git-clone)

```
# Clone the repository
git clone https://github.com/script-php/EasyAPP.git my-project
cd my-project

# Configure environment
cp .env.example .env
nano .env  # Edit with your settings

# Set permissions (Linux/Mac)
chmod -R 755 storage/
chmod 644 .env

# Start development server
php easy serve localhost 8000
```

### Via Composer (Coming Soon)

[](#via-composer-coming-soon)

```
composer create-project script-php/easyapp my-project
cd my-project
php easy serve
```

### Web Server Configuration

[](#web-server-configuration)

**Apache Configuration**```

    ServerName myapp.local
    DocumentRoot "/path/to/my-project"

        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted

    ErrorLog "/path/to/logs/myapp-error.log"
    CustomLog "/path/to/logs/myapp-access.log" common

```

**Nginx Configuration**```
server {
    listen 80;
    server_name myapp.local;
    root /path/to/my-project;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}
```

Quick Start
-----------

[](#quick-start)

### 1. Create Your First Controller

[](#1-create-your-first-controller)

```
php easy make:controller Welcome
```

This generates `app/controller/welcome.php`:

```
