PHPackages                             muhammadadela/phplitecore - 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. muhammadadela/phplitecore

ActiveLibrary[Framework](/categories/framework)

muhammadadela/phplitecore
=========================

phpLiteCore is a modern, lightweight, and fast PHP framework for building web applications of any size.

v1.0.0(6mo ago)01[3 PRs](https://github.com/MuhammadAdelA/phpLiteCore/pulls)MITPHPPHP &gt;=8.3CI passing

Since Oct 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/MuhammadAdelA/phpLiteCore)[ Packagist](https://packagist.org/packages/muhammadadela/phplitecore)[ RSS](/packages/muhammadadela-phplitecore/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (34)Used By (0)

phpLiteCore PHP Framework
=========================

[](#phplitecore-php-framework)

[![PHP Version](https://camo.githubusercontent.com/65f934ff4b7f17d7bda9d5b59f8417947c4069f1468bc7e4e04a2e8958ebf737/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e332d626c75652e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Tests](https://github.com/MuhammadAdelA/phpLiteCore/workflows/PHP%20Code%20Quality%20Checks/badge.svg)](https://github.com/MuhammadAdelA/phpLiteCore/actions)[![Documentation](https://camo.githubusercontent.com/02784ad6571940aae1b60f2e015d2a35949bd9d21202740ab6954fa512057153/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63732d6f6e6c696e652d627269676874677265656e2e737667)](https://muhammadadela.github.io/phpLiteCore/)

**phpLiteCore** is a modern, lightweight, and fast PHP framework designed for building web applications of any size. It focuses on simplicity, speed, and a clean architecture, providing core essentials without unnecessary bloat.

---

✨ Features
----------

[](#-features)

- ⚡ **Ultra-lightweight and Fast:** Minimal core for optimal performance.
- 🧩 **Clean Architecture:** Adheres to MVC principles with strict separation of concerns.
- 🧱 **Hybrid Active Record:** Simplifies database interactions (Querying &amp; Manipulation).
- 🛣️ **Flexible Routing:** Supports GET, POST, dynamic route parameters, named routes, and reverse URL generation.
- 🌍 **Built-in Translation (i18n):** Modular system supporting multiple languages (EN/AR included).
- 🛡️ **Environment-Aware Error Handling:** Detailed errors in development, user-friendly messages &amp; developer notifications (SMTP) in production.
- 📦 **Asset Management Ready:** Integrated with NPM, Webpack, and SCSS for easy frontend workflows.
- ✔️ **Input Validation:** Simple, integrated validation system.
- 📄 **Pagination:** Built-in pagination logic and renderers (Bootstrap 5).
- 🛠️ **Extensible:** Designed to be easily extended with custom components.

---

🚀 Getting Started
-----------------

[](#-getting-started)

### Quick Start with Docker (Recommended for Development)

[](#quick-start-with-docker-recommended-for-development)

The easiest way to get started is using Docker Compose on WSL2 Ubuntu 24.04:

```
# Clone the repository
git clone https://github.com/MuhammadAdelA/phpLiteCore.git
cd phpLiteCore

# Run the automated setup script (one-time setup)
chmod +x setup-wsl2-ubuntu.sh
./setup-wsl2-ubuntu.sh

# Start the development environment
docker-compose up -d

# Install dependencies and build assets
docker-compose exec app composer install
docker-compose exec app npm install
docker-compose exec app npm run build

# Access your application at http://localhost:8080
```

**See the complete [Docker Setup Guide](DOCKER_SETUP.md)** for detailed instructions, troubleshooting, and advanced usage.

### Manual Setup (Traditional)

[](#manual-setup-traditional)

1. **Clone the repository:**

    ```
    git clone https://github.com/MuhammadAdelA/phpLiteCore.git
    cd phpLiteCore
    ```
2. **Install Dependencies:**

    ```
    # Install PHP dependencies
    composer install

    # Install Node.js dependencies and build assets
    npm install
    npm run build # or 'npm run dev' for development
    ```
3. **Configure Environment:**

    - Copy `.env.example` to `.env`.
    - Update `.env` with your database credentials, SMTP settings (for production error reporting), and `APP_ENV` (`development` or `production`).
4. **Set Up Database:**

    - Import the `phplitecore.sql` file into your MySQL database.
5. **Configure Web Server:**

    - **Recommended (Secure):** Point your web server's document root to the **`public/` directory**. This ensures only the public assets are accessible.
    - **Alternative (Backward Compatible):** Point to the project root directory. The `.htaccess` file will redirect requests to `public/`, but this is less secure.
    - Ensure `mod_rewrite` (or equivalent for your server) is enabled.
6. **Run:**

    - Open the project URL in your browser. You should see the welcome page!

---

📖 Documentation
---------------

[](#-documentation)

**View the live documentation:**

****

*(Includes guides for both English and Arabic, covering core concepts, routing, database interaction, translation, and more.)*

### Database Layer Quick Start

[](#database-layer-quick-start)

phpLiteCore provides a powerful yet simple database layer with Active Record pattern:

```
// Find a user by ID
$user = User::find(1);

// Query with conditions
$activeAdmins = User::where('role', 'admin')
    ->where('status', 'active')
    ->orderBy('created_at', 'DESC')
    ->get();

// Eager load relationships to avoid N+1 queries
$users = User::with(['posts', 'profile'])
    ->where('status', 'active')
    ->get();

// Use transactions for data integrity
$db->beginTransaction();
try {
    $user->credits -= 100;
    $user->save();

    $otherUser->credits += 100;
    $otherUser->save();

    $db->commit();
} catch (\Exception $e) {
    $db->rollBack();
}
```

**Comprehensive Guides:**

- [Database Guide (Markdown)](docs/database-guide.md) - Complete guide with examples for transactions, relationships, query building, and edge cases
- [Query Builder Guide (Interactive)](https://muhammadadela.github.io/phpLiteCore/query-builder-guide_en.html) - Visual guide with syntax highlighting

**Development Environment:**

For a complete Docker-based development environment on WSL2 Ubuntu 24.04, see the **[Docker Setup Guide](DOCKER_SETUP.md)** with instructions for:

- Automated setup script for WSL2
- Docker Compose configuration
- Development tools (phpMyAdmin, MailHog)
- Troubleshooting and common tasks

**Network Configuration:**

If you need to configure network access for GitHub Actions or work behind firewalls, see the **[Network Configuration Guide](NETWORK_CONFIGURATION.md)** for detailed setup instructions.

---

📦 Versioning
------------

[](#-versioning)

phpLiteCore follows [Semantic Versioning 2.0.0](https://semver.org/) (SemVer). We maintain a detailed [CHANGELOG.md](CHANGELOG.md) documenting all notable changes for each release.

### Version Support

[](#version-support)

- **Active Support**: 12 months (bug fixes, security patches, new features)
- **Security Support**: Additional 12 months (security patches only)
- **Total Support**: 24 months per major version

### Current Version

[](#current-version)

Check the [latest release](https://github.com/MuhammadAdelA/phpLiteCore/releases) for the current stable version.

**Learn More:**

- [Versioning Policy](docs/VERSIONING.md) - Complete versioning and release policy
- [CHANGELOG](CHANGELOG.md) - Detailed change history for all versions
- [Upgrade Guides](docs/upgrades/) - Step-by-step upgrade instructions

---

🛡️ Security
-----------

[](#️-security)

Security is a top priority for phpLiteCore. If you discover a security vulnerability, please review our [Security Policy](SECURITY.md) for responsible disclosure guidelines.

---

🧪 Code Quality
--------------

[](#-code-quality)

phpLiteCore maintains high code quality standards:

- **PSR-12 Compliant**: All code follows PSR-12 coding standards
- **Static Analysis**: Uses PHPStan for type safety
- **Automated Tests**: Comprehensive test suite with Pest PHP
- **Code Style**: Automated formatting with PHP CS Fixer

### Running Quality Checks

[](#running-quality-checks)

```
# Run tests
./vendor/bin/pest

# Run static analysis (requires PHPStan)
composer require --dev phpstan/phpstan
./vendor/bin/phpstan analyse

# Fix code style (requires PHP CS Fixer)
composer require --dev friendsofphp/php-cs-fixer
./vendor/bin/php-cs-fixer fix
```

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please read the [CONTRIBUTING.md](CONTRIBUTING.md) guide and our [Code of Conduct](CODE_OF_CONDUCT.md).

---

📜 License
---------

[](#-license)

phpLiteCore is open-source software licensed under the [MIT license](LICENSE).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance77

Regular maintenance activity

Popularity1

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 60.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

181d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d0f0a3040911f6d64dade3ae58c8467d9f10d783c4b948767358ba0bbc0ff72?d=identicon)[MuhammadAdelA](/maintainers/MuhammadAdelA)

---

Top Contributors

[![MuhammadAdelA](https://avatars.githubusercontent.com/u/20910348?v=4)](https://github.com/MuhammadAdelA "MuhammadAdelA (97 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (63 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/muhammadadela-phplitecore/health.svg)

```
[![Health](https://phpackages.com/badges/muhammadadela-phplitecore/health.svg)](https://phpackages.com/packages/muhammadadela-phplitecore)
```

###  Alternatives

[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[getkirby/cms

The Kirby core

1.5k535.5k352](/packages/getkirby-cms)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
